Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update apigateway.md #12305

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Commits on Dec 20, 2023

  1. Update apigateway.md

    errorMessage": "Expected `schema` to be an object or boolean", "errorType": "SchemaError", "offlineInfo": "If you believe this is an issue with serverless-offline please submit it, thanks. https://github.com/dherault/serverless-offline/issues", "stackTrace": [ "SchemaError: Expected `schema` to be an object or boolean", "at Validator.validate
    I was getting above error due to below configuration of my yml file . due to serverless-offline update schemas is changed to schema but  document is not upto date. So i have changed schemas to schema inside the function.
    provider:
        ...
        apiGateway:
          request:
            schemas:
              post-create-model:
                name: PostCreateModel
                schema: ${file(api_schema/post_add_schema.json)}
                description: "A Model validation for adding posts"
    
    functions:
      create:
        handler: posts.create
        events:
          - http:
              path: posts/create
              method: post
              request:
                schemas:
                  application/json: post-create-model
    karinigishivakumar committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    368c9ea View commit details
    Browse the repository at this point in the history