这是indexloc提供的服务,不要输入任何密码
Skip to content

fix: ensure PATCH operation IDs are unique #66

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

Merged
merged 1 commit into from
Sep 12, 2022
Merged

Conversation

danielgtaylor
Copy link
Owner

@danielgtaylor danielgtaylor commented Sep 12, 2022

This PR fixes:

  • Operations using the same resource model will now get unique PATCH operation IDs as long as their existing GET operations have unique IDs. This should easily handle any operation that can be split by casing.Split, e.g. get-foo, get_foo, getFoo, or GetFoo and turn it into patch-foo. If the operation doesn't start with a get or fetch, then we just prepend patch- to the existing operation ID.

Additionally:

  • HTTP 415 responses are properly listed as returning application/problem+json like other errors
  • PATCH operations now all have a default description set for documentation.

Existing tests continue to pass and provide coverage for the modified code.

@danielgtaylor danielgtaylor merged commit 518e34c into main Sep 12, 2022
@danielgtaylor danielgtaylor deleted the patch-id-fix branch September 12, 2022 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant