Repository navigation
OpenConceptLab/ocl_online#451 | The FHIR host serves its own Swagger page of the terminology operations - #957
Merged
snyaggarwal merged 3 commits intoOct 23, 2026
Conversation
…page of the terminology operations On the FHIR host, /swagger/ (and swagger.json, swagger.yaml) describes the FHIR terminology service alone: search and read of CodeSystem, ValueSet and ConceptMap, $lookup, $validate-code, $expand, $translate, metadata and $versions, at /fhir and the owner bases. Each operation is listed once, tagged by resource type, with its query parameters, a Parameters body for POST, and OperationOutcome errors. Writes and the slash and no-slash duplicates are left out, and Try it out calls the FHIR host itself. When FHIR has its own host, the API's Swagger leaves the FHIR paths out (they answer 404 there) and links to the FHIR page. When FHIR shares the host, the API's Swagger lists the same curated operations instead of the generated ones. The other API operations are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R8hw7w8753DDSCezrmrDA8
…ng replaces When a coding or codeableConcept is given, the operations don't read the separate inputs it stands for: code and system for $lookup (version still selects the code system version), code and display for CodeSystem $validate-code (url and version still name the code system), code, system, systemVersion and display for ValueSet $validate-code, and code, system and version for $translate. Each operation's coding parameter now names them, and each of those inputs says it isn't read alongside a coding. A GET coding token carries no version or display; a POSTed valueCoding does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R8hw7w8753DDSCezrmrDA8
…names an instance alongside a coding At the type level, $lookup takes the code system from a coding, so a separate system has no effect; at an instance, a separate system must still name that code system, as without a coding. Its description now says so instead of saying it isn't read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R8hw7w8753DDSCezrmrDA8
Member
Author
Review loop (Codex passes 1–3, simplification)
The full findings are on the tracking ticket. |
snyaggarwal
approved these changes
Oct 23, 2026
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.
A Swagger page for the FHIR terminology service
Follows #956 and is stacked on its branch; it gets retargeted to
masteronce #956 merges. Tracking: OpenConceptLab/ocl_online#451.Why: when FHIR has its own host (
FHIR_SUBDOMAIN), the API host answers FHIR paths with a 404. Today's Swagger page still lists them, each up to four times (with and without a trailing slash, plus malformed forms such as/fhir/CodeSystem$lookup), with write methods FHIR doesn't serve and internal docstrings. "Try it out" on them fails.What changes
/swagger/,/swagger.jsonand/swagger.yaml. It describes the FHIR terminology service alone, and "Try it out" calls that host.$lookup; CodeSystem and ValueSet$validate-code;$expand;$translate;metadata; and$versions. Each is listed at/fhirand at the owner bases/orgs/{org}and/users/{user}.Parametersbody for POST, and OperationOutcome errors.codingreplaces.FhirMiddleware: it opens only the three documentation paths on the FHIR host. The Swagger UI's static files are served ahead of it, as they are today, and the middleware order is unchanged.Testing
core/fhir).core/fhir/tests_swagger.py:python manage.py generate_swaggeralready fails onmaster, in a bulk-import view, so this PR leaves it alone. The HTTP schema endpoints work.Review
Codex reviewed it in three passes. Passes 1 and 2 each found a description that over-promised what an input does alongside a
coding, and both are fixed; pass 3 was clean. A simplification review proposed one cut, which was declined.🤖 Generated with Claude Code
https://claude.ai/code/session_01R8hw7w8753DDSCezrmrDA8