fix oas export

pull/670/head
Jingyi Niu 2024-04-12 07:47:00 +08:00
parent b9442d0c0c
commit 4aae9803c7
1 changed files with 10 additions and 3 deletions

View File

@ -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,