Skip to content
This repository has been archived by the owner on Oct 21, 2021. It is now read-only.

Create basic build pipeline for FHIR 4.6.0 <> TS definitions #1

Closed
3 tasks done
jdjkelly opened this issue May 10, 2021 · 0 comments
Closed
3 tasks done

Create basic build pipeline for FHIR 4.6.0 <> TS definitions #1

jdjkelly opened this issue May 10, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jdjkelly
Copy link
Contributor

jdjkelly commented May 10, 2021

Goal

Be able to run npm run build and have it build TypeScript definitions for FHIR 4.6.0 and output them to /dist. Would be nice if it globed up descriptions as comments on fields etc.

Open problems

  • Can we use Quicktype to convert the 4.6.0 fhir.schema.json to TypeScript? Do we need to use the GraphQL definitions instead?
  • Do we need to commit fhir.schema.json? Should we have a download script instead? Maybe doesn't matter right now. More important to just get one working
  • 4.6.0 at least (maybe earlier) has a graphql export as well, which is interesting

Attempted solutions

quicktype/quicktype

npx quicktype -s schema ./src/fhir/4.6.0/fhir.schema.json -o dist/fhir.ts

This fails with a stack overflow. Same issue as glideapps/quicktype#1376.

bcherny/json-schema-to-typescript

node attempt-json-schema-to-typescript.js

Hangs. Same issue as bcherny/json-schema-to-typescript#323

PlasmaFHIROrg/TypeScript-FHIR

Doesn't fully run, and exports them to TypeScript classes but this is probably a good start. Something similar to this could work.

@jdjkelly jdjkelly self-assigned this May 10, 2021
@jdjkelly jdjkelly added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed and removed good first issue Good for newcomers labels May 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant