The Generator for MicroProfile Rest Client extension provides support for generating a MicroProfile REST Client interface template from an OpenAPI document in Visual Studio Code. This extension calls the openapi-generator to generate models and apis folders. The code for this extension is hosted under the MicroShed organization on GitHub. Learn more about MicroProfile Rest Client on GitHub.
- Install the extension
- Launch the VS Code command palette
(View -> Command Palette...), then selectMicroProfile: Generate a MicroProfile REST Clientto run the extension
The extension prompts for the following parameters:
- Path or url to an OpenAPI document
srcdirectory of project to generate into- Package name
- MicroProfile Rest client version
The extension will generate models and apis folders into the specified directory. The package name will be auto-filled based on the directory generated into.
Contributions to the Generator for MicroProfile Rest Client extension are welcome!
Our CONTRIBUTING document contains details for submitting pull requests.
To build and run the extension locally:
-
Fork this repository
-
Clone your fork:
git clone [email protected]:{your-username}/mp-rest-client-generator-vscode-ext.git -
cd mp-rest-client-generator-vscode-ext -
Create a branch for the issue you are going to work on:
git checkout -b branch-name-for-your-issue -
Install dependencies:
npm installandnpx openapi-generator-cli version -
Run the extension in VS Code by selecting
Run Extensionfrom the debug panel or by pressingF5Alternatively, build a
.vsixfile:- Run
vsce packageto generate themp-rest-client-generator-vscode-ext-xxx.vsixfile - Install the extension to VS Code by
View/Command Palette - Select
Extensions: Install from VSIX...and choose the generatedmp-rest-client-generator-vscode-ext-xxx.vsixfile
- Run
-
Generate a REST client by right-clicking on a folder and selecting "Generate a MicroProfile REST Client", or via the command palette by selecting "MicroProfile: Generate a MicroProfile REST Client"
Please report bugs, issues and feature requests by creating a GitHub issue.
MicroProfile® and the MicroProfile logo are trademarks of the Eclipse Foundation.
