Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] merge for a specific version nullifies refs in an array #558

Closed
dblock opened this issue Sep 9, 2024 · 0 comments · Fixed by #559
Closed

[BUG] merge for a specific version nullifies refs in an array #558

dblock opened this issue Sep 9, 2024 · 0 comments · Fixed by #559
Assignees
Labels
bug Something isn't working

Comments

@dblock
Copy link
Member

dblock commented Sep 9, 2024

What is the bug?

If an item in a list of $ref's under oneOf is excluded by x-version-addded it becomes null.

How can one reproduce the bug?

  1. Edit any ref under _common.mapping:Property with `x-version-added: 2.4'.
oneOf:
        - $ref: '#/components/schemas/GeoShapeProperty'
        - $ref: '#/components/schemas/XyPointProperty'
    XyPointProperty:
      x-version-added: '2.4'
  1. Run npm run merge -- --opensearch-version=2.0.0. This will generate an incorrect OpenAPI spec.
oneOf:
        - $ref: '#/components/schemas/_common.mapping:GeoShapeProperty'
        - null

What is the expected behavior?

No null in the oneOf.

Do you have any additional context?

Coming from #531.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant