Skip to content

Surface enum values for query parameters - #14

Open
dm1tryG wants to merge 1 commit into
mainfrom
fix/issue-8-query-param-enums
Open

Surface enum values for query parameters#14
dm1tryG wants to merge 1 commit into
mainfrom
fix/issue-8-query-param-enums

Conversation

@dm1tryG

@dm1tryG dm1tryG commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Parameter now carries enum values parsed from the query/path parameter schema (mirroring how RequestBody already keeps its schema dict).
  • Generated --help text for enum-constrained query params now shows (one of: low, medium, high), consistent with how body fields already document enums.

Test plan

  • uv run pytest — 32 passed
  • New parser test confirms enum is captured for a query param and None for non-enum params
  • New e2e test confirms the generated CLI's --help output actually lists the enum values

Closes #8

Parameter now carries the enum values from its OpenAPI schema (like
RequestBody already does), and the generated --help text lists them
as "one of: a, b, c" — consistent with how request-body fields already
document their enums, so callers don't have to guess valid values or
go read the OpenAPI spec separately.

Closes #8
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.

Enum values are dropped for query parameters (only body fields keep them)

1 participant