Package org.apache.juneau.jsonschema
Class JsonSchemaGeneratorSession
java.lang.Object
org.apache.juneau.ContextSession
org.apache.juneau.BeanSession
org.apache.juneau.BeanTraverseSession
org.apache.juneau.jsonschema.JsonSchemaGeneratorSession
Session object that lives for the duration of a single use of 
JsonSchemaSerializer.
 Notes:
- This class is not thread safe and is typically discarded after one use.
See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields inherited from class org.apache.juneau.BeanTraverseSessionindent
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor.
- 
Method SummaryModifier and TypeMethodDescriptionaddBeanDef(String id, JsonMap def) Adds a schema definition to this session.Creates a new builder for this object.protected final Set<TypeCategory>Add descriptions to types.protected final Set<TypeCategory>Add examples.getBeanDefId(ClassMeta<?> cm) Returns the definition ID for the specified class.protected final BeanDefMapperBean schema definition mapper.Returns the definitions that were gathered during this session.getBeanDefUri(String id) Returns the definition URI for the specified class.getBeanDefUri(ClassMeta<?> cm) Returns the definition URI for the specified class.Ignore types from schema definitions.Returns the language-specific metadata on the specified bean property.getJsonSchemaClassMeta(ClassMeta<?> cm) Returns the language-specific metadata on the specified class.Returns the JSON-schema for the specified object.Returns the JSON-schema for the specified type.Returns the JSON-schema for the specified type.protected final booleanAllow nested descriptions.protected final booleanAllow nested examples.protected final booleanUse bean definitions.Methods inherited from class org.apache.juneau.BeanTraverseSessiongetInitialDepth, getLastLocation, getMaxDepth, getOptionalType, getOptionalValue, getStack, isDetectRecursions, isIgnoreRecursions, isOptional, isRoot, onError, pop, properties, push, setCurrentClass, setCurrentProperty, willExceedDepth, willRecurseMethods inherited from class org.apache.juneau.BeanSession_class, addWarning, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, create, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionary, getBeanFieldVisibility, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getClassMeta, getClassMeta, getClassMetaForObject, getClassMetaForObject, getLocale, getMediaType, getNamePropertyName, getNotBeanClasses, getNotBeanPackagesNames, getNotBeanPackagesPrefixes, getPropertyNamer, getSwaps, getTimeZone, getTimeZoneId, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isFindFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnoreMissingSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isSortProperties, isUseEnumNames, isUseInterfaceProxies, isUseJavaBeanIntrospector, newBean, newBean, newBeanMap, newBeanMap, newGenericMap, object, string, toArray, toBeanMap, toBeanMap, toBeanMapMethods inherited from class org.apache.juneau.ContextSessioncheckForWarnings, getContext, getSessionProperties, getWarnings, isDebug, toString
- 
Constructor Details- 
JsonSchemaGeneratorSessionConstructor.- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
createCreates a new builder for this object.- Parameters:
- ctx- The context creating this session.
- Returns:
- A new builder.
 
- 
getSchemaReturns the JSON-schema for the specified object.- Parameters:
- o- The object.
 Can either be a POJO or a- Class /- Type .
- Returns:
- The schema for the type.
- Throws:
- BeanRecursionException- Bean recursion occurred.
- SerializeException- Error occurred.
 
- 
getSchemaReturns the JSON-schema for the specified type.- Parameters:
- type- The object type.
- Returns:
- The schema for the type.
- Throws:
- BeanRecursionException- Bean recursion occurred.
- SerializeException- Error occurred.
 
- 
getSchemaReturns the JSON-schema for the specified type.- Parameters:
- cm- The object type.
- Returns:
- The schema for the type.
- Throws:
- BeanRecursionException- Bean recursion occurred.
- SerializeException- Error occurred.
 
- 
getBeanDefIdReturns the definition ID for the specified class.- Parameters:
- cm- The class to get the definition ID of.
- Returns:
- The definition ID for the specified class.
 
- 
getBeanDefUriReturns the definition URI for the specified class.- Parameters:
- cm- The class to get the definition URI of.
- Returns:
- The definition URI for the specified class.
 
- 
getBeanDefUriReturns the definition URI for the specified class.- Parameters:
- id- The definition ID to get the definition URI of.
- Returns:
- The definition URI for the specified class.
 
- 
getBeanDefsReturns the definitions that were gathered during this session.This map is modifiable and affects the map in the session. - Returns:
- The definitions that were gathered during this session, or null ifJsonSchemaGenerator.Builder.useBeanDefs()was not enabled.
 
- 
addBeanDefAdds a schema definition to this session.- Parameters:
- id- The definition ID.
- def- The definition schema.
- Returns:
- This object.
 
- 
getAddDescriptionsToAdd descriptions to types.- Returns:
- Set of categories of types that descriptions should be automatically added to generated schemas.
- See Also:
 
- 
getAddExamplesToAdd examples.- Returns:
- Set of categories of types that examples should be automatically added to generated schemas.
- See Also:
 
- 
isAllowNestedDescriptionsAllow nested descriptions.- Returns:
- true if nested descriptions are allowed in schema definitions.
- See Also:
 
- 
isAllowNestedExamplesAllow nested examples.- Returns:
- true if nested examples are allowed in schema definitions.
- See Also:
 
- 
getBeanDefMapperBean schema definition mapper.- Returns:
- Interface to use for converting Bean classes to definition IDs and URIs.
- See Also:
 
- 
getIgnoreTypesIgnore types from schema definitions.- Returns:
- Custom schema information for particular class types.
- See Also:
 
- 
isUseBeanDefsUse bean definitions.- Returns:
- true if schemas on beans will be serialized with- '$ref' tags.
- See Also:
 
- 
getJsonSchemaClassMetaReturns the language-specific metadata on the specified class.- Parameters:
- cm- The class to return the metadata on.
- Returns:
- The metadata.
 
- 
getJsonSchemaBeanPropertyMetaReturns the language-specific metadata on the specified bean property.- Parameters:
- bpm- The bean property to return the metadata on.
- Returns:
- The metadata.
 
 
-