swagger ui - best way to tell swaggerui where the host is -
when build swagger.json file not know host use. can work out when page hosts swaggerui loads (in fact might want offer user choice). hoped see options.host on config swaggerui object - dont see one. there existing way of doing cant find or have hack way through code , add capability (pointers best place welcome)
two ways
one modify swagger.js accepts host option. swagger-ui passes options swagger-js works. submitted pull swagger-js fix
second choice swagger-ui accepts 'spec' parameter. means hosting page can load swagger.json file, json.parse , set 'host' in , pass swaggerui constructor. harder caller doesn't require code changes swagger
Comments
Post a Comment