Enum JsonSchemaConfig.MapStrategy
- java.lang.Object
-
- java.lang.Enum<JsonSchemaConfig.MapStrategy>
-
- software.amazon.smithy.jsonschema.JsonSchemaConfig.MapStrategy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<JsonSchemaConfig.MapStrategy>
- Enclosing class:
- JsonSchemaConfig
public static enum JsonSchemaConfig.MapStrategy extends java.lang.Enum<JsonSchemaConfig.MapStrategy>
Configures how Smithy map shapes are converted to JSON Schema.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PATTERN_PROPERTIES
Converts to a schema that uses "patternProperties".PROPERTY_NAMES
Converts to a schema that uses a combination of "propertyNames" and "additionalProperties".
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
static JsonSchemaConfig.MapStrategy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static JsonSchemaConfig.MapStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PROPERTY_NAMES
public static final JsonSchemaConfig.MapStrategy PROPERTY_NAMES
Converts to a schema that uses a combination of "propertyNames" and "additionalProperties".This is the default setting used if not configured.
-
PATTERN_PROPERTIES
public static final JsonSchemaConfig.MapStrategy PATTERN_PROPERTIES
Converts to a schema that uses "patternProperties". If a map's key member or its target does not have apattern
trait, a default indicating one or more of any character (".+") is applied.
-
-
Method Detail
-
values
public static JsonSchemaConfig.MapStrategy[] 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 (JsonSchemaConfig.MapStrategy c : JsonSchemaConfig.MapStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JsonSchemaConfig.MapStrategy valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<JsonSchemaConfig.MapStrategy>
-
-