-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
fix: Revert breaking change for incoming token creation reqs #2084
Conversation
## What This change reverts the spec change to create-api-token-schema that was introduced in 97c2b3c That commit changed the endpoint from allowing any string to only allowing strings that match the values of the ApiTokenType value. ## Why Because we already validate this on the backend, I didn't think it would break anything. However, because OpenAPI enums are case sensitive (and do not currently support anything else), it _did_ break the API. ([stack overflow post that explains how this works](https://stackoverflow.com/questions/60772786/case-insensitive-string-parameter-in-schema-of-openapi)) ## Of note This should have been caught by the tests, but it didn't show up until it was merged to the main branch. I think it might be worth looking into how we do the PR testing.
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
Coverage report❌ An unexpected error occurred. For more details, check console
Test suite run failedFailed tests: 1/1165. Failed suites: 1/192.
Report generated by 🧪jest coverage report action from e01ef28 |
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.
Okay, tests are broken here but not because of this, because of the build so I'm slapping a LGTM on this
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.
LGTM
What
This change reverts the spec change to create-api-token-schema that was introduced in 97c2b3c
That commit changed the endpoint from allowing any string to only allowing strings that match the values of the ApiTokenType value.
Why
Because we already validate this on the backend, I didn't think it would break anything. However, because OpenAPI enums are case sensitive (and do not currently support anything else), it did break the API. (stack overflow post that explains how this works)
Of note
This should have been caught by the tests, but it didn't show up until it was merged to the main branch. I think it might be worth looking into how we do the PR testing.