Skip to content

Commit 8c884ed

Browse files
committed
Allow declarative OpenAPI extension points
1 parent e6969c7 commit 8c884ed

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ogc/bblocks/extension.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def process_extensions(self, bblock: BuildingBlock):
167167
return result, parent_is_openapi
168168

169169
def _process_openapi(self):
170-
raise ValueError('Support for extending OpenAPI documents is not yet implemented.')
170+
print('WARNING: Extension points in OpenAPI building blocks are merely declarative. '
171+
'No additional postprocessing of the OpenAPI document will be done.')
171172

172173
def _process_schema(self, bblock: BuildingBlock, root_schema: ReferencedSchema, parent_id: str,
173174
extensions: dict[str, str], extension_schema_mappings: dict[str, dict[str, str]]):

ogc/bblocks/postprocess.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,6 @@ def do_postprocess(bblock: BuildingBlock, light: bool = False) -> bool:
253253

254254
openapi_contents = None
255255
if building_block.extensionPoints:
256-
if building_block.schema.exists or building_block.openapi.exists:
257-
raise ValueError('Extension points are incompatible with schema and OpenAPI definitions')
258256
try:
259257
extended_schema, is_openapi = extender.process_extensions(building_block)
260258
except Exception as e:

0 commit comments

Comments
 (0)