Azure / Azure/azure-rest-api-specs
Incorrect swagger for discriminator
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2016-08-10/service.json#L8290
Per swagger 2, the `discriminator` _must_ reference a property defined within the declaring type. In this case, the `discriminator` is `instanceType` which is defined in the child type. This is malformed and must be fixed.
Contributor guide
Research direction
Open specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2016-08-10/service.json around line 8290 and review the declaring and child types against the Swagger 2 discriminator requirement. Confirm the specification passes the repository’s validation checks and that the discriminator references a property defined by the declaring type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100