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

openapi: remove all the extra data info #4277

Merged
merged 3 commits into from
Jul 19, 2023

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Jul 19, 2023

This change makes the eventData object nullable (because it is),
and also removes all the properties that we had to declare to have an
example.

This should help us avoid a fair few warnings about data being
mismatched when it can really be anything.

Context

The OpenAPI enforcer gives you warnings when you provide examples that use additional properties. But since we really don't know what the data is in this case, that's the best way forward.

There's two options: either allow additional properties in all examples or use the x-enforcer-exception-skip-codes to allow it only in a single place.

I'm leaning towards the latter (and that's what's in this PR) because it can be useful to have the warning in other places, so I don't think we should ignore it completely. The tradeoff is that the OpenAPI schema gets rendered with that extra property in it.

This change makes the `eventData` object nullable (because it is),
and also removes all the properties that we had to declare to have an
example.

This should help us avoid a fair few warnings about data being
mismatched when it can really be anything.
@sonatype-lift
Copy link

sonatype-lift bot commented Jul 19, 2023

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

@vercel
Copy link

vercel bot commented Jul 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Jul 19, 2023 7:14am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Jul 19, 2023 7:14am

@thomasheartman thomasheartman marked this pull request as ready for review July 19, 2023 07:21
@thomasheartman thomasheartman merged commit 5dd78f3 into main Jul 19, 2023
10 checks passed
@thomasheartman thomasheartman deleted the openapi/simplify-event-schema branch July 19, 2023 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants