-
Notifications
You must be signed in to change notification settings - Fork 0
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: Create one endpoint per path, not per method #123
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -909,7 +919,14 @@ export const getSemanticMethod = (methods: Method[]): Method => { | |||
} | |||
|
|||
const priorityOrder: Method[] = ['PUT', 'PATCH', 'POST', 'GET', 'DELETE'] | |||
return methods.find((m) => priorityOrder.includes(m)) ?? 'POST' |
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.
This seems to have been implemented incorrectly because the priority was defined by the passed methods
, not by the priorityOrder
.
However, now the tests are failing. Am I understanding this incorrectly?
If I'm right that there's a bug here, is the priorityOrder
correct so that I could adjust the tests?
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.
This does looks like a mistake 🤔
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.
Closes #121