Class GraphQLMarkdownGenerator
java.lang.Object
org.brapi.schematools.core.markdown.GraphQLMarkdownGenerator
Generates a Markdown files for type and their field descriptions from a GraphQL Schema.
For each type in the schema a Markdown file with the same name as the type will be created.
For each field in a type a Markdown file with same name as the type will be created.
For each field in the Query type in the schema a Markdown file with the same name as the field will be created.
For each argument for each field in the Query type in a type a Markdown file with same name as the type will be created.
See the options to configure the generator
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongenerate(graphql.schema.GraphQLSchema schema) Generates Markdown files for type definitions and their field descriptions, query definitions and their arguments descriptions from the GraphQL schemastatic GraphQLMarkdownGeneratorCreates the default Generator.options(GraphQLMarkdownGeneratorOptions options) Overwrite the files if present.outputPath(Path outputPath) Sets the output path.
-
Field Details
-
LIST_RESPONSE_PATTERN
Pattern for List Response names -
SEARCH_RESPONSE_PATTERN
Pattern for Search Response names -
RESPONSE_PATTERN
Pattern for other Response names -
INPUT_PATTERN
Pattern for Input names
-
-
Method Details
-
generator
Creates the default Generator.- Parameters:
outputPath- the output path for markdown files.- Returns:
- the default Generator
-
outputPath
Sets the output path.- Parameters:
outputPath- the output path for markdown files.- Returns:
- the writer for method chaining
-
options
Overwrite the files if present.- Parameters:
options- the generator options- Returns:
- the writer for method chaining
-
generate
Generates Markdown files for type definitions and their field descriptions, query definitions and their arguments descriptions from the GraphQL schema- Parameters:
schema- the path to the complete BrAPI Specification- Returns:
- the paths of the Markdown files generated from the complete BrAPI Specification
-