Class FHIROpenApiGenerator


  • public class FHIROpenApiGenerator
    extends Object
    Generate OpenAPI 3.0 from the HL7 FHIR R4 artifacts and IBM FHIR object model.

    By default, this class will generate:

    1. an "all-in-one" OpenAPI definition for the entire api
    2. a separate OpenAPI definition for each resource type and compartment, with all HTTP interactions enabled

    To limit the output to a given set of resources and/or interactions, pass a set of semicolon-delimited filter strings of the form ResourceType1(interaction1,interaction2). For example:

     Patient(create,read,vread,history,search,update,delete);Contract(create,read,vread,history,search);RiskAssessment(read)
     
    • Constructor Detail

      • FHIROpenApiGenerator

        public FHIROpenApiGenerator()
    • Method Detail

      • addExamples

        public static void addExamples​(Class<?> modelClass,
                                       jakarta.json.JsonObjectBuilder definition)
                                throws IOException
        Throws:
        IOException
      • getClassNames

        public static List<String> getClassNames()
      • getAllTypesList

        public static List<String> getAllTypesList()
      • getAllResourceInnerClasses

        public static List<String> getAllResourceInnerClasses()
      • isApplicableForClass

        public static boolean isApplicableForClass​(Class<?> typeModelClass,
                                                   Class<?> outerModelClass)
        Returns:
        true if the type model class is applicable for the outer model class