Package com.kjetland.jackson.jsonSchema
Class JsonSchemaConfig
- java.lang.Object
-
- com.kjetland.jackson.jsonSchema.JsonSchemaConfig
-
public final class JsonSchemaConfig extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static JsonSchemaConfigDEFAULTstatic java.util.Map<java.lang.String,java.lang.String>DEFAULT_DATE_FORMAT_MAPPINGstatic JsonSchemaConfigJSON_EDITORUse this configuration if using the JsonSchema to generate HTML5 GUI, eg.static JsonSchemaConfigNULLABLEThis configuration is exactly like the vanilla JSON schema generator, except that "nullables" have been turned on: `useOneOfForOption` and `useOneForNullables` have both been set to `true`.
-
Constructor Summary
Constructors Constructor Description JsonSchemaConfig()
-
-
-
Field Detail
-
DEFAULT_DATE_FORMAT_MAPPING
public static final java.util.Map<java.lang.String,java.lang.String> DEFAULT_DATE_FORMAT_MAPPING
-
DEFAULT
public static final JsonSchemaConfig DEFAULT
-
JSON_EDITOR
public static final JsonSchemaConfig JSON_EDITOR
Use this configuration if using the JsonSchema to generate HTML5 GUI, eg. by using https://github.com/jdorn/json-editor The following options are enabled:autoGenerateTitleForProperties- If property is named "someName", we will add {"title": "Some Name"}defaultArrayFormat- this will result in a better gui than te default one.
-
NULLABLE
public static final JsonSchemaConfig NULLABLE
This configuration is exactly like the vanilla JSON schema generator, except that "nullables" have been turned on: `useOneOfForOption` and `useOneForNullables` have both been set to `true`. With this configuration you can either use `Optional` or `Option`, or a standard nullable Java type and get back a schema that allows nulls. If you need to mix nullable and non-nullable types, you may override the nullability of the type by either setting a `NotNull` annotation on the given property, or setting the `required` attribute of the `JsonProperty` annotation.
-
-