WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Discussion options

You must be logged in to vote

If the return type is properly documented in the OpenAPI spec for the API, then there should be a Response.parsed field with the data deserialized already. You can also access this faster by calling the sync() method in the API module instead of sync_detailed() (if you don't need anything else on the Response object).

If the response type is not documented in the OpenAPI spec, then openapi-python-client has no way of knowing how to deserialize it, so you'll have to do it yourself. Your best bet might be to add a preprocessor to modify the openapi.yml before running the generator to insert the appropriate OpenAPI types.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pll
Comment options

Answer selected by pll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants