Redocly / redocly-cli

⚒️ Redocly CLI makes OpenAPI easy. Lint/validate to any standard, generate beautiful docs, and more.
https://redocly.com/docs/cli/
MIT License
943 stars 148 forks source link

lint command isn't working with URLs from API Registry used inline #850

Closed AntonKozachuk closed 1 year ago

AntonKozachuk commented 2 years ago

Describe the bug When you try to use the lint command and define API inline as a URL from API Registry, which has a branch query string, the command seems to break. At the same time, it works when used inside the apis section of the configuration file.

Example: redocly lint "https://api.redocly.com/registry/bundle/example/v1/latest/openapi.yaml?branch=release" The ?branch=release part seems to break the command.

To Reproduce Steps to reproduce the behavior:

  1. Add a definition to the API Registry or open an existing one.
  2. Copy the link to the definition's snapshot.
  3. Try to use it with the lint command.
  4. See error.

Expected behavior The lint command works as expected when used with URLs from the API Registry.

Logs N/a

OpenAPI definition N/a

Redocly Version(s) latest

Node.js Version(s) 15

Additional context Some context can be found here: redoc-ly.slack.com/archives/C02UHE7EL3E/p1661807377826659

lornajane commented 1 year ago

I'm not sure when this old issue was fixed, but retesting it today I cannot replicate the issue (and I'm sure I've used this before without a problem)