Open carnage opened 1 year ago
I don't know currently if it's valid.
As a quick fix I believe it would add a required fields validator if the spec looked like this:
components:
SpecObject:
allOf:
-
$ref: '#/components/schemas/OtherSpecObject'
-
type: object
required:
- prop1
properties:
prop1:
type: string
The following is considered valid using this validator
openapi: "3.0.0"
info:
version: 1.0.0
title: Swagger Petstore
paths:
/path:
get:
responses:
200:
description: Successful Response
components:
schemas:
SpecObject:
required:
- prop1
allOf:
-
$ref: '#/components/schemas/OtherSpecObject'
-
type: object
properties:
prop1:
type: string
OtherSpecObject:
type: object
Check first to see if this is compliant with the spec but the following open API spec doesn't add the required fields validator that should be added: