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

CodeAction to Generate Open API Annotations #239

Closed
angelozerr opened this issue Mar 11, 2020 · 6 comments
Closed

CodeAction to Generate Open API Annotations #239

angelozerr opened this issue Mar 11, 2020 · 6 comments
Assignees
Labels
code action enhancement New feature or request
Milestone

Comments

@angelozerr
Copy link
Contributor

This CodeAction to Generate Open API Annotations feature is supported by the IBM MicroProfile LS https://github.com/MicroShed/microprofile-language-server/blob/517056559d82244355b51365d6617caf5b36be1f/src/main/java/com/microprofile/lsp/internal/helper/SourceAssistHelper.java

The idea is to provide a CodeAction Generate Open API Annotations with CodeActionKind.Source to generate Open API annotations. The current implementation generates the @operation annotation for each methods of the class (see https://github.com/MicroShed/microprofile-language-server/blob/517056559d82244355b51365d6617caf5b36be1f/src/main/java/com/microprofile/lsp/internal/GenerateOpenAPIAnnotations.java#L78).

@angelozerr angelozerr self-assigned this Mar 11, 2020
@ericglau
Copy link
Collaborator

@angelozerr Let me know if you would like our team to help take a look at this one (if you haven't started working on it yet).

@angelozerr
Copy link
Contributor Author

@ericglau it should be very nice, but please wait for that I implement code action with extension point in #236 I'm working on this issue.

The idea is to :

  • provide an extension point to manage extensible code action
  • provide the same idea of JDT LS CodeActionHandler, I mean create changes by using JDT codemanipulation API and transform it to LSP WorkspaceEdit. The idea is to not work directly with WorkspaceEdit but working with DT codemanipulation API. Using DT codemanipulation API is powefull and can manage import (or not) of annotation when an annotation must be insert before a class (the issue of Support for MicroProfile Health CodeAction #236), canmanage formatting, etc.

I will ping you as soon as I will finish my work.

@angelozerr
Copy link
Contributor Author

angelozerr commented Mar 20, 2020

@ericglau CodeAction extension point are not merged in master.

It seems @bensonnw will work on this issue and he is aware about this CodeAction extension point.

@angelozerr angelozerr removed their assignment Mar 23, 2020
@bensonnw
Copy link
Collaborator

@angelozerr Please assign this to me

@angelozerr angelozerr added this to the v0.0.6 milestone Mar 30, 2020
@angelozerr
Copy link
Contributor Author

Fixed by #275

@xorye xorye added the enhancement New feature or request label Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code action enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants