public class SchemaGenerator extends Object
Constructor and Description |
---|
SchemaGenerator(SchemaGeneratorConfig config)
Constructor.
|
SchemaGenerator(SchemaGeneratorConfig config,
TypeContext context)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SchemaBuilder |
buildMultipleSchemaDefinitions()
Create a
SchemaBuilder instance for collecting schema references via
createSchemaReference() until finalizing the generation via
collectDefinitions() . |
com.fasterxml.jackson.databind.node.ObjectNode |
generateSchema(Type mainTargetType,
Type... typeParameters)
Generate a
JsonNode containing the JSON Schema representation of the given type. |
public SchemaGenerator(SchemaGeneratorConfig config)
config
- configuration to be appliedpublic SchemaGenerator(SchemaGeneratorConfig config, TypeContext context)
config
- configuration to be appliedcontext
- type resolution/introspection context to be used during schema generations (across multiple schema generations)public com.fasterxml.jackson.databind.node.ObjectNode generateSchema(Type mainTargetType, Type... typeParameters)
JsonNode
containing the JSON Schema representation of the given type.mainTargetType
- type for which to generate the JSON SchematypeParameters
- optional type parameters (in case of the mainTargetType
being a parameterised type)public SchemaBuilder buildMultipleSchemaDefinitions()
SchemaBuilder
instance for collecting schema references via
createSchemaReference()
until finalizing the generation via
collectDefinitions()
.
Copyright © 2021 VicTools. All rights reserved.