Fix concept-code lookups containing slashes
Merged
KO
1mo ago+45+45+01234567890123456789-6-6-0123456789
Summary
- percent-encode vocabulary IDs and concept codes as individual URL path segments
- preserve slash-containing ICD-O codes such as 8032/3 as a single route parameter
- cover synchronous and asynchronous clients with regression tests
Validation
- uv run --extra dev pytest tests/unit/resources/test_concepts.py -q (40 passed)
- uv run --extra dev ruff check src/ tests/unit/resources/test_concepts.py
- uv run --extra dev ruff format --check src/ tests/unit/resources/test_concepts.py
- uv run --extra dev mypy src/omophub
Summary by cubic
Fixes concept lookups so codes containing slashes, like ICD-O 8032/3, are sent as one URL path segment instead of being split into multiple parameters.
- Percent-encodes vocabulary IDs and concept codes in
get_by_codefor both sync and async clients. - Clarifies in the docstrings that
vocabulary_idandconcept_codemust be raw, URL-unencoded values. - Adds regression tests covering slash-containing codes for both clients.