rapi-doc / RapiDoc

RapiDoc -WebComponent for OpenAPI Spec
https://rapidocweb.com
MIT License
1.71k stars 285 forks source link

Unexpected result when using OpenAPI server templating #88

Closed mikemadisonweb closed 5 years ago

mikemadisonweb commented 5 years ago

Seems like OpenAPI server templating is not supported? Server part of the specification:

servers:
  - url: '{schema}://domain-from-spec.com/{basePath}'
    variables:
      basePath:
        enum:
          - v1
        default: v1
      schema:
        enum:
          - http
        default: http

Expected: http://domain-from-spec.com/v1 Actual: https://ui-domain.com{schema}://domain-from-spec.com/{basePath}

Are there any plans to implement server templating support?

mrin9 commented 5 years ago

thanks for bringing this up, it was completely overlooked. will implement this in our next patch

mrin9 commented 5 years ago

this is addressed in commit 729549f1a41f1d6d32501b1d125289faf9126038 you can test it out here https://mrin9.github.io/RapiDoc/examples/server-vars.html

you can either build it from master or wait for the next patch release