Class GraphQLGeneratorMetadata
java.lang.Object
org.brapi.schematools.core.graphql.metadata.GraphQLGeneratorMetadata
- All Implemented Interfaces:
Metadata,Validatable
Provides metadata for the GraphQL generation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GraphQLGeneratorMetadataload()Load the default metadatastatic GraphQLGeneratorMetadataload(InputStream inputStream) Load the metadata from an metadata input stream in YAML or Json.static GraphQLGeneratorMetadataLoad the metadata from a metadata file in YAML or Json.override(GraphQLGeneratorMetadata overrideMetadata) Overrides the values in this Options Object from the provided Options Object if they are non-nullMethods 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
-
GraphQLGeneratorMetadata
public GraphQLGeneratorMetadata()
-
-
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
-