Skip to content

fix: HasParams for deepObject query params with additionalProperties#1629

Merged
ernado merged 2 commits intoogen-go:mainfrom
lwojciechowski:main
Feb 23, 2026
Merged

fix: HasParams for deepObject query params with additionalProperties#1629
ernado merged 2 commits intoogen-go:mainfrom
lwojciechowski:main

Conversation

@lwojciechowski
Copy link
Contributor

@lwojciechowski lwojciechowski commented Feb 23, 2026

HasParam fails for deepObject params with additionalProperties (maps) because Fields is empty and the fallback checks literal key "param" instead of bracket-prefixed keys "param[key]".

This fix allows to create urls as:
https://example.com/customers?filter[name]=John&filter[surname]=Doe

…perties

HasParam failed to detect deepObject query parameters when the schema
uses additionalProperties (map types) instead of named properties.
When Fields was empty, it fell through to a literal key check for the
parameter name, but deepObject encoding produces bracket-suffixed keys.
@lwojciechowski
Copy link
Contributor Author

lwojciechowski commented Feb 23, 2026

Force-pushed the linter fix for the related code.

@ernado ernado merged commit fb46d44 into ogen-go:main Feb 23, 2026
14 of 15 checks passed
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.

2 participants