swagger-min
Show only the parts of a swagger document that you are interested in
Last updated a year ago by kjjuno .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install swagger-min 
SYNC missed versions from official npm registry.

swagger-min

Platform Badges
License License MIT
Circle CI CircleCI
Code Coverage Code Coverage
Documantation Documentation Status
NPM npm version npm downloads
Docker Docker Size Docker Pulls

Show only the parts of a swagger document that you are interested in

install swagger-min from npm

npm install -g swagger-min

show relevant swagger for POST /pet from https://petstore.swagger.io/v2/swagger.json

swagger-min --file https://petstore.swagger.io/v2/swagger.json --verb post --route /pet
paths:
  /pet:
    post:
      tags:
        - pet
      summary: Add a new pet to the store
      description: ''
      operationId: addPet
      consumes:
        - application/json
        - application/xml
      produces:
        - application/xml
        - application/json
      parameters:
        - in: body
          name: body
          description: Pet object that needs to be added to the store
          required: true
          schema:
            $ref: '#/definitions/Pet'
      responses:
        '405':
          description: Invalid input
      security:
        - petstore_auth:
            - 'write:pets'
            - 'read:pets'
definitions:
  Pet:
    type: object
    required:
      - name
      - photoUrls
    properties:
      id:
        type: integer
        format: int64
      category:
        $ref: '#/definitions/Category'
      name:
        type: string
        example: doggie
      photoUrls:
        type: array
        xml:
          name: photoUrl
          wrapped: true
        items:
          type: string
      tags:
        type: array
        xml:
          name: tag
          wrapped: true
        items:
          $ref: '#/definitions/Tag'
      status:
        type: string
        description: pet status in the store
        enum:
          - available
          - pending
          - sold
    xml:
      name: Pet
  Category:
    type: object
    properties:
      id:
        type: integer
        format: int64
      name:
        type: string
    xml:
        name: Category
  Tag:
    type: object
    properties:
      id:
        type: integer
        format: int64
      name:
        type: string
    xml:
        name: Tag

Current Tags

  • 0.1.0-beta.3                                ...           latest (a year ago)

9 Versions

  • 0.1.0-beta.3                                ...           a year ago
  • 0.1.0-beta.2                                ...           a year ago
  • 0.1.0-beta.1                                ...           a year ago
  • 0.1.0-alpha.6                                ...           a year ago
  • 0.1.0-alpha.5                                ...           a year ago
  • 0.1.0-alpha.4                                ...           a year ago
  • 0.1.0-alpha.3                                ...           a year ago
  • 0.1.0-alpha.2                                ...           a year ago
  • 0.1.0-alpha.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 14
Dependencies (6)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |