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

Add how to define new endpoints in web for api-versioning.md #50743

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kimlisa
Copy link
Contributor

@kimlisa kimlisa commented Jan 3, 2025

@avatus raised a good question on this PR #50472 (comment) that introduces v2 endpoints, about how to move forward with paths that are the same but with differing HTTP verbs.

we used to create a variable with a path defined, but this path can be used for multiple verbs (mostly POST and PUT), which makes it hard to differentiate v2 endpoints

Comment on lines +174 to +177
// TODO(<your-github-handle>): DELETE IN 18.0 - replaced by /v2/webapi/users
create: '/v1/webapi/users',
createV2: '/v2/webapi/users',
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'd only need the verbV2 if we plan on using both (like a fallback for example). Otherwise, the current client should just have the version it plans on using.

So I think this specific pattern is fine, I just don't think we'll be using it too often

@avatus avatus added the no-changelog Indicates that a PR does not require a changelog entry label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry rfd Request for Discussion size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants