docusaurus-openapi icon indicating copy to clipboard operation
docusaurus-openapi copied to clipboard

Default server renders incorrectly

Open xgp opened this issue 3 years ago • 0 comments

My openapi spec file: https://github.com/p2-inc/phasetwo-docs/blob/master/openapi.yaml The result: https://phasetwo.io/api

For example in this page https://phasetwo.io/api/get-organizations the server section doesn't render with the defaults, and the values are undefined in the curl/code examples: image

But renders correctly when you expand the server section and select an option: image

Here is the relevant part of the openapi spec:

servers:
  - url: '{protocol}://{host}{port}/auth/realms'
    variables:
      host:
        enum:
          - app.phasetwo.io
          - localhost
        default: app.phasetwo.io
        description: API host
      port:
        enum:
          - ''
          - '8081'
        default: ''
        description: API port
      protocol:
        enum:
          - http
          - https
        default: https

xgp avatar Nov 18 '22 21:11 xgp