RepreZen / KaiZen-OpenAPI-Editor

Eclipse Editor for the Swagger-OpenAPI Description Language
Eclipse Public License 1.0
114 stars 11 forks source link

Avoid warning on inherited properties (allOf) #528

Open cvgaviao opened 3 years ago

cvgaviao commented 3 years ago

In the schemas below we can see an inheritance scenario:

components:
  schemas:
    person:
      allOf:
        - $ref: '#/components/schemas/personForCreation'
        - type: object
          properties:
            id:
              type: integer
              format: int32
          required:
            - id

    personForCreation:
      allOf:
        - $ref: '#/components/schemas/personForUpdate'
        - type: object
          properties:
            creationDate:
              type: string

          required:
            - creationDate
            - firstName     <- warning
            - name           <- warning
            - email           <- warning

    personForUpdate:
      type: object
      properties:
        firstName:
          type: string
          maxLength: 255
        name:
          type: string
          maxLength: 255
        birthDate:
          type: string
          format: date
        address:
          type: string
          maxLength: 255
        postalCode:
          type: string
          maxLength: 255
        city:
          type: string
          maxLength: 255
        phoneNumber:
          type: string
          pattern: ^((\+)33|0)[1-9](\d{2}){4}$
        email:
          type: string
          format: email
        nationality:
          type: string
          maxLength: 255

The oas3 editor is showing a warning in the personForCreation complaining about missing properties. but they are supposed to be inherited.