rschick / serverless-plugin-lambda-account-access

5 stars 6 forks source link

Added custom validation schemas #19

Closed chrisd2l closed 2 years ago

chrisd2l commented 3 years ago

Attempting to resolve this issue using the suggestion from @AntonBazhal

AntonBazhal commented 3 years ago

Your changes look solid to me. And I agree with Jasper. Let's add AJV as a dev dependency so we can test our schemas.

chrisd2l commented 3 years ago

Your changes look solid to me. And I agree with Jasper. Let's add AJV as a dev dependency so we can test our schemas.

Would you be opposed to adding serverless as a dev dependency and testing ajv through it (still need to work out the details)? Ajv isconfigurable/extendable and I don't want to have to worry about how serverless configures it.

JasperAtD2L commented 3 years ago

Your changes look solid to me. And I agree with Jasper. Let's add AJV as a dev dependency so we can test our schemas.

Would you be opposed to adding serverless as a dev dependency and testing ajv through it (still need to work out the details)? Ajv isconfigurable/extendable and I don't want to have to worry about how serverless configures it.

Yeah I see the problem. Serverless has a base schema, that we register into and they just jam our properties into it. A test could use npm install as a step and install a specific version of serverless and test a simple serverless.yml in a sls package command.

neverendingqs commented 2 years ago

I'll probably try to build on this PR (or create a new one), but we seem to have the same problem as discussed in https://github.com/serverless/serverless/discussions/10307 (unable to edit provider: schema).