oapi-profile-builder 3.7.4__tar.gz → 3.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {oapi_profile_builder-3.7.4/src/oapi_profile_builder.egg-info → oapi_profile_builder-3.8.0}/PKG-INFO +1 -1
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/pyproject.toml +1 -1
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/generate.py +28 -9
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0/src/oapi_profile_builder.egg-info}/PKG-INFO +1 -1
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/LICENSE +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/README.md +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/setup.cfg +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/__init__.py +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/cite.py +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/cite_features.py +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/cli.py +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/compile.py +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/cover.py +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/models.py +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/server_validation.py +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder.egg-info/SOURCES.txt +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder.egg-info/dependency_links.txt +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder.egg-info/entry_points.txt +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder.egg-info/requires.txt +0 -0
- {oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "oapi-profile-builder"
|
|
7
|
-
version = "3.
|
|
7
|
+
version = "3.8.0"
|
|
8
8
|
description = "Authoritative tooling for creating OGC API Service Profiles (EDR, Features)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
{oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/generate.py
RENAMED
|
@@ -44,7 +44,7 @@ from oapi_profile_builder.models import ServiceProfile
|
|
|
44
44
|
def _const(val, version: str) -> dict:
|
|
45
45
|
if version == "3.1.0":
|
|
46
46
|
return {"const": val}
|
|
47
|
-
return {"enum": [val]}
|
|
47
|
+
return {"enum": [val], "default": val}
|
|
48
48
|
|
|
49
49
|
def _contains(schema: dict, version: str) -> dict:
|
|
50
50
|
if version == "3.1.0":
|
|
@@ -189,7 +189,7 @@ def _landing_page_schema(profile: "ServiceProfile") -> dict:
|
|
|
189
189
|
schema_props["keywords"] = {
|
|
190
190
|
"type": "array",
|
|
191
191
|
"items": {"type": "string"},
|
|
192
|
-
|
|
192
|
+
**_const(profile.keywords, version)
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
if profile.provider:
|
|
@@ -685,10 +685,20 @@ def _collection_response_schema(coll: Collection,
|
|
|
685
685
|
|
|
686
686
|
output_formats_schema: dict = {"type": "array", "items": {"type": "string"}}
|
|
687
687
|
if coll.output_formats:
|
|
688
|
-
output_formats_schema
|
|
688
|
+
output_formats_schema = {
|
|
689
|
+
"type": "array",
|
|
690
|
+
"items": {"type": "string"},
|
|
691
|
+
**_const(list(coll.output_formats), version)
|
|
692
|
+
}
|
|
689
693
|
|
|
690
|
-
if coll.crs:
|
|
691
|
-
|
|
694
|
+
if coll.crs:
|
|
695
|
+
crs_array_schema: dict = {
|
|
696
|
+
"type": "array",
|
|
697
|
+
"items": {"type": "string"},
|
|
698
|
+
**_const(list(coll.crs), version)
|
|
699
|
+
}
|
|
700
|
+
else:
|
|
701
|
+
crs_array_schema = {"type": "array", "items": supported_crs_schema}
|
|
692
702
|
|
|
693
703
|
extent_props: dict = {}
|
|
694
704
|
if coll.extent and coll.extent.spatial:
|
|
@@ -783,8 +793,18 @@ def _collection_response_schema(coll: Collection,
|
|
|
783
793
|
"id": {"type": "string", **_const(coll.id, version)},
|
|
784
794
|
"title": {"type": "string", **_const(coll.title, version)} if coll.title else {"type": "string"},
|
|
785
795
|
"description": {"type": "string", **_const(coll.description, version)} if coll.description else {"type": "string"},
|
|
786
|
-
"keywords": {
|
|
787
|
-
|
|
796
|
+
"keywords": {
|
|
797
|
+
"type": "array",
|
|
798
|
+
"items": {"type": "string"},
|
|
799
|
+
**(_const(coll.keywords, version) if coll.keywords else {})
|
|
800
|
+
},
|
|
801
|
+
"links": {
|
|
802
|
+
"type": "array",
|
|
803
|
+
"items": _LINK_SCHEMA,
|
|
804
|
+
**_const(links_to_show, version)
|
|
805
|
+
},
|
|
806
|
+
"crs": crs_array_schema,
|
|
807
|
+
"output_formats": output_formats_schema,
|
|
788
808
|
"parameter_names": {**param_names_schema, "additionalProperties": False},
|
|
789
809
|
"extent": {"type": "object", "required": ["spatial"], "properties": extent_props},
|
|
790
810
|
"data_queries": {"type": "object", "properties": dq_props, "additionalProperties": False}
|
|
@@ -1123,11 +1143,10 @@ def _core_paths(profile: ServiceProfile) -> dict:
|
|
|
1123
1143
|
if version == "3.1.0":
|
|
1124
1144
|
schema["properties"]["conformsTo"]["contains"] = {"enum": profile.required_conformance_classes}
|
|
1125
1145
|
else:
|
|
1126
|
-
# Force listing all expected classes in Swagger UI by using enum at the array level
|
|
1127
1146
|
schema["properties"]["conformsTo"] = {
|
|
1128
1147
|
"type": "array",
|
|
1129
1148
|
"items": {"type": "string"},
|
|
1130
|
-
|
|
1149
|
+
**_const(profile.required_conformance_classes, version)
|
|
1131
1150
|
}
|
|
1132
1151
|
|
|
1133
1152
|
return {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/cite_features.py
RENAMED
|
File without changes
|
|
File without changes
|
{oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/compile.py
RENAMED
|
File without changes
|
|
File without changes
|
{oapi_profile_builder-3.7.4 → oapi_profile_builder-3.8.0}/src/oapi_profile_builder/models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|