saasify-to-openapi
Version:
Converts Saasify deployments to OpenAPI specs.
57 lines (39 loc) • 1.78 kB
Markdown
<p align="center">
<a href="https://saasify.sh" title="Saasify">
<img src="https://raw.githubusercontent.com/saasify-sh/saasify/master/logo-vert-white@4x.png" alt="Saasify Logo" width="256" />
</a>
</p>
# saasify-to-openapi
> Converts [Saasify](https://saasify.sh) deployments to [OpenAPI](https://swagger.io/docs/specification/about) specs.
[](https://www.npmjs.com/package/saasify-to-openapi) [](https://travis-ci.com/saasify-sh/saasify) [](https://standardjs.com)
## Install
```bash
npm install --save saasify-to-openapi
```
## Usage
```js
const convertSaasifyToOpenAPI = require('saasify-to-openapi')
const deployment = { /* ... */ }
const openAPI = await convertSaasifyToOpenAPI(deployment)
```
## Examples
See the test [fixtures](./fixtures) and their corresponding output [snapshots](./.snapshots/test.js.md) for conversion examples.
## TODO
Should any of these be injected by the saas client?
- [ ] info.x-logo
- [ ] info.termsOfService
- [ ] info.contact
- [ ] info.license (look into licensing options)
- [ ] info.description
- [ ] tags
- [ ] update correct path routes
- [ ] operation.security
- [ ] apiKey => API Key
- [ ] update security section
- [ ] add GET path
## Related
- [saasify](https://saasify.sh) - Saasify is the easiest way to launch your own SaaS.
- [fts](https://github.com/transitive-bullshit/functional-typescript) - TypeScript standard for rock solid serverless functions.
- [OpenAPI](https://swagger.io/docs/specification/about) - API specification.
## License
MIT © [Saasify](https://saasify.sh)