Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default server renders incorrectly #228

Open
xgp opened this issue Nov 18, 2022 · 0 comments
Open

Default server renders incorrectly #228

xgp opened this issue Nov 18, 2022 · 0 comments

Comments

@xgp
Copy link

xgp commented Nov 18, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant