$ref with sibling elements
ctaggart opened this issue · 4 comments
I do not think $ref
could be used with other values. In this case description
and x-ms-client-flatten
.
"ExpressRouteAuthorization": {
"description": "ExpressRoute Circuit Authorization",
"allOf": [
{
"$ref": "#/definitions/Resource"
}
],
"properties": {
"properties": {
"description": "The properties of an ExpressRoute Circuit Authorization resource",
"$ref": "#/definitions/ExpressRouteAuthorizationProperties",
"x-ms-client-flatten": true
}
}
},
This is from ../azure-rest-api-specs/specification/vmware/resource-manager/Microsoft.AVS/stable/2020-03-20/vmware.json
The sibling elements are not valid and should be ignore. It is documented at the end of this:
https://swagger.io/docs/specification/using-ref/
Many specs use sibling elements of x-ms-client-flatten, title
, and description
. I'm adding support for AutoRest compatability.
With #18, I've added several schema fields that can be overridden according to the specs in the test suite.
autorust_openapi/src/reference.rs
Lines 12 to 27 in f21d16e
Azure specs do not follow OpenAPI spec in this regard.