Enum Option
- java.lang.Object
-
- java.lang.Enum<Option>
-
- com.github.victools.jsonschema.generator.Option
-
- All Implemented Interfaces:
Serializable
,Comparable<Option>
public enum Option extends Enum<Option>
Configuration options to be set on aSchemaGeneratorConfigBuilder
instance.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADDITIONAL_FIXED_TYPES
Whether additional types (and not just primitives and their associated classes should be included as fixed schema with a "type" attribute of "string"/"boolean"/"integer"/"number".DEFINITIONS_FOR_ALL_OBJECTS
Whether all referenced objects should be listed in the schema's "definitions", otherwise single occurrences are defined in-line.FLATTENED_ENUMS
Whether enums should be treated as plain ""string"" values.FLATTENED_OPTIONALS
Whether anyOptional
instance should be treated as nullable value of the wrapped type.GETTER_METHODS
Whether getter methods should be included (assuming their fields are not included).NONPUBLIC_NONSTATIC_FIELDS_WITH_GETTERS
Whether fields with private/package/protected visibility, for which a respective getter method can be found, should be included.NONPUBLIC_NONSTATIC_FIELDS_WITHOUT_GETTERS
Whether fields with private/package/protected visibility and no accompanying getter method should be included.NONPUBLIC_STATIC_FIELDS
Whetherstatic
fields with private/package/protected visibility should be included.NONSTATIC_NONVOID_NONGETTER_METHODS
Whether methods that are (1) notstatic
, (2) have a specific return value and (3) are not getters, should be included.NULLABLE_FIELDS_BY_DEFAULT
Whether an object's field/property should be deemed to be nullable if no specific check says otherwise.NULLABLE_METHOD_RETURN_VALUES_BY_DEFAULT
Whether a method's return value should be deemed to be nullable if no specific check says otherwise.PUBLIC_NONSTATIC_FIELDS
Whetherstatic
fields with public visibility should be included.PUBLIC_STATIC_FIELDS
Whetherstatic
fields with public visibility should be included.SCHEMA_VERSION_INDICATOR
Whether the ""$schema"" attribute with value ""http://json-schema.org/draft-07/schema#"" should be included.SIMPLIFIED_ENUMS
SIMPLIFIED_OPTIONALS
Whether anyOptional
instance should be reduced to an object with only three methods.STATIC_METHODS
Whether methods that arestatic
should be included.TRANSIENT_FIELDS
Whethertransient
fields should be included.VALUES_FROM_CONSTANT_FIELDS
Whether the constant values of static final fields should be included.VOID_METHODS
Whether methods without return value (e.g.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Option
valueOf(String name)
Returns the enum constant of this type with the specified name.static Option[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SCHEMA_VERSION_INDICATOR
public static final Option SCHEMA_VERSION_INDICATOR
Whether the ""$schema"" attribute with value ""http://json-schema.org/draft-07/schema#"" should be included.
-
ADDITIONAL_FIXED_TYPES
public static final Option ADDITIONAL_FIXED_TYPES
Whether additional types (and not just primitives and their associated classes should be included as fixed schema with a "type" attribute of "string"/"boolean"/"integer"/"number".
-
FLATTENED_ENUMS
public static final Option FLATTENED_ENUMS
Whether enums should be treated as plain ""string"" values.- See Also:
SIMPLIFIED_ENUMS
-
SIMPLIFIED_ENUMS
public static final Option SIMPLIFIED_ENUMS
Whether enums should be treated as ""object"", with all methods butname()
being excluded.
This only takes effect ifFLATTENED_ENUMS
is disabled.
-
FLATTENED_OPTIONALS
public static final Option FLATTENED_OPTIONALS
Whether anyOptional
instance should be treated as nullable value of the wrapped type.- See Also:
SIMPLIFIED_OPTIONALS
-
SIMPLIFIED_OPTIONALS
public static final Option SIMPLIFIED_OPTIONALS
Whether anyOptional
instance should be reduced to an object with only three methods.
This only takes effect ifFLATTENED_OPTIONALS
is disabled.
-
VALUES_FROM_CONSTANT_FIELDS
public static final Option VALUES_FROM_CONSTANT_FIELDS
Whether the constant values of static final fields should be included.
-
PUBLIC_STATIC_FIELDS
public static final Option PUBLIC_STATIC_FIELDS
Whetherstatic
fields with public visibility should be included.
-
PUBLIC_NONSTATIC_FIELDS
public static final Option PUBLIC_NONSTATIC_FIELDS
Whetherstatic
fields with public visibility should be included.
-
NONPUBLIC_STATIC_FIELDS
public static final Option NONPUBLIC_STATIC_FIELDS
Whetherstatic
fields with private/package/protected visibility should be included.
-
NONPUBLIC_NONSTATIC_FIELDS_WITH_GETTERS
public static final Option NONPUBLIC_NONSTATIC_FIELDS_WITH_GETTERS
Whether fields with private/package/protected visibility, for which a respective getter method can be found, should be included.
-
NONPUBLIC_NONSTATIC_FIELDS_WITHOUT_GETTERS
public static final Option NONPUBLIC_NONSTATIC_FIELDS_WITHOUT_GETTERS
Whether fields with private/package/protected visibility and no accompanying getter method should be included.
-
TRANSIENT_FIELDS
public static final Option TRANSIENT_FIELDS
Whethertransient
fields should be included.
-
STATIC_METHODS
public static final Option STATIC_METHODS
Whether methods that arestatic
should be included.
-
VOID_METHODS
public static final Option VOID_METHODS
Whether methods without return value (e.g. setters) should be included.
-
GETTER_METHODS
public static final Option GETTER_METHODS
Whether getter methods should be included (assuming their fields are not included).
-
NONSTATIC_NONVOID_NONGETTER_METHODS
public static final Option NONSTATIC_NONVOID_NONGETTER_METHODS
Whether methods that are (1) notstatic
, (2) have a specific return value and (3) are not getters, should be included.- See Also:
STATIC_METHODS
,VOID_METHODS
,GETTER_METHODS
-
NULLABLE_FIELDS_BY_DEFAULT
public static final Option NULLABLE_FIELDS_BY_DEFAULT
Whether an object's field/property should be deemed to be nullable if no specific check says otherwise.
Default: false (disabled)
-
NULLABLE_METHOD_RETURN_VALUES_BY_DEFAULT
public static final Option NULLABLE_METHOD_RETURN_VALUES_BY_DEFAULT
Whether a method's return value should be deemed to be nullable if no specific check says otherwise.
Default: false (disabled)
-
DEFINITIONS_FOR_ALL_OBJECTS
public static final Option DEFINITIONS_FOR_ALL_OBJECTS
Whether all referenced objects should be listed in the schema's "definitions", otherwise single occurrences are defined in-line.
Default: false (disabled)
-
-
Method Detail
-
values
public static Option[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Option c : Option.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Option valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-