Validate any opensdk.yaml or opensdk.json file against the published schema
before building generator support or submitting to a registry.
https://opensdks.org/schema/v1/opensdk.schema.json # Install ajv-cli
npm install -g ajv-cli ajv-formats
# Validate your opensdk.yaml
ajv validate \
-s https://opensdks.org/schema/v1/opensdk.schema.json \
-d ./opensdk.yaml \
--spec=draft2020 import "github.com/santhosh-tekuri/jsonschema/v5"
compiler := jsonschema.NewCompiler()
schema, _ := compiler.Compile(
"https://opensdks.org/schema/v1/opensdk.schema.json",
)
var v interface{}
yaml.Unmarshal(data, &v)
err := schema.Validate(v) import jsonschema, yaml, urllib.request
url = "https://opensdks.org/schema/v1/opensdk.schema.json"
schema = json.load(urllib.request.urlopen(url))
with open("opensdk.yaml") as f:
doc = yaml.safe_load(f)
jsonschema.validate(doc, schema) Add schema association to get inline validation and autocomplete in any YAML-LSP-capable editor.
{
"yaml.schemas": {
"https://opensdks.org/schema/v1/opensdk.schema.json": [
"**/opensdk.yaml",
"**/opensdk.json"
]
}
} # Add this as the first line of any opensdk.yaml for editor support
# yaml-language-server: $schema=https://opensdks.org/schema/v1/opensdk.schema.json
opensdk: "1.0.0"
# ... Configuration for a single codegen target. Contains package, style, features, templates, and operationOverrides.
Package name, version, module path, and registry target for the generated SDK in a given language ecosystem.
Naming conventions, enum representations, optional field styles, date handling, and file naming conventions.
Auth helpers, retry behavior, pagination strategy, reconciliation mode, streaming, webhooks, mocking, and telemetry.
Base template URL, template engine, and per-operation or per-model template overrides.
Cross-language validation gates, reconciliation settings, breaking change policy, output structure, and global field exclusions.
JSON Schema 2020-12 · Apache-2.0