https://github.com/buildo/metarpheus-swagger
metarpheus interpreter producing Swagger specs
https://github.com/buildo/metarpheus-swagger
Last synced: over 1 year ago
JSON representation
metarpheus interpreter producing Swagger specs
- Host: GitHub
- URL: https://github.com/buildo/metarpheus-swagger
- Owner: buildo
- License: mit
- Created: 2016-02-24T14:26:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-11T11:17:38.000Z (about 10 years ago)
- Last Synced: 2025-01-21T03:41:35.228Z (over 1 year ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# metarpheus-swagger
metarpheus interpreter producing Swagger specs
[](https://travis-ci.org/buildo/metarpheus-swagger)
## Try it!
```sh
npm start
```
Will read `input.json` and produce `swagger.json` and `swagger.yaml`.
You can copy-paste the yaml output to http://editor.swagger.io and see the result.
### Custom Types
If you need custom type mappings, you can provide a json file structured like:
```json
{
"MyType": { "type": "number", "format": "double" },
"MyOtherType": { "type": "object" }
}
```
Pass the file using the `-t` or `--customTypes` option, e.g.
```sh
node --harmony-destructuring --harmony_default_parameters index.js -t customTypes.json input.json
```
## Development
```sh
npm run watch
```
Same as `npm start`, but it will watch the source files.