I am trying to return a Posts object with Images and Videos with it.
Posts, Images and Videos are all separate objects.
Posts may or may not have Images and Videos associated to it.
I am trying to create a new response in the following way:
PostsResponse: allOf: - $ref: '#/components/schemas/Post' - Images: type: array items: $ref: '#/components/schemas/Image' - Videos: type: array items: $ref: '#/components/schemas/Video'
While trying to do the above thing following error is thrown
should NOT have additional properties
additionalProperty: Images
same error for Videos.
Please help
Try this:
PostsResponse: allOf: - $ref: '#/components/schemas/Post' - properties: Images: type: array items: $ref: '#/components/schemas/Image' Videos: type: array items: $ref: '#/components/schemas/Video'
Thank you Helen!
@sanghvi_yash did the solution work for you? Please let us know!
Subject | Author | Latest Post |
---|---|---|