https://github.com/squeezerio/squeezer-swagger
Swagger Docs Serverless Plugin. This plugin enables Swagger API Documentation support within the Squeezer Framework.
https://github.com/squeezerio/squeezer-swagger
Last synced: 11 months ago
JSON representation
Swagger Docs Serverless Plugin. This plugin enables Swagger API Documentation support within the Squeezer Framework.
- Host: GitHub
- URL: https://github.com/squeezerio/squeezer-swagger
- Owner: SqueezerIO
- License: mit
- Created: 2017-08-15T09:31:10.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-16T09:17:46.000Z (over 8 years ago)
- Last Synced: 2025-03-09T00:33:54.500Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 411 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# squeezer-swagger
Swagger API Docs Squeezer Plugin . This plugin enables Swagger API Docs support within the Squeezer Framework.
[](https://Squeezer.IO)
[](https://travis-ci.org/SqueezerIO/squeezer-swagger)
[](https://badge.fury.io/js/squeezer-swagger)
[]()
### Installation
`cd PROJECT_DIR`
`npm i squeezer-swagger --save`
### Activate the plugin
*PROJECT_DIR/squeezer.yml*
```yaml
plugins:
- name: squeezer-swagger
path: node_modules
```
### Squeezer Global Config
```
.
PROJECT_DIR
└─squeezer.yml
```
`squeezer.yml` :
```yaml
swagger:
info:
title: My API Docs
description: detailed docs for my API endpoints
definitions:
ErrorResponse:
type: object
properties:
message:
type: string
default: error message
code:
type: string
default: error code
statusCode:
type: integer
default: 400
```
### Functions Configs
You can add paths and definitions for a specific function on your project.
```
PROJECT_DIR
└─services/
└── hello
└──function1
├── handler.js
└── sqzueezer.yml
```
`squeezer.yml` :
```yaml
swagger:
paths:
/pet:
post:
tags:
- "pet"
summary: "Add a new pet to the store"
description: "long description"
operationId: "addPet"
consumes:
- "application/json"
- "application/xml"
produces:
- "application/xml"
- "application/json"
definitions:
Pet:
type: "object"
required:
- "name"
- "photoUrls"
properties:
id:
type: "integer"
format: "int64"
```