https://github.com/koding/koding-api-codegen
Koding API Codegen for Swagger Codegen
https://github.com/koding/koding-api-codegen
api koding swagger
Last synced: 6 months ago
JSON representation
Koding API Codegen for Swagger Codegen
- Host: GitHub
- URL: https://github.com/koding/koding-api-codegen
- Owner: koding
- License: agpl-3.0
- Created: 2017-04-07T05:30:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-29T07:39:02.000Z (over 8 years ago)
- Last Synced: 2025-01-20T10:11:32.685Z (12 months ago)
- Topics: api, koding, swagger
- Language: JavaScript
- Size: 222 KB
- Stars: 0
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/swagger-api/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;
```shell
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;
```shell
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;
```javascript
[
[ FILEPATH, REGEXP, NEWTEXT ], # Change 1
[ FILEPATH, REGEXP, NEWTEXT ] # Change 2
]
```
## LICENSE
This repository is licensed under GNU AGPL V3