Package com.ibm.fhir.openapi.generator
Class FHIROpenApiGenerator
- java.lang.Object
-
- com.ibm.fhir.openapi.generator.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:
- 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 String
APPLICATION_FORM
static String
RESOURCEPACKAGENAME
static String
TYPEPACKAGENAME
-
Constructor Summary
Constructors Constructor Description FHIROpenApiGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addExamples(Class<?> modelClass, javax.json.JsonObjectBuilder definition)
static List<String>
getAllResourceInnerClasses()
static List<String>
getAllTypesList()
static boolean
isApplicableForClass(Class<?> typeModelClass, Class<?> outerModelClass)
static void
main(String[] args)
static void
populateStructureDefinitionMap(Map<Class<?>,StructureDefinition> structureDefinitionMap, String structureDefinitionFile)
-
-
-
Field Detail
-
TYPEPACKAGENAME
public static final String TYPEPACKAGENAME
- See Also:
- Constant Field Values
-
RESOURCEPACKAGENAME
public static final String RESOURCEPACKAGENAME
- See Also:
- Constant Field Values
-
APPLICATION_FORM
public static final String APPLICATION_FORM
- See Also:
- Constant Field Values
-
-
Method Detail
-
populateStructureDefinitionMap
public static void populateStructureDefinitionMap(Map<Class<?>,StructureDefinition> structureDefinitionMap, String structureDefinitionFile) throws Exception
- Throws:
Exception
-
addExamples
public static void addExamples(Class<?> modelClass, javax.json.JsonObjectBuilder definition) throws IOException
- Throws:
IOException
-
-