Skip to content
New issue

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

Not able to validate 'URL' fields in swagger specification like tokenURL #197

Open
arpitgarg1 opened this issue Dec 22, 2018 · 1 comment

Comments

@arpitgarg1
Copy link

In swagger spec, attributes with URI as value instead of URL not giving any validation error/warnings.
For example tokenURL in securitydefinitions requires 'URL' as per OAS 2.0 standards.
But providing URI, sway library not throwing any errors. Although the appropriate error, receive in swagger editor through manual upload of same swagger spec.
securityDefinitions:
ios:
type: oauth2
tokenUrl: /oauth/token

No error comes with the above example using sway library for validation.
Refer: OAS 2.0 documentation link. See 'tokenURL' description.

Please fix this validation in code. And this error needs to be fixed for every URL property.

@arpitgarg1 arpitgarg1 changed the title Not able to validate URL in swagger specficiation Not able to validate 'URL' fields in swagger specification like tokenURL Dec 22, 2018
@whitlockjc
Copy link
Member

This is new to me, I would expect the JSON Schema from the OAS to catch this. Let me do some digging and we'll get to the bottom of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants