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

Pin the OpenAPI button #78

Closed
Sparticuz opened this issue Aug 26, 2020 · 5 comments
Closed

Pin the OpenAPI button #78

Sparticuz opened this issue Aug 26, 2020 · 5 comments

Comments

@Sparticuz
Copy link

Sparticuz commented Aug 26, 2020

It would be nice and less jarring if the OpenAPI button would not disappear if I switch to another file. Maybe if the extension sees a swagger.json or openapi.yml, etc... file in the project it would not disappear.

EDIT: It would also allow me to quickly get back to my api design to make any changes or reference any paths

@ak1394
Copy link
Collaborator

ak1394 commented Sep 3, 2020

Thanks for your feedback! I'll discuss it with the team, but for now I think it might be a reasonable approach to show OpenAPI button in the activity bar if user did open at least one OpenAPI file, and never hide it even if user switches away from the OpenAPI file.

What do you think?

vfateev added a commit that referenced this issue Nov 5, 2020
vfateev added a commit that referenced this issue Nov 5, 2020
@vfateev
Copy link
Collaborator

vfateev commented Nov 5, 2020

Fixed

@vfateev vfateev closed this as completed Nov 5, 2020
@ak1394
Copy link
Collaborator

ak1394 commented Nov 11, 2020

So, we've fixed the issue using the new 'viewsWelcome' API, and this will make it so the OpenAPI button is shown at all times, from the start even if there is no OpenAPI files open.

ak1394 pushed a commit that referenced this issue Jan 24, 2022
ak1394 pushed a commit that referenced this issue Jan 24, 2022
@lautriva
Copy link

Sorry to bring back the issue
I found your extension recently and I have a question regarding this issue

My use case: I use vscode for many different projects and a majority of them doesn't require OpenAPI (example: working on a video game)

Would it be possible to have a workspace setting to either globally show or hide the OpenApi button?

Another approach would be to only show the button if the current file opened is openapi.yml (or a file in a new user-defined setting where they put a list of files, something like files.readonlyInclude but for a whitelist of files defined as OpenAPI file)

@ak1394
Copy link
Collaborator

ak1394 commented Aug 12, 2024

Hi @lautriva this is something best handled by VS Code itself. I think you can enable/disable extensions per workspace (click on a gear icon in the extensions and there would be something like Disable (Workspace). Else, maybe using Profiles will be more convenient https://code.visualstudio.com/docs/editor/profiles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants