Skip to content

Commit 8b511be

Browse files
committed
Remove schema features from v1
1 parent 4f00259 commit 8b511be

File tree

2 files changed

+0
-164
lines changed

2 files changed

+0
-164
lines changed

asdf_pydantic/model.py

-29
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import textwrap
21
from typing import ClassVar
32

4-
import yaml
53
from pydantic import BaseModel
64

75

@@ -40,30 +38,3 @@ def asdf_yaml_tree(self) -> dict:
4038
)
4139

4240
return d
43-
44-
@classmethod
45-
def schema_asdf(
46-
cls, *, metaschema: str = "http://stsci.edu/schemas/asdf/asdf-schema-1.0.0"
47-
) -> str:
48-
"""Get the ASDF schema definition for this model.
49-
50-
Parameters
51-
----------
52-
metaschema, optional
53-
A metaschema URI, by default "http://stsci.edu/schemas/asdf/asdf-schema-1.0.0".
54-
See https://asdf.readthedocs.io/en/stable/asdf/extending/schemas.html#anatomy-of-a-schema
55-
for more options.
56-
""" # noqa: E501
57-
# TODO: Function signature should follow BaseModel.schema() or
58-
# BaseModel.schema_json()
59-
header = textwrap.dedent(
60-
f"""
61-
%YAML 1.1
62-
---
63-
$schema: {metaschema}
64-
id: {cls._tag}
65-
66-
"""
67-
)
68-
body = yaml.dump(cls.schema())
69-
return header + body

tests/schema_validation_test.py

-135
This file was deleted.

0 commit comments

Comments
 (0)