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

kumahq/openapi-tool generates OAPI schema with both properties and an allOf at the same level, which is valid but problematic #59

Open
slonka opened this issue Jan 7, 2025 · 0 comments
Assignees
Labels
kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it

Comments

@slonka
Copy link
Contributor

slonka commented Jan 7, 2025

What happened?

During integration with some other parts of our codebase I got an error when trying to validate the generated schema. I chatted to @mheap and he said that:

seems to contain both properties and an allOf at the same level, which isn't valid

I'll make sure that's the case and try to fix this.

@slonka slonka added triage/pending This issue will be looked at on the next triage meeting kind/bug A bug labels Jan 7, 2025
@slonka slonka self-assigned this Jan 7, 2025
@slonka slonka added triage/accepted The issue was reviewed and is complete enough to start working on it and removed triage/pending This issue will be looked at on the next triage meeting labels Jan 7, 2025
@slonka slonka changed the title invopop/jsonschema generates OAPI schema with both properties and an allOf at the same level, which isn't valid kumahq/openapi-tool generates OAPI schema with both properties and an allOf at the same level, which isn't valid Jan 7, 2025
@slonka slonka transferred this issue from kumahq/kuma Jan 7, 2025
@slonka slonka changed the title kumahq/openapi-tool generates OAPI schema with both properties and an allOf at the same level, which isn't valid kumahq/openapi-tool generates OAPI schema with both properties and an allOf at the same level, which is valid but problematic Jan 7, 2025
slonka added a commit to kumahq/kuma that referenced this issue Jan 7, 2025
## Motivation

So it's properly merged in parent object. Otherwise we end up with both
`properties` and `allOf` on the same level which doesn't play nicely
with parent project validator.

<!-- Why are we doing this change -->

## Implementation information

Move to separate object.

<!-- Explain how this was done and potentially alternatives considered
and discarded -->

## Supporting documentation

<!-- Is there a MADR? An Issue? A related PR? -->

xrel kumahq/ci-tools#59

<!--
> Changelog: skip
-->
<!--
Uncomment the above section to explicitly set a [`> Changelog:` entry
here](https://github.com/kumahq/kuma/blob/master/CONTRIBUTING.md#submitting-a-patch)?
-->

---------

Signed-off-by: slonka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it
Projects
None yet
Development

No branches or pull requests

1 participant