0.0.7 • Published 6 years ago

squeezer-swagger v0.0.7

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

squeezer-swagger

Swagger API Docs Squeezer Plugin . This plugin enables Swagger API Docs support within the Squeezer Framework.

Squeezer.IO Build Status npm version DUB

Installation

cd PROJECT_DIR

npm i squeezer-swagger --save

Activate the plugin

PROJECT_DIR/squeezer.yml

plugins:
  - name: squeezer-swagger
    path: node_modules

Squeezer Global Config

.
PROJECT_DIR
└─squeezer.yml

squeezer.yml :

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 :

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"
0.0.7

6 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago