question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extend Serverless validation schema with the plugin options

See original GitHub issue

I am using the follow plugins;

plugins:
  - serverless-pseudo-parameters
  - serverless-offline
  - serverless-dynamodb-local
  - serverless-plugin-warmup

And have warm on my function.

functions:
  RestAPI:
    name: "${self:custom.myServiceName}"
    handler: lambda.handler
    memorySize: 128
    timeout: 30
    description: REST API
    events:
      - http:
          method: ANY
          path: /
      - http:
          method: ANY
          path: /{proxy+}
    warmup:
      enabled: true
    environment:
      NODE_ENV: ${self:custom.myStage}

Any ideas why this isn’t working? It worked before. But now I get this warning in the console everytime I deploy.

Serverless: Configuration warning at 'functions.RestAPI': unrecognized property 'warmup'
Serverless:  
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
Serverless:  
Serverless: WarmUp: setting 1 lambdas to be warm

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
juanjoDiazcommented, Nov 12, 2020

Hi @gruckionvit

Reading the link in that warning, it seems that serverless has started to apply schema validation. So now plugins should provide a JSON-schema of their params. No idea of when did that happened… I’ve been going through their release notes but couldn’t find anything. Anyway, it’s not harmful. It’s just a warning meaning that the plugin should provide its schema so it can be properly validated.

I’ll try to add the schema asap.

Thanks for reporting!

0reactions
juanjoDiazcommented, Nov 26, 2020

Ok. It seems that at some point they changed the schema so properties can be added back to the custom properties (see https://github.com/serverless/serverless/commit/51a10aa262af51c5df76e43a804b74c65bba010c).

I think that this whole schema validation thing is poorly documented and not very stable, so I wouldn’t rely on it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugins - Extending the configuration - Serverless Framework
Serverless Framework uses JSON schema validation backed by the AJV library. You can extend the base schema in plugins via:.
Read more >
Working with serverless applications - AWS Toolkit for VS Code
Learn how to create and use an AWS Serverless Application by using the AWS Toolkit for Visual Studio Code.
Read more >
JSON Schema Store
In supported JSON editors like Visual Studio and Visual Studio Code, schema files can offer auto-completion and validation to make sure your JSON...
Read more >
Validation-and-Serialization - Fastify
Fastify uses a schema-based approach, and even if it is not mandatory we recommend using JSON Schema to ... Refer to ajv options...
Read more >
Datadog Serverless Framework Plugin
Installing the Datadog Lambda Extension to your Lambda functions as a Lambda layer ( addExtension ) or subscribing the Datadog Forwarder to your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found