샘플
jsonschema-specifications 2025.9.1: jsonschema_specifications.REGISTRY
검증된 샘플 — pypi jsonschema-specifications 2025.9.1: jsonschema_specifications.REGISTRY. python 3.12 · linux alpine/x64 · docker에서 contract를 실행해 통과했습니다.
sha256:9387814f67de1fce3ee02db92492bb29108149560932c5c92b6f562842049c76
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
MIT-0
실행 증거
선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.
- 증거 기준
- 서명된 컨트랙트 통과
- 검증 영수증
- 1
- 빌드한 서명 키
- 1
선언된 환경
python 3.12 linux 24 · ubuntu · glibc 2.39 x64 python 3.12 python pip 24
검증 실행 환경
| 환경 | 컨트랙트 | 단계 | 실행일 |
|---|---|---|---|
| python 3.12 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1python:3.12-alpine@sha256:d09d15e60962… |
2026-08-28 |
케이스
HOW- 목표
- verify pkg:pypi/jsonschema-specifications@2025.9.1
- 심벌
-
- jsonschema_specifications.REGISTRY
- 환경
- python 3.12
- 생성일
- 2026-08-28T03:52:48Z
컨트랙트
- assert REGISTRY is an instance of referencing.Registry populated with official meta-schemas
- assert REGISTRY contains standard draft schemas for draft-03, draft-04, draft-06, draft-07, 2019-09, and 2020-12
- assert REGISTRY contains Draft 2020-12 sub-vocabularies including core, applicator, and validation
- assert REGISTRY.contents retrieves parsed meta-schema dictionary by schema URI
- assert REGISTRY indexing returns Resource objects containing the parsed schema document
- assert REGISTRY.resolver creates a Resolver capable of resolving meta-schema resources
- assert REGISTRY.contents raises NoSuchResource when querying an unregistered URI
- assert REGISTRY can be extended with custom schema Resources via with_resource and @ operator while preserving base schemas
파일
- PROMPT.md
- csx.json
- pyproject.toml
- requirements.txt
- spec.json
- test/contract.py
소스
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify pkg:pypi/jsonschema-specifications@2025.9.1
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:pypi/jsonschema-specifications@2025.9.1
Demonstrate these symbols/APIs:
- jsonschema_specifications.REGISTRY
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:d323184723fce7cd8939c2979bbb02f86229c6ff14c15eaf8bd3b2fdaed4bc02","contract":["assert REGISTRY is an instance of referencing.Registry populated with official meta-schemas","assert REGISTRY contains standard draft schemas for draft-03, draft-04, draft-06, draft-07, 2019-09, and 2020-12","assert REGISTRY contains Draft 2020-12 sub-vocabularies including core, applicator, and validation","assert REGISTRY.contents retrieves parsed meta-schema dictionary by schema URI","assert REGISTRY indexing returns Resource objects containing the parsed schema document","assert REGISTRY.resolver creates a Resolver capable of resolving meta-schema resources","assert REGISTRY.contents raises NoSuchResource when querying an unregistered URI","assert REGISTRY can be extended with custom schema Resources via with_resource and @ operator while preserving base schemas"],"goal":"verify pkg:pypi/jsonschema-specifications@2025.9.1","kind":"HOW","packages":["pkg:pypi/jsonschema-specifications@2025.9.1"],"schemaVersion":1,"symbols":["jsonschema_specifications.REGISTRY"]},"contractCommand":["python3","test/contract.py"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"pypi","executionContext":"python","language":"python","libc":"glibc","libcVersion":"2.39","moduleSystem":"standard","os":"linux","osVersionBucket":"24","packageManager":"pip","packageManagerVersion":"24.0","runtime":"python","runtimeVersion":"3.12","schemaVersion":1},"license":"MIT-0","packages":["pkg:pypi/jsonschema-specifications@2025.9.1"],"schemaVersion":1,"subject":"pkg:pypi/jsonschema-specifications@2025.9.1","symbols":["jsonschema_specifications.REGISTRY"],"verifierAdapter":"python@1"}
[project]
name = "verify-jsonschema-specifications"
version = "0.1.0"
dependencies = [
"jsonschema-specifications==2025.9.1",
"referencing==0.37.0",
"rpds-py==2026.6.3",
"attrs==25.4.0",
"typing-extensions==4.16.0",
]
jsonschema-specifications==2025.9.1
referencing==0.37.0
rpds-py==2026.6.3
attrs==25.4.0
typing-extensions==4.16.0
{
"schemaVersion": 1,
"goal": "verify pkg:pypi/jsonschema-specifications@2025.9.1",
"kind": "HOW",
"packages": [
"pkg:pypi/jsonschema-specifications@2025.9.1"
],
"symbols": [
"jsonschema_specifications.REGISTRY"
]
}
import jsonschema_specifications
from jsonschema_specifications import REGISTRY
from referencing import Registry, Resource
from referencing.exceptions import NoSuchResource
from referencing.jsonschema import DRAFT202012, DRAFT7
def test_registry_instance():
assert isinstance(REGISTRY, Registry)
assert len(REGISTRY) > 0
def test_draft_meta_schemas_present():
expected_drafts = [
"http://json-schema.org/draft-03/schema",
"http://json-schema.org/draft-04/schema",
"http://json-schema.org/draft-06/schema",
"http://json-schema.org/draft-07/schema",
"https://json-schema.org/draft/2019-09/schema",
"https://json-schema.org/draft/2020-12/schema",
]
for draft_uri in expected_drafts:
assert draft_uri in REGISTRY
contents = REGISTRY.contents(draft_uri)
assert isinstance(contents, dict)
def test_vocabularies_present():
vocabularies = [
"https://json-schema.org/draft/2020-12/meta/core",
"https://json-schema.org/draft/2020-12/meta/applicator",
"https://json-schema.org/draft/2020-12/meta/validation",
"https://json-schema.org/draft/2020-12/meta/meta-data",
"https://json-schema.org/draft/2020-12/meta/format-annotation",
"https://json-schema.org/draft/2020-12/meta/format-assertion",
"https://json-schema.org/draft/2020-12/meta/content",
"https://json-schema.org/draft/2020-12/meta/unevaluated",
]
for vocab_uri in vocabularies:
assert vocab_uri in REGISTRY
res = REGISTRY[vocab_uri]
assert isinstance(res, Resource)
assert res.contents["$schema"] == "https://json-schema.org/draft/2020-12/schema"
def test_registry_contents_access():
schema_2020 = REGISTRY.contents("https://json-schema.org/draft/2020-12/schema")
assert schema_2020["title"] == "Core and Validation specifications meta-schema"
assert schema_2020["$schema"] == "https://json-schema.org/draft/2020-12/schema"
schema_draft7 = REGISTRY.contents("http://json-schema.org/draft-07/schema")
assert schema_draft7["title"] == "Core schema meta-schema"
def test_registry_resource_indexing():
resource = REGISTRY["https://json-schema.org/draft/2020-12/schema"]
assert isinstance(resource, Resource)
assert resource.contents["title"] == "Core and Validation specifications meta-schema"
def test_registry_resolver():
resolver = REGISTRY.resolver()
resolved = resolver.lookup("https://json-schema.org/draft/2020-12/schema")
assert resolved.contents.get("title") == "Core and Validation specifications meta-schema"
def test_unregistered_uri_raises_nosuchresource():
try:
REGISTRY.contents("https://example.com/unregistered/schema")
assert False, "Expected NoSuchResource"
except NoSuchResource as exc:
assert isinstance(exc, NoSuchResource)
def test_registry_extension():
custom_schema = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/user-schema",
"type": "object",
"properties": {"username": {"type": "string"}},
}
custom_resource = Resource.from_contents(custom_schema)
extended = REGISTRY.with_resource("https://example.com/user-schema", custom_resource)
assert "https://example.com/user-schema" in extended
assert "https://json-schema.org/draft/2020-12/schema" in extended
assert extended.contents("https://example.com/user-schema")["properties"]["username"]["type"] == "string"
draft7_res = DRAFT7.create_resource({
"$id": "https://example.com/item-schema",
"type": "number",
})
combined = draft7_res @ REGISTRY
assert "https://example.com/item-schema" in combined
assert "http://json-schema.org/draft-07/schema" in combined
def main():
test_registry_instance()
test_draft_meta_schemas_present()
test_vocabularies_present()
test_registry_contents_access()
test_registry_resource_indexing()
test_registry_resolver()
test_unregistered_uri_raises_nosuchresource()
test_registry_extension()
print("All contract assertions passed.")
if __name__ == "__main__":
main()
오리진 시더
익명