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

docs(operations): minor adjustments #1076

Merged
merged 3 commits into from
Apr 30, 2024
Merged

Conversation

@vitalik
Copy link
Owner

vitalik commented Feb 9, 2024

Hi @Zerotask

I"m not sure about this part

@api.api_operation([HTTPMethod.POST, HTTPMethod.PATCH], "/path")

this makes it longer, and it is not really a place which people use often or make mistakes...
but redabitliy of the code is degrading...

@Zerotask
Copy link
Contributor Author

Zerotask commented Feb 9, 2024

Hi @Zerotask

I"m not sure about this part

@api.api_operation([HTTPMethod.POST, HTTPMethod.PATCH], "/path")

My intention was to provide a default way which supports auto completion and ensures it's written correctly. For example, some people could accidentally write OPTION instead of OPTIONS or they have to lookup all available HTTP methods on the web.
Personally I also prefer enums over raw strings.

@Zerotask
Copy link
Contributor Author

this makes it longer, and it is not really a place which people use often or make mistakes...
but redabitliy of the code is degrading...

I changed it back.

@vitalik vitalik merged commit 9efa6aa into vitalik:master Apr 30, 2024
27 checks passed
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.

None yet

2 participants