teambition / swaggo

Convert Go annotations to Swagger Documentation (version 2.0)
MIT License
72 stars 13 forks source link

HTTP和HTTPS 如何分别设置 Host?? #5

Open chenyu1990 opened 5 years ago

chenyu1990 commented 5 years ago

Can I specify multiple hosts, e.g. development, test and production? Multiple hosts are supported in OpenAPI 3.0. 2.0 supports only one host per API specification (or two if you count HTTP and HTTPS as different hosts). A possible way to target multiple hosts is to omit the host and schema from your specification and serve it from each host. In this case, each copy of the specification will target the corresponding host.

英文不太好,括号里的or two if you count HTTP and HTTPS as different hosts这句,应该是说支持吧?