Skip to content

Conversation

jamietanna
Copy link
Member

As highlighted in #658, in the case that a query parameter is optional,
and is not JSON, a passthrough type or a styled parameter, we are
rendering an empty method.

To simplify our generated code, we can only generate it as and when it's
required.

To make this more readable, we can indent this new optional block in the
template.

Closes #658.

As highlighted in oapi-codegen#658, in the case that a query parameter is optional,
and is not JSON, a passthrough type or a styled parameter, we are
rendering an empty method.

To simplify our generated code, we can only generate it as and when it's
required.

To make this more readable, we can indent this new optional block in the
template.

Closes oapi-codegen#658.
@deepmap-marcinr deepmap-marcinr merged commit e9d89b2 into oapi-codegen:master Jul 25, 2022
adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
…odegen#671)

As highlighted in oapi-codegen#658, in the case that a query parameter is optional,
and is not JSON, a passthrough type or a styled parameter, we are
rendering an empty method.

To simplify our generated code, we can only generate it as and when it's
required.

To make this more readable, we can indent this new optional block in the
template.

Closes oapi-codegen#658.
adrianpk added a commit to foorester/oapi-codegen that referenced this pull request May 31, 2024
…odegen#671)

As highlighted in oapi-codegen#658, in the case that a query parameter is optional,
and is not JSON, a passthrough type or a styled parameter, we are
rendering an empty method.

To simplify our generated code, we can only generate it as and when it's
required.

To make this more readable, we can indent this new optional block in the
template.

Closes oapi-codegen#658.
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.

Bug: useless code generated for optional query parameters
2 participants