yndlingsfar / serverless-openapi-integration-helper

The plugin separates x-amazon-apigateway extension syntax from your openapi3 files
MIT License
6 stars 5 forks source link

Ability to merge the whole resource/path #19

Closed anton-makarevich closed 1 year ago

anton-makarevich commented 1 year ago

in our case we have a "fake" {proxy+} resource to (better than default api responses) handle 404s.

  /{proxy+}:
    x-amazon-apigateway-any-method:
      parameters:
      - name: "proxy"
        in: "path"
        required: true
        schema:
          type: "string"
      x-amazon-apigateway-integration:
        uri: "arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:{region}:{account}:function:anyUnknownResource/invocations"
        httpMethod: "POST"
        responses:
          default:
            statusCode: "404"
        passthroughBehavior: "when_no_match"
        cacheNamespace: "ogewnr"
        cacheKeyParameters:
        - "method.request.path.proxy"
        contentHandling: "CONVERT_TO_TEXT"
        type: "aws_proxy"

we don't want to have it on our regular OpenAPI file and only need it to deploy to AWS, so it would be nice if plugin could merge it with the rest of the spec, but i didn't find a way

anton-makarevich commented 1 year ago

ah it actually works exactly as i wanted, i just missed the paths: in the beginning of the file 🤦