cancel
Showing results for 
Search instead for 
Did you mean: 

allOf structure renders but does not validate

SOLVED
HenrikHL
Occasional Contributor

allOf structure renders but does not validate

Hi all,

 

I have the following allOf structure:

    shipmentEquipmentCommon:
      type: object
      allOf:
        - $ref: '#/components/schemas/equipmentReference'
        - $ref: '#/components/schemas/verifiedGrossMass'
        - $ref: '#/components/schemas/weightUnit'
        - $ref: '#/components/schemas/cargoGrossWeight'
        - activeReeferSettings:
          type: object
          properties:
            activeReeferSettings:
              type: object
              description: specifies the settings for an active reefer container used to a shipment.
              allOf:
                - $ref: '#/components/schemas/temperatureMin'
                - $ref: '#/components/schemas/temperatureMax'
                - $ref: '#/components/schemas/temperatureUnit'
                - $ref: '#/components/schemas/humidityMin'
                - $ref: '#/components/schemas/humidityMax'
                - $ref: '#/components/schemas/ventilationMin'
                - $ref: '#/components/schemas/ventilationMax'

all of the $ref - references are defined in the following manner:

    equipmentReference:
      type: object
      properties:
        equipmentReference:
          type: string
          maxLength: 15
          description: 'Description...'
          example: APZU4812090

The structure renders correct in SwaggerHub:

HenrikHL_0-1608316147132.png

But does not validate:

HenrikHL_1-1608316196442.png

What am I doing wrong? Is there something I have misunderstood?

1 ACCEPTED SOLUTION

Accepted Solutions
HKosova
Moderator

Re: allOf structure renders but does not validate

On line 228, change

        - activeReeferSettings:
          type: object

to

        - type: object

 


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

2 REPLIES 2
HKosova
Moderator

Re: allOf structure renders but does not validate

On line 228, change

        - activeReeferSettings:
          type: object

to

        - type: object

 


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

HenrikHL
Occasional Contributor

Re: allOf structure renders but does not validate

Thank you for your quick reply

New Here?
Join us and watch the welcome video:
Announcements