Redocly / redocly-vs-code

Redocly VS Code extension
35 stars 6 forks source link

Handle multi-root Workspaces #37

Open IgorKarpiuk opened 2 years ago

IgorKarpiuk commented 2 years ago

What should we improve?

Users can have several projects in vs code workspace . Each project can have its own configuration file. The goal is to find the correct configuration depending on the file selected by the user and highlight errors and warnings in OpenAPI definition files according to the configuration

How should we improve it?

The extension should select the root folder and look for the configuration file there depending on the file opened by the user

Why should we improve it?

Currently, the extension does not work correctly with Multi-root Workspaces

Describe alternatives you've considered

To do nothing

Additional context

Multi-root Workspaces

unional commented 11 months ago

Just sharing that I also have the same need.

jeremyfiel commented 10 months ago

Would be great to have this functionality! @lornajane

adamaltman commented 8 months ago

Does the apis feature of the config file, where you can specify different paths to the root files serve as an alternative?

apis:
  example1: 
     root: ./path/to/file.yaml
     rules:
       # some rules
  example2: 
     root: ./path/to/file.yaml
     rules:
       # some rules
IgorKarpiuk commented 8 months ago

@adamaltman I think it does not. Because we always select the configuration file from the root of the first workspace. if the order of the workspaces is changed or the user closes the workspace with the configuration file, it will stop working.