Class GraphQLMarkdownGeneratorOptions
java.lang.Object
org.brapi.schematools.core.markdown.GraphQLMarkdownGeneratorOptions
- All Implemented Interfaces:
Options,Validatable
Options for the
GraphQLGenerator.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDescriptionForArgument(graphql.schema.GraphQLFieldDefinition queryDefinition, graphql.schema.GraphQLArgument argument) Creates the description for a GraphQLArgumentgetDescriptionForEnum(graphql.schema.GraphQLEnumType type) Creates the description for a GraphQLEnumTypegetDescriptionForField(graphql.schema.GraphQLNamedType type, graphql.schema.GraphQLFieldDefinition field) Creates the description for a GraphQLFieldDefinitiongetDescriptionForInputField(graphql.schema.GraphQLInputObjectType type, graphql.schema.GraphQLFieldDefinition queryDefinition, graphql.schema.GraphQLInputObjectField field) Creates the description for a GraphQLInputObjectFieldgetDescriptionForInputObjectType(graphql.schema.GraphQLInputObjectType type, graphql.schema.GraphQLFieldDefinition queryDefinition) Creates the description for a GraphQLInputObjectTypegetDescriptionForInterface(graphql.schema.GraphQLInterfaceType type) Creates the description for a GraphQLInterfaceTypegetDescriptionForListQuery(graphql.schema.GraphQLFieldDefinition query, graphql.schema.GraphQLOutputType dataType, graphql.schema.GraphQLInputType inputType) Creates the query description for a List QuerygetDescriptionForObjectType(graphql.schema.GraphQLObjectType type, graphql.schema.GraphQLOutputType dataType, graphql.schema.GraphQLFieldDefinition queryDefinition) Creates the description for a GraphQLObjectTypegetDescriptionForQuery(graphql.schema.GraphQLFieldDefinition queryDefinition, graphql.schema.GraphQLOutputType dataType, graphql.schema.GraphQLInputType inputType) Creates the query description for a QuerygetDescriptionForSearchQuery(graphql.schema.GraphQLFieldDefinition query, graphql.schema.GraphQLOutputType dataType, graphql.schema.GraphQLInputType inputType) Creates the query description for a Search QuerybooleanDetermines if the Generator should create top level argument descriptions when there is more than one argument with the same name.booleanDetermines if the Generator should create top level field descriptions when there is more than one field with the same name.booleanDetermines if the Generator should create top level input object field descriptions when there is more than one field with the same name.booleanDetermines if the Generator should Overwrite exiting files.load()Load the default optionsload(InputStream inputStream) Load the options from an options input stream in YAML or Json.Load the options from an options file in YAML or Json.override(GraphQLMarkdownGeneratorOptions overrideOptions) Overrides the values in this Options Object from the provided Options Object if they are non-nullvalidate()Checks if the Validatable object is valid, return a list of errors if it is not valid
-
Constructor Details
-
GraphQLMarkdownGeneratorOptions
public GraphQLMarkdownGeneratorOptions()
-
-
Method Details
-
load
Load the default options- Returns:
- The default options
-
load
Load the options from an options file in YAML or Json. The options file may have missing (defined) values, in these cases the default values are loaded. Seeload()- Parameters:
optionsFile- The path to the options file in YAML or Json.- Returns:
- The options loaded from the YAML or Json file.
- Throws:
IOException- if the options file can not be found or is incorrectly formatted.
-
load
Load the options from an options input stream in YAML or Json. The options 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 options loaded from input stream.
- Throws:
IOException- if the input stream is not valid or the content is incorrectly formatted.
-
validate
Description copied from interface:ValidatableChecks if the Validatable object is valid, return a list of errors if it is not valid- Specified by:
validatein interfaceValidatable- Returns:
- a Validation object than can be used queried to find if the object is valid and any errors if it is not valid
-
override
Overrides the values in this Options Object from the provided Options Object if they are non-null- Parameters:
overrideOptions- the options which will be used to override this Options Object- Returns:
- this options for method chaining
-
isOverwritingExistingFiles
public boolean isOverwritingExistingFiles()Determines if the Generator should Overwrite exiting files.- Returns:
trueif the Generator should Overwrite exiting files,falseotherwise
-
getDescriptionForObjectType
public String getDescriptionForObjectType(graphql.schema.GraphQLObjectType type, graphql.schema.GraphQLOutputType dataType, graphql.schema.GraphQLFieldDefinition queryDefinition) Creates the description for a GraphQLObjectType- Parameters:
type- the GraphQLObjectTypedataType- if the type is a Response with a data field, then this is the type of that fieldqueryDefinition- the query associated with the response type- Returns:
- the description for a GraphQLObjectType
-
getDescriptionForInputObjectType
public String getDescriptionForInputObjectType(graphql.schema.GraphQLInputObjectType type, graphql.schema.GraphQLFieldDefinition queryDefinition) Creates the description for a GraphQLInputObjectType- Parameters:
type- the GraphQLInputObjectTypequeryDefinition- the query associated with the input field type- Returns:
- the description for a GraphQLInputObjectType
-
getDescriptionForQuery
public String getDescriptionForQuery(graphql.schema.GraphQLFieldDefinition queryDefinition, graphql.schema.GraphQLOutputType dataType, graphql.schema.GraphQLInputType inputType) Creates the query description for a Query- Parameters:
queryDefinition- the GraphQLFieldDefinitiondataType- if the type is a Response with a data field, then this is the type of that fieldinputType- the query input type- Returns:
- the query description for a GraphQLFieldDefinition
-
getDescriptionForListQuery
public String getDescriptionForListQuery(graphql.schema.GraphQLFieldDefinition query, graphql.schema.GraphQLOutputType dataType, graphql.schema.GraphQLInputType inputType) Creates the query description for a List Query- Parameters:
query- the GraphQLFieldDefinitiondataType- if the type is a Response with a data field, then this is the type of that fieldinputType- the query input type- Returns:
- the query description for a GraphQLFieldDefinition
-
getDescriptionForSearchQuery
public String getDescriptionForSearchQuery(graphql.schema.GraphQLFieldDefinition query, graphql.schema.GraphQLOutputType dataType, graphql.schema.GraphQLInputType inputType) Creates the query description for a Search Query- Parameters:
query- the GraphQLFieldDefinitiondataType- if the type is a Response with a data field, then this is the type of that fieldinputType- the query input type- Returns:
- the query description for a GraphQLFieldDefinition
-
getDescriptionForInterface
Creates the description for a GraphQLInterfaceType- Parameters:
type- the GraphQLInterfaceType- Returns:
- the description for a GraphQLInterfaceType
-
getDescriptionForEnum
Creates the description for a GraphQLEnumType- Parameters:
type- the GraphQLEnumType- Returns:
- the description for a GraphQLEnumType
-
getDescriptionForField
public String getDescriptionForField(graphql.schema.GraphQLNamedType type, graphql.schema.GraphQLFieldDefinition field) Creates the description for a GraphQLFieldDefinition- Parameters:
type- the type to which this field belongsfield- the GraphQLFieldDefinition- Returns:
- the description for a GraphQLFieldDefinition
-
getDescriptionForInputField
public String getDescriptionForInputField(graphql.schema.GraphQLInputObjectType type, graphql.schema.GraphQLFieldDefinition queryDefinition, graphql.schema.GraphQLInputObjectField field) Creates the description for a GraphQLInputObjectField- Parameters:
type- the type to which this field belongsqueryDefinition- the query associated with the input field typefield- the GraphQLInputObjectField- Returns:
- the description for a GraphQLInputObjectField
-
getDescriptionForArgument
public String getDescriptionForArgument(graphql.schema.GraphQLFieldDefinition queryDefinition, graphql.schema.GraphQLArgument argument) Creates the description for a GraphQLArgument- Parameters:
queryDefinition- the query definition to which this field belongsargument- the GraphQLArgument- Returns:
- the description for a GraphQLArgument
-
isCreatingTopLevelFieldDefinitions
public boolean isCreatingTopLevelFieldDefinitions()Determines if the Generator should create top level field descriptions when there is more than one field with the same name.- Returns:
trueif the Generator should create top level field descriptions when there is more than one field with the same name,falseotherwise
-
isCreatingTopLevelInputFieldDefinitions
public boolean isCreatingTopLevelInputFieldDefinitions()Determines if the Generator should create top level input object field descriptions when there is more than one field with the same name.- Returns:
trueif the Generator should create top level input object field descriptions when there is more than one field with the same name,falseotherwise
-
isCreatingTopLevelArgumentDefinitions
public boolean isCreatingTopLevelArgumentDefinitions()Determines if the Generator should create top level argument descriptions when there is more than one argument with the same name.- Returns:
trueif the Generator should create top level argument descriptions when there is more than one argument with the same name,falseotherwise
-