We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I am using an external schema from a swagger file but when I validate data, it always return true.
The code
const swagger = YAML.load('./src/swagger.yaml') const validate = validator({ required: true, type: 'array', items: { $ref: '#/definitions/PostItem' } }, { verbose: true, schemas: { definitions: swagger.definitions }) const result = validate(items) return { result, errors: validate.errors}
I also have tried loading in the whole swagger file with schemas: swagger.
schemas: swagger
This is PostItem definition in yaml format
PostItem
PostItem: allOf: - $ref: '#/definitions/Item' - type: object required: - type - quantity properties: type: $ref: '#/definitions/Type' quantity: type: integer minimum: 0
I have tried putting in the schema manually and it was validating it correctly. I really don't want to rewrite parts of my schema just for this.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I am using an external schema from a swagger file but when I validate data, it always return true.
The code
I also have tried loading in the whole swagger file with
schemas: swagger
.This is
PostItem
definition in yaml formatI have tried putting in the schema manually and it was validating it correctly. I really don't want to rewrite parts of my schema just for this.
The text was updated successfully, but these errors were encountered: