Closed mst-ableton closed 1 year ago
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'}})
Looks good to me, thanks.
@mst-ableton Was there a rationale behind including the http method always? Asking because of #88
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!