Skip to content

chore: name a dotted query parameter, as FHIR writes a chained search - #17

Merged
briankfung merged 1 commit into
mainfrom
dotted-query-parameters
Oct 21, 2026
Merged

briankfung merged 1 commit into
mainfrom
dotted-query-parameters

Conversation

@briankfung

Copy link
Copy Markdown
Member

The API's spec at 1.0.0-preview.10 searches HealthcareService by its location's address with FHIR's chained search parameters, location.address-state, location.address-postalcode and location.address-city, and by organization.identifier. The morning regeneration stopped at the first of them:

ValueError: the query parameter 'location.address-state' has no Python name: 'location.address_state'

naming.python_name turned - and : into _ and refused anything else. A dot now becomes _ as well, so location.address-state is the keyword argument location_address_state. The request still sends the parameter under its own name, and the generator still refuses two parameters that would share a Python name.

Verified by regenerating from the live 1.0.0-preview.10 spec locally and then discarding the output (the regeneration pull request carries the generated code once this is merged): search_healthcare_service gains location_address_state and organization_identifier, sent as ("location.address-state", ...), and on that regenerated code pytest (624 passed), mypy, pyright, ruff check and ruff format --check all pass. On this branch as committed the same checks pass, and scripts/check_public_text.py finds nothing.

A chore: title, so this releases nothing. After it merges, gh workflow run regenerate.yml regenerates the SDK.

🤖 Generated with Claude Code

The generator gave a query parameter a keyword argument by turning `-` and `:` into `_`, and
refused any other character. FHIR's chained search parameters carry a dot
(`location.address-state`, `organization.identifier`), so the API's spec at 1.0.0-preview.10, which
searches HealthcareService by its location's address, could not be generated. A dot now becomes
`_` too: `location_address_state`. The request still sends the parameter under its own name, and
two parameters that would share a Python name are still refused.
@briankfung
briankfung merged commit f587063 into main Oct 21, 2026
10 checks passed
@briankfung
briankfung deleted the dotted-query-parameters branch October 21, 2026 20:03
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