Class OpenAPIGeneratorMetadata
java.lang.Object
org.brapi.schematools.core.openapi.generator.metadata.OpenAPIGeneratorMetadata
- All Implemented Interfaces:
Metadata,Validatable
Provides metadata for the OpenAPI generation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTitleFor(String name) Gets the specification title for a specification generated for a module or classstatic OpenAPIGeneratorMetadataload()Load the default metadatastatic OpenAPIGeneratorMetadataload(InputStream inputStream) Load the metadata from an metadata input stream in YAML or Json.static OpenAPIGeneratorMetadataLoad the metadata from a metadata file in YAML or Json.override(OpenAPIGeneratorMetadata overrideMetadata) Overrides the values in this Options Object from the provided Options Object if they are non-nullsetTitleFor(String name, String title) Sets the specification title for a specification generated for a module or classMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.brapi.schematools.core.validiation.Validatable
validate
-
Constructor Details
-
OpenAPIGeneratorMetadata
public OpenAPIGeneratorMetadata()
-
-
Method Details
-
load
Load the default metadata- Returns:
- The default metadata
-
load
Load the metadata from a metadata file in YAML or Json. The metadata file may have missing (defined) values, in these cases the default values are loaded. Seeload()- Parameters:
metadataFile- The path to the metadata file in YAML or Json.- Returns:
- The metadata loaded from the YAML or Json file.
- Throws:
IOException- if the metadata file can not be found or is incorrectly formatted.
-
load
Load the metadata from an metadata input stream in YAML or Json. The metadata file may have missing (defined) values, in these cases the default values are loaded. Seeload()- Parameters:
inputStream- The input stream in YAML or Json.- Returns:
- The metadata loaded from input stream.
- Throws:
IOException- if the input stream is not valid or the content is incorrectly formatted.
-
override
Overrides the values in this Options Object from the provided Options Object if they are non-null- Parameters:
overrideMetadata- the options which will be used to override this Options Object- Returns:
- this options for method chaining
-
getTitleFor
Gets the specification title for a specification generated for a module or class- Parameters:
name- the name of the module or class- Returns:
- the title for a specification generated for a module or class, or the default title
-
setTitleFor
Sets the specification title for a specification generated for a module or class- Parameters:
name- the name of the module or classtitle- the title for a specification generated for a module or class- Returns:
- the options for chaining
-