reference.json mismatch for slimPatterns
alanwilter opened this issue · 6 comments
Here says:
custom:
pythonRequirements:
slim: true
slimPatterns:
- '**/*.egg-info*'
But my vscode is complaining with
[{
"resource": ".../serverless.yml",
"owner": "_generated_diagnostic_collection_name_#0",
"severity": 8,
"message": "Incorrect type. Expected \"string\".",
"source": "yaml-schema: Serverless Framework Configuration",
"startLineNumber": 85,
"startColumn": 7,
"endLineNumber": 101,
"endColumn": 1
}]
And if I see the reference.json
for slimPatterns
:
"slimPatterns": {
"type": "string",
"description": "https://github.com/serverless/serverless-python-requirements#custom-removal-patterns"
},
I can see something is wrong. Now what's wrong? Should it be an array? like:
"slimPatterns": {
"type": "array",
"items": {
"type": "string"
}
},
or how to do it with strings?
Hello @alanwilter - thanks a lot for reporting. You mention that your "VSCode is complaining" - could you please elaborate more? What exactly are you using along with VSCode to check the configuration? I'm personally not a VSCode user so it's hard for me to say more at this point.
Ok, it's not serverless-python-requirements
, it's in
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "Serverless Framework Configuration",
"description": "Schema for serverless framework configuration files",
"fileMatch": ["serverless.yml", "serverless.yaml"],
Hey @alanwilter - it looks like it's an issue with the VSCode plugin and it would be better to report it at that plugin's repo - unfortunately I don't know which plugin are you using exactly.
It got sorted: lalcebo/json-schema#58
Glad to hear that, thanks for closing the ticket @alanwilter 🙇