InsertRestrictions/RequiredProperties #335
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the service
tools/tests/ServiceQuotation.xml, the propertyServiceQuotationTypeis required during aPOST /ServiceQuotation:odata-openapi/tools/tests/ServiceQuotation.xml
Lines 1575 to 1583 in c249ba7
But the XSLT tool for OpenAPI generation does not currently consider this
Capabilities.InsertRestrictions/RequiredPropertiesannotation when it generates the*-createschema, since the annotation targets the entity set but the schema is generated per entity type.This PR contains a simplified version of the treatment of this annotation, which looks at all entity sets for the given entity type. It leads to the following Swagger UI. It does not yet consider paths of the form
EntitySet/NavigationPropertythat might also have the entity type.The full treatment is implemented in the much bigger PR #291:
odata-openapi/tools/V4-CSDL-to-OpenAPI.xsl
Lines 1466 to 1484 in 680835b