Repository navigation
chore: name a dotted query parameter, as FHIR writes a chained search - #17
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The API's spec at
1.0.0-preview.10searchesHealthcareServiceby its location's address with FHIR's chained search parameters,location.address-state,location.address-postalcodeandlocation.address-city, and byorganization.identifier. The morning regeneration stopped at the first of them:naming.python_nameturned-and:into_and refused anything else. A dot now becomes_as well, solocation.address-stateis the keyword argumentlocation_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.10spec locally and then discarding the output (the regeneration pull request carries the generated code once this is merged):search_healthcare_servicegainslocation_address_stateandorganization_identifier, sent as("location.address-state", ...), and on that regenerated codepytest(624 passed),mypy,pyright,ruff checkandruff format --checkall pass. On this branch as committed the same checks pass, andscripts/check_public_text.pyfinds nothing.A
chore:title, so this releases nothing. After it merges,gh workflow run regenerate.ymlregenerates the SDK.🤖 Generated with Claude Code