We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'd like to define PetNew schema for POST /pets and PetUpdate schema for PATCH /pets/{pet_id} as following to reuse name schema:
PetNew
POST /pets
PetUpdate
PATCH /pets/{pet_id}
components: schemas: PetNew: allOf: - $ref: '#/components/schemas/PetUpdate' - type: object required: - name PetUpdate: type: object properties: name: type: string
But openapi-core treats PetNew's name property as optional.
def test_all_of_required_keyword_only_element(self): schema = Schema('object', all_of=[ Schema('object', properties={'name': Schema('string')}), Schema('object', required=['name']), ]) assert schema.get_all_required_properties_names() == {'name'}
swagger-editor shows no schema errors for this definitions and openapi-generator generates required name property.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'd like to define
PetNew
schema forPOST /pets
andPetUpdate
schema forPATCH /pets/{pet_id}
as following to reuse name schema:But openapi-core treats PetNew's name property as optional.
swagger-editor shows no schema errors for this definitions and openapi-generator generates required name property.
The text was updated successfully, but these errors were encountered: