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

hide-hostname option adds a slash - openapi 3.0 #1428

Closed
codyaray opened this issue Oct 23, 2020 · 3 comments · Fixed by #1448
Closed

hide-hostname option adds a slash - openapi 3.0 #1428

codyaray opened this issue Oct 23, 2020 · 3 comments · Fixed by #1448
Assignees

Comments

@codyaray
Copy link

Either a regression or a miss on the fix for #201. My guess is that this may be specific to openapi 3.0, as that's what I'm using and 3.0 wasn't yet supported when #201 was closed.

I'm seeing this using redoc-cli@0.9.12 (which uses redoc 2.0.0-rc40) with an openapi 3.0 spec with a single server.

Reproduction steps:

---
openapi: 3.0.0
info:
  title: Test API
  version: 0.0.1

servers:
  - url: https://api.example.com

paths:
  /some/example/path:
    get:
      responses:
        '204':
          description: No Content.

Then bundle it

$ redoc-cli --version
0.9.12

$ redoc-cli bundle openapi.yaml --options.hideHostname
$ open redoc-static.html

This is what you see when you click the dropdown:
Screen Shot 2020-10-22 at 8 21 33 PM

@codyaray
Copy link
Author

Quick investigation looks like it was independently re-introduced here:

{hideHostname || options.hideHostname

Note that the pathname defaults to "/" instead of "" when its empty, causing this issue again. Validation:
Screen Shot 2020-10-22 at 8 32 48 PM

@adamaltman
Copy link
Member

Thanks for the bug report.

@RomanHotsiy
Copy link
Member

This will be released with the new rc later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants