redocly-vs-code icon indicating copy to clipboard operation
redocly-vs-code copied to clipboard

Handle multi-root Workspaces

Open IgorKarpiuk opened this issue 2 years ago • 4 comments

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

IgorKarpiuk avatar Aug 15 '22 12:08 IgorKarpiuk

Just sharing that I also have the same need.

unional avatar Sep 25 '23 04:09 unional

Would be great to have this functionality! @lornajane

jeremyfiel avatar Nov 09 '23 16:11 jeremyfiel

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

adamaltman avatar Dec 22 '23 00:12 adamaltman

@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.

IgorKarpiuk avatar Dec 22 '23 14:12 IgorKarpiuk