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

Override local parameters to global parameters #1181

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

ShouheiNishi
Copy link
Contributor

Fix for #1180

@ShouheiNishi ShouheiNishi marked this pull request as ready for review August 7, 2023 06:34
As this will be something others may want to use.
@jamietanna jamietanna merged commit 1b75d8e into oapi-codegen:master Aug 29, 2023
3 of 4 checks passed
@jamietanna jamietanna added this to the v1.14.0 milestone Aug 29, 2023
@ShouheiNishi ShouheiNishi deleted the param-override branch August 30, 2023 00:20
debuggerpk pushed a commit to breuHQ/oapi-codegen that referenced this pull request Sep 18, 2023
As flagged in oapi-codegen#1180, when a path parameter is defined globally (across
all methods for a given path) as well as locally (for a specific method
in a given path) the code generation fails.

We can handle this with a new method `CombineOperationParameters` that
performs duplication checks, and prioritises the locally-defined
parameter instead.

Closes oapi-codegen#1180.

Co-authored-by: Jamie Tanna <jamie@jamietanna.co.uk>
debuggerpk pushed a commit to breuHQ/oapi-codegen that referenced this pull request Sep 18, 2023
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.

None yet

2 participants