@Documented @Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) @Inherited @PropertyStoreApply(value=JsonSchemaConfigApply.class) public @interface JsonSchemaConfig
JsonSchemaGenerator
.
Used primarily for specifying bean configuration properties on REST classes and methods.
Modifier and Type | Optional Element and Description |
---|---|
String |
addDescriptionsTo
Configuration property: Add descriptions to types.
|
String |
addExamplesTo
Configuration property: Add examples.
|
String |
allowNestedDescriptions
Configuration property: Allow nested descriptions.
|
String |
allowNestedExamples
Configuration property: Allow nested examples.
|
Class<? extends BeanDefMapper> |
beanDefMapper
Configuration property: Bean schema definition mapper.
|
CS[] |
defaultSchemas
Configuration property: Default schemas.
|
String |
ignoreTypes
Configuration property: Ignore types from schema definitions.
|
int |
rank
Optional rank for this config.
|
String |
useBeanDefs
Configuration property: Use bean definitions.
|
public abstract int rank
Can be used to override default ordering and application of config annotations.
public abstract String addDescriptionsTo
Identifies which categories of types that descriptions should be automatically added to generated schemas.
The description is the result of calling ClassMeta.getFullName()
.
public abstract String addExamplesTo
Identifies which categories of types that examples should be automatically added to generated schemas.
The examples come from calling ClassMeta.getExample(BeanSession)
which in turn gets examples
from the following:
public abstract String allowNestedDescriptions
Identifies whether nested descriptions are allowed in schema definitions.
public abstract String allowNestedExamples
Identifies whether nested examples are allowed in schema definitions.
public abstract Class<? extends BeanDefMapper> beanDefMapper
Interface to use for converting Bean classes to definition IDs and URIs.
Used primarily for defining common definition sections for beans in Swagger JSON.
JsonSchemaGenerator.JSONSCHEMA_useBeanDefs
is not enabled.
public abstract CS[] defaultSchemas
Allows you to override or provide custom schema information for particular class types.
public abstract String ignoreTypes
Defines class name patterns that should be ignored when generating schema definitions in the generated Swagger documentation.
public abstract String useBeanDefs
When enabled, schemas on beans will be serialized as the following:
{
type:
The definitions can then be retrieved from the session using JsonSchemaGeneratorSession.getBeanDefs()
.
Definitions can also be added programmatically using JsonSchemaGeneratorSession.addBeanDef(String, ObjectMap)
.
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.