abelsilva / swaggerwcf

Swagger for WCF
Apache License 2.0
132 stars 94 forks source link

Disable/Set Swagger Validator #63

Open guitarultimate opened 7 years ago

guitarultimate commented 7 years ago

Is it possible to set or disable (null) the validator url via swagger wcf config?

https://github.com/swagger-api/swagger-ui#parameters

abelsilva commented 7 years ago

Currently this is not possible, To change that parameter, it's necessary to change the swagger ui source code

If swagger ui starts supporting passing that parameter in the URL it will be easy to implement this

VosWouter87 commented 7 years ago

Don't they already do? I think they claim that with this issue: https://github.com/swagger-api/swagger-ui/issues/630

abelsilva commented 7 years ago

they do, but not as an URL parameter, the configuration is inside the js code

to make it work it would need a change to swagger-ui code

More info: https://github.com/swagger-api/swagger-ui/issues/1698

cakephp-swagger is implementing it like this: https://github.com/alt3/cakephp-swagger/commit/72e235cb850513dd868ac4b97f6396b77703e0fa They change the index of swagger-ui to be able to do it

Might be an option to change the index file or even try to regex the file and automatically inject the option in the right place

KristelJL commented 7 years ago

Hi, Is there any update on this? Still validation can't be turned off?

Thanks