@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-20T22:20:03.577Z") public enum JsonSchemaType extends java.lang.Enum<JsonSchemaType>
RestApi api; // We define the JSON Schema for the transformed valid response Model responseModel = api.addModel("ResponseModel", ModelOptions.builder() .contentType("application/json") .modelName("ResponseModel") .schema(JsonSchema.builder() .schema(JsonSchemaVersion.DRAFT4) .title("pollResponse") .type(JsonSchemaType.OBJECT) .properties(Map.of( "state", JsonSchema.builder().type(JsonSchemaType.STRING).build(), "greeting", JsonSchema.builder().type(JsonSchemaType.STRING).build())) .build()) .build()); // We define the JSON Schema for the transformed error response Model errorResponseModel = api.addModel("ErrorResponseModel", ModelOptions.builder() .contentType("application/json") .modelName("ErrorResponseModel") .schema(JsonSchema.builder() .schema(JsonSchemaVersion.DRAFT4) .title("errorResponse") .type(JsonSchemaType.OBJECT) .properties(Map.of( "state", JsonSchema.builder().type(JsonSchemaType.STRING).build(), "message", JsonSchema.builder().type(JsonSchemaType.STRING).build())) .build()) .build());
Enum Constant and Description |
---|
ARRAY |
BOOLEAN |
INTEGER |
NULL |
NUMBER |
OBJECT |
STRING |
Modifier and Type | Method and Description |
---|---|
static JsonSchemaType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static JsonSchemaType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JsonSchemaType NULL
public static final JsonSchemaType BOOLEAN
public static final JsonSchemaType OBJECT
public static final JsonSchemaType ARRAY
public static final JsonSchemaType NUMBER
public static final JsonSchemaType INTEGER
public static final JsonSchemaType STRING
public static JsonSchemaType[] values()
for (JsonSchemaType c : JsonSchemaType.values()) System.out.println(c);
public static JsonSchemaType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null