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

[0.0.1] Simplify openapi client responses #16

Open
Tzrlk opened this issue Aug 13, 2024 · 2 comments
Open

[0.0.1] Simplify openapi client responses #16

Tzrlk opened this issue Aug 13, 2024 · 2 comments
Labels
go Pull requests that update Go code

Comments

@Tzrlk
Copy link
Owner

Tzrlk commented Aug 13, 2024

Generically, it could be done by replacing JSON200, JSON400, etc with JSON, e.g. JSONApiError.
Then there'd be fewer things that need checking.

Might end up having to customise the templates even further to fit a standard generic structure.

@Tzrlk Tzrlk added the go Pull requests that update Go code label Aug 13, 2024
@Tzrlk
Copy link
Owner Author

Tzrlk commented Aug 14, 2024

Due to the use of the genResponseUnmarshal template helper when parsing responses, It'll be impossible to revise the response generation without essentially just replacing it. Might be possible with some annoying loop logic and conditionals in the template.

@Tzrlk
Copy link
Owner Author

Tzrlk commented Aug 14, 2024

Correction, not possible if any of the schemas contain advanced logic such as anyOf or oneOf relationships.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

No branches or pull requests

1 participant