All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.smithy.jsonschema.JsonSchemaVersion Maven / Gradle / Ivy

There is a newer version: 1.51.0
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */

package software.amazon.smithy.jsonschema;

/**
 * Configures the schema version to use when converting Smithy shapes to JSON Schema.
 */
public enum JsonSchemaVersion {
    DRAFT07("draft07", "http://json-schema.org/draft-07/schema#", "#/definitions"),
    DRAFT2020_12("draft2020-12", "http://json-schema.org/draft/2020-12/schema#", "#/$defs");

    private final String versionName;
    private final String location;
    private final String defaultDefinitionPointer;

    JsonSchemaVersion(String versionName, String location, String defaultDefinitionPointer) {
        this.versionName = versionName;
        this.location = location;
        this.defaultDefinitionPointer = defaultDefinitionPointer;
    }

    public String toString() {
        return versionName;
    }

    public String getLocation() {
        return this.location;
    }

    String getDefaultDefinitionPointer() {
        return this.defaultDefinitionPointer;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy