Closed grabbou closed 9 years ago
Good point - but this issue belongs to hapi-swaggered-ui. hapi-swaggered does not have any control about that. (But one of them could offer a built-in validator.)
I opened an issue z0mt3c/hapi-swaggered-ui#5 to add the missing configuration options. But i'm not sure if should really toggle it based on "localhost" or the validation should just be off as default. I guess most apis are running private and not on localhost (except during development). What do you think?
Ah, true. That's UI stuff :)
Well, maybe we should check if NODE_ENV === production and if so, display the validator? Obviously, user should be able to explicitly overload that config by passing enableValidation
boolean or something similar. How that sounds?
Seem the current swagger-ui doesnt even contain a default validation url anymore. Follow up in z0mt3c/hapi-swaggered-ui
Useful, otherwise it shows "error" suggesting there's a mistake in the generated API docs.