This repository has been archived by the owner on Aug 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 374
v1.2 Semantic Validation #1
Comments
Regarding the |
Thanks Ron, that helped a lot. I went back and updated the issue to reflect. |
Based on what is known right now, this issue is complete. Please file bugs/enhancements related to semantic validation as new issues. |
Closed
nelson-perez
added a commit
to nelson-perez/swagger-tools
that referenced
this issue
Oct 9, 2017
When there is an array type that should strings and the first parameter is a valid number it converts to number instead of letting be string. The culprit is that it is blindly calling JSON.Parse(value) will convert it into a single number the same will happen if we want a string and we get back an object. This is an issue: apigee-127#1 Because there should be a string not whatever is been parsed by JSON apigee-127#2 If we apply a pattern to an array of "string" and the object it is not a string it will throw an exception of val.match() is not a function on: /swagger-tools/lib/validator.js @ line 441: if (!_.isUndefined(pattern) && _.isNull(val.match(new RegExp(pattern)))) { Throws the exception val.match is not a function.
nelson-perez
added a commit
to nelson-perez/swagger-tools
that referenced
this issue
Oct 9, 2017
When there is an array type that should strings and the first parameter is a valid number it converts to number instead of letting be string. The culprit is that it is blindly calling JSON.Parse(value) will convert it into a single number the same will happen if we want a string and we get back an object. This is an issue: apigee-127#1 Because there should be a string not whatever is been parsed by JSON apigee-127#2 If we apply a pattern to an array of "string" and the object it is not a string it will throw an exception of val.match() is not a function on: /swagger-tools/lib/validator.js @ line 441: if (!_.isUndefined(pattern) && _.isNull(val.match(new RegExp(pattern)))) { Throws the exception val.match is not a function.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We need to do more than just structural validation of the Swagger files:
***** The validation requires both the resource listing file and the API declaration/resource files
Errors
Warnings
The text was updated successfully, but these errors were encountered: