Open marcelstoer opened 3 years ago
According to https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#composition-and-inheritance-polymorphism it is expected(?) that you use allOf
to compose something out of a $ref
object and an "anonymous" local object.
Years ago I contributed two PRs #83 and #84 which added validation to ensure properties declared as required actually exist.
The test case I contributed uses a definition like so:
https://github.com/APIDevTools/swagger-parser/blob/c47b3f5cc849b09d7b0bc11a14e4a44d5caee1df/test/specs/validate-spec/valid/inherited-required-properties.yaml#L48-L54
Today I learned folks might actually put this into their API specs like so instead:
@JamesMessinger in your experience is this a common enough variant that I should adjust the code through a PR accordingly?