Skip to content

Add Source generation for custom resources #140

Open
@almostchristian

Description

@almostchristian

My company is looking into using more and more custom FHIR resources, So I'm looking to develop a source generator to auto generate the resource code based on the structure definition. My idea is that it will look for files with a name that ends with .StructureDefinition.json and then generate code from those files.

I tried my hand in this but I think this could work.
image

I'm currently working on this branch:
https://github.com/almostchristian/fhir-codegen/tree/feature/sourcegen

Some issues that I'm looking to resolving:

  • change namespace to be the same as the <assemblyname>.<folder.path> instead of the constant namespace. This should be a simple change. supported in latest change
  • nested enum and generic Code<T> property generation, I'm still trying to figure out how to get this to work. supported in latest change

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreRelated to the core functionality, not language specificenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions