All Projects → Mermade → Openapi Codegen

Mermade / Openapi Codegen

Licence: apache-2.0
OpenAPI 3.0 CodeGen plus Node.js minus the Java and emojis

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
typescript
32286 projects
clojure
4091 projects
groovy
2714 projects
bash
514 projects

Projects that are alternatives of or similar to Openapi Codegen

Kin Openapi
OpenAPI 3.0 implementation for Go (parsing, converting, validation, and more)
Stars: ✭ 776 (+246.43%)
Mutual labels:  api, swagger, openapi, openapi3, documentation
Awesome Openapi3
😎 A list of awesome projects related to OpenAPI 3.0.x, curated by the community
Stars: ✭ 469 (+109.38%)
Mutual labels:  api, swagger, openapi, openapi3, documentation
Apispec
A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
Stars: ✭ 831 (+270.98%)
Mutual labels:  api, swagger, openapi, openapi3, documentation
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (+130.36%)
Mutual labels:  api, swagger, openapi, openapi3, documentation
Widdershins
OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown
Stars: ✭ 856 (+282.14%)
Mutual labels:  api, swagger, openapi, openapi3, documentation
Mockoon
Mockoon is the easiest and quickest way to run mock APIs locally. No remote deployment, no account required, open source.
Stars: ✭ 3,448 (+1439.29%)
Mutual labels:  api, swagger, openapi, openapi3
Dredd
Language-agnostic HTTP API Testing Tool
Stars: ✭ 3,770 (+1583.04%)
Mutual labels:  api, swagger, openapi, openapi3
Swagger Node Codegen
An OpenAPI 3.x/Swagger 2 code generator for Node.js
Stars: ✭ 189 (-15.62%)
Mutual labels:  swagger, openapi, openapi3, codegen
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+17573.21%)
Mutual labels:  api, swagger, openapi, openapi3
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (-7.14%)
Mutual labels:  api, swagger, openapi, openapi3
Openapi Viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 82 (-63.39%)
Mutual labels:  api, swagger, openapi, openapi3
Swagger Combine
Combines multiple Swagger schemas into one dereferenced schema.
Stars: ✭ 102 (-54.46%)
Mutual labels:  api, swagger, openapi, documentation
Shins
Shins development continues at
Stars: ✭ 250 (+11.61%)
Mutual labels:  api, swagger, openapi, documentation
Angular Swagger Ui
An angularJS implementation of Swagger UI
Stars: ✭ 131 (-41.52%)
Mutual labels:  api, swagger, openapi, openapi3
Vue Openapi
OpenAPI viewer component for VueJS
Stars: ✭ 66 (-70.54%)
Mutual labels:  api, swagger, openapi, openapi3
L5 Swagger
OpenApi or Swagger integration to Laravel
Stars: ✭ 1,781 (+695.09%)
Mutual labels:  api, swagger, openapi, documentation
Openapi Directory
🌐 Wikipedia for Web APIs. Directory of REST API definitions in OpenAPI 2.0/3.x format
Stars: ✭ 2,635 (+1076.34%)
Mutual labels:  api, swagger, openapi, openapi3
Swagger Axios Codegen
swagger client to use axios and typescript
Stars: ✭ 143 (-36.16%)
Mutual labels:  swagger, openapi, codegen
Awesome Documentation Tools
🔥 📚 All the tools, processes and resources you need to create an awesome API & Project documentation
Stars: ✭ 138 (-38.39%)
Mutual labels:  api, swagger, documentation
Hapi Openapi
Build design-driven apis with OpenAPI (formerly swagger) 2.0 and hapi.
Stars: ✭ 196 (-12.5%)
Mutual labels:  api, swagger, openapi

OpenAPI-CodeGen

Build status

Node.js-based codegen for OpenAPI documents. This project was initially a 24-hour hackathon. The local model adaptor code is entirely original and has been reverse-engineered from the existing documentation and template usage.

Work in progress

Supports OpenAPI 3.0.x natively, and Swagger/OpenAPI 1.2 and 2.0 by internal conversion. Node.js LTS versions are supported.

Usage

Installing

npm i -g openapi-codegen

or

  • clone the repository, and
  • npm i

or

npx -p openapi-codegen cg ...

CLI

cg [options] {[path]configName} {openapi-definition}

Options:
  --help           Show help                                           [boolean]
  --version        Show version number                                 [boolean]
  --filter         Filter term to use with --list                       [string]
  --list           List available templates for provider (og or sc)     [string]
  -d, --debug      Turn on debugging information in the model          [boolean]
  -f, --flat       Do not include config-name in output directory structure
                                                                       [boolean]
  -l, --lint       Lint input definition                               [boolean]
  -o, --output     Specify output directory         [string] [default: "./out/"]
  -s, --stools     Use swagger-tools to validate OpenAPI 2.0 definitions
                                                                       [boolean]
  -t, --templates  Specify templates directory                          [string]
  -v, --verbose    Increase verbosity                                  [boolean]
  -z, --zip        Create a .zip file instead of individual files      [boolean]

e.g.

node cg --verbose nodejs defs/generator.yaml

In this case, the generated code will be written to the .out/nodejs directory.

You can also load the OpenAPI definition from a URL.

API

const renderer = require('openapi-codegen');
// load a config and a definition
renderer.main(definition,config,configName);

Templates

The local templates were taken directly from swagger-codegen. This project is also licensed under Apache-2.0 for this reason. Generated code is explicitly covered by the Unlicense. Code to downconvert OpenAPI 3.0 definitions is taken from Angular-Swagger-UI and is MIT licensed.

You can also use the latest online templates from two providers: og (openapi-generator) and sc (swagger-codegen). The --list and --filter options allow you to see which templates are available. Note that using the online templates involves sending your API definition to a remote server.

Contributors

See here for a partial list of template contributors.

Status of the template configurations

The local templates with a status have a working (if not necessarily tested) configuration in the configs directory. Contributions are welcomed from the community of new and updated configurations and template updates.

Click here to expand...
Template Type Status README Authors (TODO) Config Maintainer
_common meta contains Apache-2.0 and Unlicense licenses
Ada client Untested
akka-scala
android
apache2 configuration needs work
apex
aspnetcore
bash client Syntax ok, needs testing @bkryza @MikeRalphson
clojure client Untested
codegen meta Demo only @MikeRalphson
confluenceWikiDocs documentation Tested with Docker server
cpprest
csharp
csharp-dotnet2 client Untested
dart
debug meta used for dumping the model state @Mermade @MikeRalphson
Eiffel
elixir
erlang-client client Untested
erlang-server server
finch
flash
flaskConnexion server Needs testing
go client Builds, needs testing
go-server server Builds and runs
Groovy ? untested
haskell-http-client client
haskell-servant server Untested
htmlDocs documentation Appears to work
htmlDocs2 documentation Appears to work, no console errors logged
Java
JavaInflector
JavaJaxRS
JavaPlayFramework
Javascript client Untested
Javascript-Closure-Angular client Untested
JavaSpring
JavaVertXServer
JMeter meta Untested
kotlin-client
lua client Compiles OK
lumen
MSF4J
nancyfx
nodejs server tested @jfiala @MikeRalphson
objc
openapi meta outputs the input definition (in OpenAPI 3.0.x form) @Mermade @MikeRalphson
perl
php
php-silex ? untested
php-symfony
pistache-server
powershell
python client needs testing @mpnordland
qt5cpp
r
rails5
restbed server Untested
ruby
rust
rust-server
scala
scalatra
scalaz client Untested
sinatra server Syntax checks OK
slim server Untested
swagger meta outputs the input definition (in original form if OpenAPI 2.0)
swagger-static documentation tested template modified to include partials
swift
swift3
swift4
tizen
typescript-angular
typescript-angularjs
typescript-axios client tested jaredpalmer
typescript-aurelia
typescript-fetch client compiles with tsc ok
typescript-jquery
typescript-node client compiles with tsc ok
undertow
validator meta uses swagger2openapi's OpenAPI 3.0 validator internally
ze-ph

New Templates

These templates are examples of how features of OpenAPI Codegen may be used, and best-practices in naming model properties.

Template Type Status README Authors Config Maintainer
testing.dredd testing In progress README @Mermade @MikeRalphson

Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].