diff --git a/middleware_api/service/oas.py b/middleware_api/service/oas.py index 71434dbc..a626e95d 100644 --- a/middleware_api/service/oas.py +++ b/middleware_api/service/oas.py @@ -36,9 +36,16 @@ def handler(event: dict, context: LambdaContext): json_schema = replace_null(json_schema) json_schema['info']['version'] = esd_version.split('-')[0] - json_schema['servers'][0]['url'] = "{ApiGatewayUrl}" - json_schema['servers'][0]['variables']['ApiGatewayUrl'][ - 'default'] = "https://xxxxxx.execute-api.ap-northeast-1.amazonaws.com/prod/" + json_schema['servers'] = [ + { + "url": "{ApiGatewayUrl}", + "variables": { + "ApiGatewayUrl": { + "default": "https://xxxxxx.execute-api.ap-northeast-1.amazonaws.com/prod/" + } + } + } + ] payload = { 'isBase64Encoded': False,