Class JsonSchemaProperty

    • Constructor Detail

      • JsonSchemaProperty

        JsonSchemaProperty(String key, Object value)
        Construct a property with key and value.
        Parameters:
        key - the key.
        value - the value.
    • Method Detail

      • key

         String key()

        Get the key.

        Returns:

        the key.

      • value

         Object value()

        Get the value.

        Returns:

        the value.

      • from

        @Deprecated(forRemoval = true) static JsonSchemaProperty from(String key, Object value)

        Construct a property with key and value.

        Equivalent to new JsonSchemaProperty(key, value).

        Parameters:
        key - the key.
        value - the value.
        Returns:

        a property with key and value.

      • property

        @Deprecated(forRemoval = true) static JsonSchemaProperty property(String key, Object value)

        Construct a property with key and value.

        Equivalent to new JsonSchemaProperty(key, value).

        Parameters:
        key - the key.
        value - the value.
        Returns:

        a property with key and value.

      • type

        @Deprecated(forRemoval = true) static JsonSchemaProperty type(String value)

        Construct a property with key "type" and value.

        Equivalent to new JsonSchemaProperty("type", value).

        Parameters:
        value - the value.
        Returns:

        a property with key and value.

      • description

        @Deprecated(forRemoval = true) static JsonSchemaProperty description(String value)

        Construct a property with key "description" and value.

        Equivalent to new JsonSchemaProperty("description", value).

        Parameters:
        value - the value.
        Returns:

        a property with key and value.

      • enums

        @Deprecated(forRemoval = true) static JsonSchemaProperty enums(Array<String> enumValues)

        Construct a property with key "enum" and value enumValues.

        Parameters:
        enumValues - enum values as strings.
        Returns:

        a property with key "enum" and value enumValues

      • enums

        @Deprecated(forRemoval = true) static JsonSchemaProperty enums(Array<Object> enumValues)

        Construct a property with key "enum" and value enumValues.

        Verifies that each value is a java class.

        Parameters:
        enumValues - enum values.
        Returns:

        a property with key "enum" and value enumValues

      • enums

        @Deprecated(forRemoval = true) static JsonSchemaProperty enums(Class<out Object> enumClass)

        Construct a property with key "enum" and all enum values taken from enumClass.

        Parameters:
        enumClass - enum class.
        Returns:

        a property with key "enum" and values taken from enumClass