Redocly / Redocly/redocly-cli

Support URL in `preview` command

Open
#1,448 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

p2 question Type: Enhancement
Dominant language
TypeScript
Stars
1.5k
Forks
228
Avg merge
1d 14h
Merged PRs (30d)
48

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the preview command entry point and trace how its input argument currently handles local paths. Add support for the URL form shown in the issue, then verify that the example remote petstore specification can be previewed locally.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.