Generator-OpenAPI-Generator is an OpenAPI Generator projects generator using Plop.
It provides the following components:
| Component | Description |
|---|---|
| oag-file-spec | Generate a project to generate OpenAPI Generator using a file specification. |
| oag-url-spec | Generate a project to generate OpenAPI Generator using a URL specification. |
All components are built using Swaggy C.
Generate OAG with file specification project:
make generate-oag-file-spec
Generate OAG with URL specification project:
make generate-oag-url-spec
Both components will prompt you the following inputs:
| Prompt | Description |
|---|---|
| Project ID | Used for package names and project repo name. |
| Project Name | Used in documentation or comments. |
| Project Description | Used in documentation or comments. |
| Author Name | The name of the project author. |
| Author Email | The email of the project author. |
| Author URL | The author's website URL. |
| GitHub ID | The GitHub ID of the project repo. |
Move to the generated project directory:
cd stage/<component>/
Initial configuration file for each OAG language:
make init-generators-config
For the primary languages, modify the configuration file to include the following:
(NOTE: configuration properties can be found in the OpenAPI Generator Mustache templates
{
"projectName": "<project_id>",
"packageName": "<project_id>",
"packageVersion": "<version>",
"gitUserId": "<github_id>",
"gitRepoId": "<project_id>"
}
{
"projectName": "<project_id>",
"packageName": "<project_id>",
"packageVersion": "<version>",
"packageUrl": "https://github.com/<github_id>/<project_id>",
"gitUserId": "<github_id>",
"gitRepoId": "<project_id>"
}
{
"gemName": "<project_id>",
"moduleName": "<ProjectId>",
"gemVersion": "<version>",
"gemAuthor": "<author_name>",
"gemAuthorEmail": "<author_email>",
"gemHomepage": "https://github.com/oapicf/<project_id>",
"gemLicense": "MIT",
"gemRequiredRubyVersion": ">= 3.0",
"gitUserId": "<github_id>",
"gitRepoId": "<project_id>"
}
Related Projects:
- Swaggy C - Builder for OpenAPIGenerator-generated API clients in multiple languages