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

Support URL in preview command #1448

Open
ArtFlag opened this issue Feb 22, 2024 · 4 comments
Open

Support URL in preview command #1448

ArtFlag opened this issue Feb 22, 2024 · 4 comments
Labels
p2 question Further information is requested Type: Enhancement

Comments

@ArtFlag
Copy link

ArtFlag commented Feb 22, 2024

Is your feature request related to a problem? Please describe.

I store my specs on a remote url and I would like to preview them locally but npx -y @redocly/cli preview doesn't seem to take urls, only local paths. I'm getting Unknown argument.

Describe the solution you'd like

I'd like for this command to take URLs. For example, with the pet store API on a gist:

npx -y @redocly/cli preview https://gist.githubusercontent.com/adityamenon/9d43f0a00dd4b49e7af8/raw/a5eb31931dd140e92cda0642948f8dbfe382009a/petstore.yaml
@ArtFlag
Copy link
Author

ArtFlag commented Feb 22, 2024

Seems I was using preview instead of preview-docs, which does what I need 👍

@ArtFlag ArtFlag closed this as completed Feb 22, 2024
@adamaltman adamaltman reopened this Feb 23, 2024
@adamaltman
Copy link
Member

Reopening because I think the preview command should accept a URL as well as an input.

@lornajane
Copy link
Collaborator

@adamaltman could you say more about which URLs should be supported? preview is for running realm locally in develop mode. To preview docs with open source Redoc, the preview-docs command is correct and that does support an OpenAPI file either with a local path or with a remote URL.

@lornajane lornajane added the question Further information is requested label Feb 28, 2024
@adamaltman
Copy link
Member

preview command should work in the same way as preview-docs and work with a remote URL.

@lornajane lornajane added the p2 label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2 question Further information is requested Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants