Skip to content

koding/koding-api-codegen

Repository files navigation

koding-api-codegen

Koding API Codegen over Swagger Codegen. This package is intended to generate client and server code for Koding API with the languages supported by Swagger Codegen. Due to some limitations for code generation, this package updates generated code based on the language specific postprocess.

Getting Started

Clone the repository and do npm install as usual, then;

  node generate.js

This will read the swagger.json in the same folder and generate koding-api (in JS by default) client code with Swagger's Online Generator on https://generator.swagger.io

If you need to generate code in golang for example;

  node generate.js go

All generated code will have koding-api-LANGUAGE directory.

Development

If you need to make some manual changes on the generated code, you can use the postprocess feature, which will work per language and you can find the example one for JavaScript in postprocess/javascript.js. Postprocess will include list of changes;

  [
    [ FILEPATH, REGEXP, NEWTEXT ], # Change 1
    [ FILEPATH, REGEXP, NEWTEXT ]  # Change 2
  ]

LICENSE

This repository is licensed under GNU AGPL V3

About

Koding API Codegen for Swagger Codegen

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published