Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cliffano/generator-openapi-generator

Plop generator for OpenAPI Generator
https://github.com/cliffano/generator-openapi-generator

code-generator openapi openapi-generator

Last synced: 15 days ago
JSON representation

Plop generator for OpenAPI Generator

Awesome Lists containing this project

README

        

Avatar

[![Build Status](https://github.com/cliffano/generator-openapi-generator/workflows/CI/badge.svg)](https://github.com/cliffano/generator-openapi-generator/actions?query=workflow%3ACI)
[![Security Status](https://snyk.io/test/github/cliffano/generator-openapi-generator/badge.svg)](https://snyk.io/test/github/cliffano/generator-openapi-generator)

Generator-OpenAPI-Generator
---------------------------

Generator-OpenAPI-Generator is an OpenAPI Generator projects generator using [Plop](https://plopjs.com/).

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](https://github.com/cliffano/swaggy-c).

Usage
-----

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//

Initial configuration file for each OAG language:

make init-langs-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](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources)

### Javascript

{
"projectName": "",
"packageName": "",
"packageVersion": "",
"gitUserId": "",
"gitRepoId": ""
}

### Python

{
"projectName": "",
"packageName": "",
"packageVersion": "",
"packageUrl": "https://github.com//",
"gitUserId": "",
"gitRepoId": ""
}

### Ruby

{
"gemName": "",
"moduleName": "",
"gemVersion": "",
"gemAuthor": "",
"gemAuthorEmail": "",
"gemHomepage": "https://github.com/oapicf/",
"gemLicense": "MIT",
"gemRequiredRubyVersion": ">= 3.0",
"gitUserId": "",
"gitRepoId": ""
}

Colophon
--------

Related Projects:

* [Swaggy C](https://github.com/cliffano/swaggy-c) - Builder for OpenAPIGenerator-generated API clients in multiple languages