-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat(openapi-tooling): validate schema in jest tests #25538
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
feat(openapi-tooling): validate schema in jest tests #25538
Conversation
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loving the new simplified setup without running through a separate process 🎉
There's a bit more custom validation code than I would've expected, but trusting that it's needed and we can ofc refactor bits in future iterations.
Approved basically as is, but let me know when you want to merge
packages/backend-openapi-utils/src/schema/parameter-validation.ts
Outdated
Show resolved
Hide resolved
packages/backend-openapi-utils/src/schema/parameter-validation.ts
Outdated
Show resolved
Hide resolved
11acf0e
to
5289336
Compare
@Rugvip Did something change with the E2E/CI test checks? I've never seen the unauthorized error before 😅 |
Huh, that is new, probably something on the docker side 🤔 |
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
…essages Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
…plugin Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
a3e3e2e
to
7263f92
Compare
@Rugvip Are we ok with merging this in this week? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! 👍
Gonna after the small cleanup
packages/backend-openapi-utils/src/schema/parameter-validation.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Thank you for contributing to Backstage! The changes in this pull request will be part of the |
Hey, I just made a Pull Request!
Optic was recently acquired by Atlassian (congrats to them! 🎉 ). We're on an older version of Optic CLI that is missing deep object query parameter support, and it looks like it won't be added anytime soon in the upstream repo (last commit was ~3 months ago). I took a stab at implementing the proxy validation myself, to pretty good results. I may take a look at rewriting the breaking changes workflow myself as well later this year.
Most of this code is tests 😅 .
Features:
repo schema openapi test
workflow, but I don't love it as is.${name}[${index}]
or${name}[]
. We now get control over that syntax support. I also improved the deepObject and object form explode validation.Missing:
--fix
, there's no easy way to do that with this new implementation. I think Github Copilot can fill this gap though, and more expressly match the TS definitions.✔️ Checklist
Signed-off-by
line in the message. (more info)