OpenAPITools / OpenAPITools/openapi-diff
allOf : `type` of property contained in multiple subschemas is not correctly determined.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 190
- PR merge metrics
- No merged PRs in 30d
Description
Given the following schema V1:
Foo:
allOf:
- properties:
propA:
type: string
- properties:
propA:
example: "YEEHAA"
is changed to the following schema V2:
Foo:
properties:
propA:
type: string
openapi-diff incorrectly detects the following incompatible change:
Changed property type (object -> string)
It seems to me that the type of a property that is contained in multiple subschemas of an allOf is not correctly determined. Openapi-diff recognized the type of propA in schema V1 as an object, but this is not correct.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the comparison between the supplied V1 and V2 schemas, focusing on Foo, allOf, and the repeated propA definition. Inspect how the diff determines propA's type across allOf subschemas. Done means the comparison no longer reports an incompatible object-to-string type change for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100