-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for the creation of FHIR Profiles + Metadata without the passing of string paths to JavaScript files #249
Comments
That's a great news !
Geoffrey BAUDIN
…________________________________
De : zeevosec <[email protected]>
Envoyé : mardi 8 septembre 2020 01:07
À : Asymmetrik/node-fhir-server-core <[email protected]>
Cc : Ahryman40k <[email protected]>; Mention <[email protected]>
Objet : [Asymmetrik/node-fhir-server-core] Allow for the creation of FHIR resources + services + metadata without the passing of string paths to JavaScript files (#249)
Do you want to request a feature, report a bug, or improve documentation?
feature
Currently, node-fhir-server-core works by providing the server with paths to JavaScript files, in which node-fhir-server-core then requires these modules in order to create REST + Search endpoints. But there is a problem with this design: File paths may not exist (dealing with relative pathing vs absolute pathing decreases Developer Experience), and more importantly: You cannot support TypeScript or Babel-ified projects. The reason being, is that transpiling changes file names and file locations.
I order to support a multitude of Developer Experiences and environments, node-fhir-server-core should support the creation of FHIR resource endpoints programmatically in the form of a addService, addMetadata API.
Thanks @Ahryman40k<https://github.com/Ahryman40k> and Issue #213<#213> for highlighting this issue.
A final solution has yet to be agreed upon.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#249>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABSIXTPQX3KEST5Q4MI5FS3SEVRUVANCNFSM4Q7AX7MQ>.
|
Right-- so I want to get some work done on this and do a 3.0.0 release along with #256 I'm thinking of a new way to use
Thoughts? Perhaps there is a better way of doing this? |
Hi @zeevosec, You come here with an OOP solution. But depending of what Hope this helps to start a discussion |
Hi @zeevosec. |
If you migrate to Typescript, I will be pleased to help ^^ |
I really like a decorator solution @Ahryman40k. What does this look like from the library consumer's point of view? I also would like to migrate to TypeScript! @sychus |
With a Typescript library, you can use Javascript or Typescript client code. class C {
@enumerable(false)
method() { }
}
function enumerable(value) {
return function (target, key, descriptor) {
descriptor.enumerable = value;
return descriptor;
}
} I also invite you to read this article. Even if these mechanisms are mostly used in Typescript with Angular, they are available in Javascript ! Even If I'm not 100% sure, I think it's available for ES5. It means from consumer point of view, there is no need to move to Typescript. Although I strongly encouraged them to do so for a lot of reasons :) |
I believe the "@" syntax is still experimental, meaning consumers would be required to be either in TypeScript or in an experimental NodeJS release. Correct me if I'm wrong. I want to find a way where older node versions are supported, and TypeScript is not a requirement for consumers. |
@zeevosec
You think above what version ? I don't know how to use this. |
Closing stale issue. Please reopen if this is a mistake |
Do you want to request a feature, report a bug, or improve documentation?
feature
Currently,
node-fhir-server-core
works by providing the server with paths to JavaScript files, in whichnode-fhir-server-core
thenrequire
s these modules in order to create REST + Search endpoints. But there is a problem with this design: File paths may not exist (dealing with relative pathing vs absolute pathing decreases Developer Experience), and more importantly: You cannot support TypeScript or Babel-ified projects. The reason being, is that transpiling changes file names and file locations.I order to support a multitude of Developer Experiences and environments,
node-fhir-server-core
should support the creation of FHIR resource endpoints programmatically in the form of aaddService
,addMetadata
API.Thanks @Ahryman40k and Issue #213 for highlighting this issue.
A final solution has yet to be agreed upon.
The text was updated successfully, but these errors were encountered: