From 351353e18126998459adae84375e6f5e7012263d Mon Sep 17 00:00:00 2001 From: Bjarke Madsen <bjarke@nordu.net> Date: Fri, 10 Jan 2025 14:44:59 +0100 Subject: [PATCH] Update external connections schema --- compendium_v2/routes/schemas.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/compendium_v2/routes/schemas.py b/compendium_v2/routes/schemas.py index 63df6f3d..55d1cd0e 100644 --- a/compendium_v2/routes/schemas.py +++ b/compendium_v2/routes/schemas.py @@ -392,7 +392,7 @@ EOSC_LISTINGS_RESPONSE_SCHEMA = { EXTERNAL_CONNECTIONS_RESPONSE_SCHEMA = { '$schema': 'http://json-schema.org/draft-07/schema#', 'definitions': { - 'connection': { + 'external_connection': { 'type': 'object', 'properties': { **NREN_YEAR_DATAPOINT, @@ -402,14 +402,8 @@ EXTERNAL_CONNECTIONS_RESPONSE_SCHEMA = { 'to_organization': {'type': 'string'}, 'interconnection_method': {'type': ['string', 'null']} }, - }, - 'external_connection': { - 'type': 'object', - 'properties': { - **NREN_YEAR_DATAPOINT, - 'connections': {'type': 'array', 'items': {'$ref': '#/definitions/connection'}} - }, - 'required': [*NREN_YEAR_DATAPOINT_REQUIRED, 'connections'], + 'required': [*NREN_YEAR_DATAPOINT_REQUIRED, 'link_name', 'capacity', + 'from_organization', 'to_organization', 'interconnection_method'], 'additionalProperties': False } }, -- GitLab