Package com.ibm.fhir.openapi.generator
Class FHIROpenApiGenerator
- java.lang.Object
-
- com.ibm.fhir.openapi.generator.FHIROpenApiGenerator
-
public class FHIROpenApiGenerator extends java.lang.Object
Generate OpenAPI 3.0 from the HL7 FHIR R4 artifacts and IBM FHIR object model.By default, this class will generate:
- an "all-in-one" OpenAPI definition for the entire api
- 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)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
APPLICATION_FORM
static java.util.List<java.lang.Class<?>>
DATA_EXPORT_TYPES
static java.lang.String
RESOURCEPACKAGENAME
static java.lang.String
TYPEPACKAGENAME
-
Constructor Summary
Constructors Constructor Description FHIROpenApiGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addExamples(java.lang.Class<?> modelClass, jakarta.json.JsonObjectBuilder definition)
static java.util.List<java.lang.String>
getAllResourceInnerClasses()
static java.util.List<java.lang.String>
getAllTypesList()
static java.util.List<java.lang.String>
getClassNames()
static boolean
isApplicableForClass(java.lang.Class<?> typeModelClass, java.lang.Class<?> outerModelClass)
static void
main(java.lang.String[] args)
static void
populateStructureDefinitionMap(java.util.Map<java.lang.Class<?>,StructureDefinition> structureDefinitionMap, java.lang.String structureDefinitionFile)
-
-
-
Field Detail
-
DATA_EXPORT_TYPES
public static final java.util.List<java.lang.Class<?>> DATA_EXPORT_TYPES
-
TYPEPACKAGENAME
public static final java.lang.String TYPEPACKAGENAME
- See Also:
- Constant Field Values
-
RESOURCEPACKAGENAME
public static final java.lang.String RESOURCEPACKAGENAME
- See Also:
- Constant Field Values
-
APPLICATION_FORM
public static final java.lang.String APPLICATION_FORM
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
populateStructureDefinitionMap
public static void populateStructureDefinitionMap(java.util.Map<java.lang.Class<?>,StructureDefinition> structureDefinitionMap, java.lang.String structureDefinitionFile) throws java.lang.Exception
- Throws:
java.lang.Exception
-
addExamples
public static void addExamples(java.lang.Class<?> modelClass, jakarta.json.JsonObjectBuilder definition) throws java.io.IOException
- Throws:
java.io.IOException
-
getClassNames
public static java.util.List<java.lang.String> getClassNames()
-
getAllTypesList
public static java.util.List<java.lang.String> getAllTypesList()
-
getAllResourceInnerClasses
public static java.util.List<java.lang.String> getAllResourceInnerClasses()
-
isApplicableForClass
public static boolean isApplicableForClass(java.lang.Class<?> typeModelClass, java.lang.Class<?> outerModelClass)
- Returns:
- true if the type model class is applicable for the outer model class
-
-