Yelp / swagger_spec_validator

Other
104 stars 71 forks source link

Timeout of 1 second is too rigid #71

Closed obsidianstorms closed 6 years ago

obsidianstorms commented 7 years ago

It would be helpful if we could specify a timeout rather than being locked to 1 second. swagger_spec_validator/swagger_spec_validator/common.py

macisamuele commented 6 years ago

swagger_spec_validator.validator20.validate_(json|spec) allows you to pass your custom handlers. This gives you the possibility to use your preferred HTTP client implementation and timeouts (for the expected structure you can check on swagger_spec_validator.ref_validators.default_handlers.

It's true that we're not supporting it for swagger_spec_validator.validator12.validate_json. Please open a PR if you need that feature for Swagger1.2 specs. Closing it for now.