public interface SchemaDefinitionNamingStrategy
Modifier and Type | Method and Description |
---|---|
default void |
adjustDuplicateNames(Map<DefinitionKey,String> subschemasWithDuplicateNames,
SchemaGenerationContext generationContext)
Adjust the names/keys in the "definitions"/"$defs" for the given definition references that have the same names (according to
getDefinitionNameForKey(DefinitionKey, SchemaGenerationContext) ) to ensure their uniqueness. |
default String |
adjustNullableName(DefinitionKey key,
String definitionName,
SchemaGenerationContext generationContext)
Provide an alternative definition name for the given key and name when it is nullable.
|
String |
getDefinitionNameForKey(DefinitionKey key,
SchemaGenerationContext generationContext)
Getter for the name/key in the "definitions"/"$defs" to represent the given
DefinitionKey . |
String getDefinitionNameForKey(DefinitionKey key, SchemaGenerationContext generationContext)
DefinitionKey
.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 contextSchemaGenerationContext.getGeneratorConfig()
,
SchemaGenerationContext.getTypeContext()
default void adjustDuplicateNames(Map<DefinitionKey,String> subschemasWithDuplicateNames, SchemaGenerationContext generationContext)
getDefinitionNameForKey(DefinitionKey, SchemaGenerationContext)
) to ensure their uniqueness.
subschemasWithDuplicateNames
- definition references that initially have the same values that should be adjustedgenerationContext
- generation context providing access to the applied configuration and type contextgetDefinitionNameForKey(DefinitionKey, SchemaGenerationContext)
default String adjustNullableName(DefinitionKey key, String definitionName, SchemaGenerationContext generationContext)
"-nullable"
suffix will be appended.key
- definition reference for a type (there may be multiple different keys for the same type if custom definitions are involved)definitionName
- previous result of getDefinitionNameForKey(DefinitionKey, SchemaGenerationContext)
to be adjustedgenerationContext
- generation context providing access to the applied configuration and type contextCopyright © 2022 VicTools. All rights reserved.