23 typescript profile as an adapter#25
Closed
octoshikari wants to merge 5 commits intomainfrom
Closed
Conversation
54d2ef4 to
7e5484e
Compare
# Conflicts: # src/api/builder.ts
f8d4b12 to
36315eb
Compare
ryukzak
requested changes
Nov 21, 2025
Collaborator
ryukzak
left a comment
There was a problem hiding this comment.
If it is possible on the current stage, it will be nice to split this PR into three:
- Logger tests.
- Refactoring of TS generator.
- Profile generation implementation.
|
|
||
| if (needsExtensionForExtensions) { | ||
| const isSamePackage = "hl7.fhir.r4.core" === schemaPackage; | ||
| const extensionPath = isSamePackage ? "../Extension" : "../../hl7-fhir-r4-core/Extension"; |
Collaborator
There was a problem hiding this comment.
It looks like importing always via ../../<package> will be more regular. Here and in other place
| if (["complex-type", "resource", "logical"].includes(dep.kind)) { | ||
| let tsPackage: string; | ||
| if (isSamePackage) { | ||
| tsPackage = isProfile ? `../${pascalCase(dep.name)}` : `./${pascalCase(dep.name)}`; |
Collaborator
There was a problem hiding this comment.
Better to wrap it in a more domain-specific function, like tsPackageName.
| const needsExtensionForExtensions = isProfile && schema.extensions && schema.extensions.length > 0; | ||
|
|
||
| if (needsExtensionForExtensions) { | ||
| const isSamePackage = "hl7.fhir.r4.core" === schemaPackage; |
Collaborator
There was a problem hiding this comment.
Package names shouldn't be hardcoded here.
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.
No description provided.