diff --git a/api-compact.yaml b/api-compact.yaml index ac87bab8..753f883c 100644 --- a/api-compact.yaml +++ b/api-compact.yaml @@ -92,15 +92,6 @@ auth_header: &auth_header required: true type: "string" -x-amazon-apigateway-integration-assign-licenses: &apigateway_integration_assign_licenses - responses: *apigateway_responses_with_mapping_template_for_uuid - httpMethod: "POST" - type: "http" - requestParameters: - integration.request.header.Authorization: "method.request.header.Authorization" - integration.request.path.subscription_plan_uuid: "method.request.path.subscription_plan_uuid" - - endpoints: v1: @@ -146,5 +137,10 @@ endpoints: required: true responses: *responses x-amazon-apigateway-integration: - <<: *apigateway_integration_assign_licenses + responses: *apigateway_responses + httpMethod: "POST" + type: "http" + requestParameters: + integration.request.header.Authorization: "method.request.header.Authorization" + integration.request.path.subscription_plan_uuid: "method.request.path.subscription_plan_uuid" uri: "https://${stageVariables.license_manager_host}/v1/subscriptions/{subscription_plan_uuid}/licenses/assign/" diff --git a/api.yaml b/api.yaml index cbf75bf8..56162190 100644 --- a/api.yaml +++ b/api.yaml @@ -70,40 +70,6 @@ auth_header: in: header required: true type: string -x-amazon-apigateway-integration-assign-licenses: - responses: - "200": - statusCode: "200" - responseTemplates: - application/json: > - #set($inputRoot = $input.path('$')) #set($host = - $stageVariables.gateway_host) #set($uuid = $input.params('uuid')) - - #set($URLMatchRegex = "(^https?://)[^/]*[^?]*(.*$)") #set($updatedURL = "$1$host$context.resourcePath$2") #set($resourceUuidMatch = "{uuid}") - - { - "count": $inputRoot.count, - "next": "$inputRoot.next.replaceAll($URLMatchRegex, $updatedURL).replace($resourceUuidMatch, $uuid)", - "previous": "$inputRoot.previous.replaceAll($URLMatchRegex, $updatedURL).replace($resourceUuidMatch, $uuid)", - "results": $inputRoot.results - } - "401": - statusCode: "401" - "403": - statusCode: "403" - "404": - statusCode: "404" - "429": - statusCode: "429" - "500": - statusCode: "500" - default: - statusCode: "400" - httpMethod: POST - type: http - requestParameters: - integration.request.header.Authorization: method.request.header.Authorization - integration.request.path.subscription_plan_uuid: method.request.path.subscription_plan_uuid endpoints: v1: assignLicenses: @@ -172,20 +138,6 @@ endpoints: responses: "200": statusCode: "200" - responseTemplates: - application/json: > - #set($inputRoot = $input.path('$')) #set($host = - $stageVariables.gateway_host) #set($uuid = - $input.params('uuid')) - - #set($URLMatchRegex = "(^https?://)[^/]*[^?]*(.*$)") #set($updatedURL = "$1$host$context.resourcePath$2") #set($resourceUuidMatch = "{uuid}") - - { - "count": $inputRoot.count, - "next": "$inputRoot.next.replaceAll($URLMatchRegex, $updatedURL).replace($resourceUuidMatch, $uuid)", - "previous": "$inputRoot.previous.replaceAll($URLMatchRegex, $updatedURL).replace($resourceUuidMatch, $uuid)", - "results": $inputRoot.results - } "401": statusCode: "401" "403":