gcubed.schemas
Packaged JSON Schemas and validated runtime access to them.
@lru_cache(maxsize=None)
def
validator_for(resource_name: str) -> jsonschema.validators.Draft202012Validator:
Return a cached Draft 2020-12 validator for a packaged schema.
Missing, malformed, or invalid schemas indicate a broken package rather
than invalid user input, so they deliberately raise RuntimeError.
def
design_file_validator() -> jsonschema.validators.Draft202012Validator:
Return the packaged design-file version-1 validator.
def
chartpack_validator() -> jsonschema.validators.Draft202012Validator:
Return the packaged chartpack version-1 validator.
def
setup_configuration_validator() -> jsonschema.validators.Draft202012Validator:
Return the packaged setup-configuration version-1 validator.
def
model_configuration_validator(schema_version: int = 1) -> jsonschema.validators.Draft202012Validator:
Return the validator for a supported model-configuration schema.
Version 1 is the only released YAML model-configuration grammar. Keeping selection here gives the parser one explicit dispatch boundary without implying support for an unshipped version.