Class DefaultSchemaDefinitionNamingStrategy
java.lang.Object
com.github.victools.jsonschema.generator.naming.DefaultSchemaDefinitionNamingStrategy
- All Implemented Interfaces:
SchemaDefinitionNamingStrategy,StatefulConfig
public class DefaultSchemaDefinitionNamingStrategy
extends Object
implements SchemaDefinitionNamingStrategy
Default implementation of a
SchemaDefinitionNamingStrategy using the output of TypeContext.getSimpleTypeDescription(ResolvedType)
as definition name/key.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDefinitionNameForKey(DefinitionKey key, SchemaGenerationContext generationContext) Getter for the name/key in the "definitions"/"$defs" to represent the givenDefinitionKey.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.victools.jsonschema.generator.naming.SchemaDefinitionNamingStrategy
adjustDuplicateNames, adjustNullableNameMethods inherited from interface com.github.victools.jsonschema.generator.StatefulConfig
resetAfterSchemaGenerationFinished
-
Constructor Details
-
DefaultSchemaDefinitionNamingStrategy
public DefaultSchemaDefinitionNamingStrategy()
-
-
Method Details
-
getDefinitionNameForKey
Description copied from interface:SchemaDefinitionNamingStrategyGetter for the name/key in the "definitions"/"$defs" to represent the givenDefinitionKey.- Specified by:
getDefinitionNameForKeyin interfaceSchemaDefinitionNamingStrategy- Parameters:
key- definition reference for a type (there may be multiple different keys for the same type if custom definitions are involved)generationContext- generation context providing access to the applied configuration and type context- Returns:
- name/key in "definitions"/"$defs" for the indicated subschema
- See Also:
-