Skip to content

Fix error handler for required query parameters#857

Merged
deepmap-marcinr merged 1 commit intooapi-codegen:masterfrom
abdollahpour:fix-required-query-parameters
Nov 21, 2022
Merged

Fix error handler for required query parameters#857
deepmap-marcinr merged 1 commit intooapi-codegen:masterfrom
abdollahpour:fix-required-query-parameters

Conversation

@abdollahpour
Copy link
Contributor

If at the parameters of the API, it has a required field in queries, the generated code breaks since the ErrorHandler does not have any return value. But in the template, it has been used in a condition (expects a boolean return).
This fix simply changes the usage aligned with the other part of the template.

@alexstojda
Copy link
Contributor

Also encountering this error and would appreciate this PR being merged 🙏🏼

@jamietanna
Copy link
Member

FYI @deepmap-marcinr - happy if I merge + release this as a patch release?

@deepmap-marcinr deepmap-marcinr merged commit 0138e13 into oapi-codegen:master Nov 21, 2022
@deepmap-marcinr
Copy link
Contributor

@jamietanna - sure, make a patch release.

@jamietanna
Copy link
Member

adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
adrianpk added a commit to foorester/oapi-codegen that referenced this pull request May 31, 2024
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.

4 participants