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 support for operationID #41

Merged
merged 1 commit into from
Aug 20, 2023

Conversation

mst-ableton
Copy link
Contributor

This generates an operationID from the HTTP method and function name, or allows for overriding the part after the HTTP method.

Please let me know if I should add more testing/documentation or if there is a better approach to accomplish this!

This generates an operationID from the HTTP method and function name, or
allows for overriding the part after the HTTP method.
@mst-ableton
Copy link
Contributor Author

An example of where this is useful: the openapi3 library can directly make calls to endpoints with an operationID specified. Here's a theoretical example based on the quart-schema README:

import requests
from openapi3 import OpenAPI

api = OpenAPI(requests.get('http://localhost:8080/openapi.json').get_json())

api.call_post_create_todo(data={'todo': {'task': 'buy milk'}})

@pgjones
Copy link
Owner

pgjones commented Aug 20, 2023

Looks good to me, thanks.

@pgjones pgjones merged commit a4a76d1 into pgjones:main Aug 20, 2023
@DanielHabenicht
Copy link

@mst-ableton Was there a rationale behind including the http method always? Asking because of #88

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.

3 participants