pokemock
pokemock copied to clipboard
Pokemock does not recognise Swagger inheritance
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