Developer Portal Smart Docs Multiple Hosts for API

kkhanna
Participant IV

I have an API which is exposed over 1 way (internal clients) and 2 way TLS (external clients). The Swagger Specification/Open API will need to have two host entries. While Open API 3.0 supports multiple hosts in the spec, the developer portal doesn’t support it yet.

What are some of the ways I can get around this so that:

1. I can indicate two hosts on the smart Docs documentation page explaining their usage context

2. Allow developers to select a host before sending the request

Does anyone else have this use case? How have you addressed it? Are you hosting two swagger specs ?

Thanks!

0 1 550
1 REPLY 1

@kkhanna

You can update the smartdoc template & hardcode other host. See example here. I don't think there is a way to select host before sending the request. Definitely Possible to build one as customisation by hacking the Smartdocs JS code.

Yes, You always have an option to have two swagger specs / models.

Hope it helps.