Skip to content

Default validator being created #29

Description

@chippyash

Although I have specified a request validator (using FN::ImportValue), serverless deploy is still creating a default request validator for the stack. Checking the .serverless/cloudformation-template-update-stack.json I can see it declared as a resource, but it is never referenced anywhere else in stack spec.

Is this predicted behaviour or am I missing something?

serverless V3.0.0

provider:
  apiGateway:
    restApiId: ${self:custom.environment.apiGateway.restApiId}
    restApiRootResourceId: ${self:custom.environment.apiGateway.restApiRootResourceId}
...
plugins:
  - serverless-iam-roles-per-function
  - serverless-plugin-log-subscription
  - serverless-plugin-scripts
  - serverless-reqvalidator-plugin
...
functions:
  plan:
    handler: ./bin/xxx
    events:
      - http:
          method: put
          path: aum/xxx
          reqValidatorName:
            Fn::ImportValue: 'apiGwRequestValidateAll'
          request:
            schemas:
              application/json: ${file(serverless/schema/xxx.json)}
            parameters:
              headers:
                x-context-id:
                  required: false
                  mappedValue: context.requestId

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions