Skip to content

Commit 6622552

Browse files
committed
feat: avoid serializing thousands of STAC Item/Collection schemas, just reference them
1 parent a2832b8 commit 6622552

File tree

4 files changed

+4
-2734
lines changed

4 files changed

+4
-2734
lines changed

src/cwl2ogc/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "0.11.0"
15+
__version__ = "0.12.0"

src/cwl2ogc/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from .stac_item import STAC_ITEM_SCHEMA
16-
from .stac_collection import STAC_COLLECTION_SCHEMA
1715
from abc import (
1816
ABC,
1917
abstractmethod
@@ -209,14 +207,14 @@ def _map_type(
209207
_map_type(["File", File], lambda input : {
210208
"oneOf": [
211209
{ "type": "string", "format": "uri" },
212-
STAC_ITEM_SCHEMA
210+
{ "$ref": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json" }
213211
]
214212
})
215213
_map_type(["Directory", Directory], lambda input : {
216214
"oneOf": [
217215
{ "type": "string", "format": "uri" },
218-
STAC_ITEM_SCHEMA,
219-
STAC_COLLECTION_SCHEMA
216+
{ "$ref": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json" },
217+
{ "$ref": "https://schemas.stacspec.org/v1.0.0/collection-spec/json-schema/collection.json" }
220218
]
221219
})
222220

0 commit comments

Comments
 (0)