Azure / Azure/azure-rest-api-specs
Incorrect example in polymorphism doc
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 424
Description
https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/creating-swagger.md#PolymorphicResponse
The properties are under "allOf" too - which will behave as a composition instead of an inheritance. Not a deal breaker probably not the behavior most Swagger authors want. A better way is to define the properties outside. Like in our AutoRest tests: https://github.com/Azure/autorest.testserver/blob/master/swagger/body-complex.json#L1311.
Contributor guide
Research direction
Open documentation/creating-swagger.md at the PolymorphicResponse section and compare the example with the linked AutoRest testserver body-complex.json around line 1311. Confirm the documented property placement matches the referenced example, then check the rendered documentation and links. Done means the polymorphism example no longer presents the reported composition behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100