pokemock icon indicating copy to clipboard operation
pokemock copied to clipboard

Pokemock does not recognise Swagger inheritance

Open Rogger1999 opened this issue 6 years ago • 0 comments

definitions:

ResultSetDtoV1:
  type: object
  discriminator: total # this is only used to make inheritance work
  required:
    - pagination
  properties:
    pagination:
      type: object
      required:
        - offset
        - count
        - limit
      properties:
        offset:
          type: integer
          description: "Offset within the result set"
          minimum: 0
          example: 0
        count:
          type: integer
          description: "How many recordings to display"
          minimum: 0
          example: 4
        limit:
          type: integer
          description: "Maximum number of recordings to display"
          minimum: 0
          example: 20

CoursesListDtoV1:

  allOf:
    - $ref: '#/definitions/ResultSetDtoV1'
    - type: object
      required:
      - items
      properties:
        items:
          type: array
          items:
            $ref: "#/definitions/CourseDtoV1"`

the allOf will import all the properties from the $def defined. This is how swagger uses inherritence. This is not recognise by Pokemoc

Rogger1999 avatar May 30 '18 08:05 Rogger1999