Open alexej-strelzow opened 5 years ago
In addition, correct schema is wrongly validated as false.
E.g. adding events to producer below:
apps:
- name: "login"
consumer:
- event: "#/definitions/Register"
- event: "#/definitions/Next"
- event: "#/definitions/Destroy"
producer:
Thanks for the issue. Would you be willing to add these test cases to the unit tests via PR?
Hi @paazmaya : I'm going to take another path and won't pursue yaml-validator anymore. I'm sorry.
Any success here, I have same issue with schema validation :( yaml file:
VRO.PLUGINS.USAGE.VCACCAFE: description: n/a weight: 0 impact: '' VRO.PLUGINS.USAGE.VCACCAFEINFRASTRUCTURE: weight: 0 impact: '' remedy: '[TBD]' CONTENT.COE: description: n/a weight: 0 impact: '' remedy: '[TBD]' CONTENT.SOVLABS: description: n/a weight: 0 impact: '' remedy: '[TBD]'
current configuration
const options = {
log: 'false',
structure: {
'id?': {
'description!': 'string',
'weight!': 'number',
'impact!': 'string',
'remedy!': 'string'
}
},
onWarning: undefined,
writeJson: false
};
const validator = new YamlValidator(options);
validator.validate([yamlFile]);
First record is missing "description", second one missing: "remedy".
If we have duplicate key it's working, but if something is missing from YAML file it's saying no errrors.
Hi, any update on this? It looks like this still exists on the latest version.
Expected behaviour
options.structure should get considered by validator see bottom of this ticket, change e.g. description from string to number -> no effect
Actual behaviour
using options.structure with a structure object always works
report() always returns 1 and no warning gets printed out
Versions and environment
Thank you and have some :grapes:.
api.yml
api-schemal.validator.ts