Skip to content

Send boolean query parameters as true/false - #35

Merged
pavog merged 1 commit into
masterfrom
boolean-query-format
Oct 19, 2026
Merged

pavog merged 1 commit into
masterfrom
boolean-query-format

Conversation

@pavog

@pavog pavog commented Oct 16, 2026

Copy link
Copy Markdown
Member

Boolean query parameters were sent as 1 and 0, because that is the default of the generated code.
This PR changes them to true and false, which is the format used in the Hangar API documentation.

This affects two parameters:

  • prioritizeExactMatch in getProjects()
  • includeHiddenChannels in getProjectVersions()

The Hangar API accepts both formats:

  • true / false
  • 1 / 0

HangarAPIClient

setConfiguration() sets BOOLEAN_FORMAT_STRING on the configuration of the client. The ObjectSerializer reads the boolean format from the default configuration instead of the one used for the request, so it is set there as well.

Tests

  • The expected values of prioritizeExactMatch and includeHiddenChannels are updated.
  • A new test checks that a client with a custom configuration also sends true/false.

@pavog
pavog requested a review from JulianVennen October 19, 2026 12:37
@pavog
pavog merged commit b9978f4 into master Oct 19, 2026
3 checks passed
@pavog
pavog deleted the boolean-query-format branch October 19, 2026 13:32
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.

1 participant