New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

swagger-include

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-include

## Example

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-28.57%
Maintainers
1
Weekly downloads
 
Created
Source

swagger-include

Example

api.yml

swagger: "2.0"
info:
  version: 1.0.0
  title: Swagger Petstore

includes:
  - './pet.yml'

definitions:
  Category:
    type: object
    properties:
      id:
        type: integr
        format: int64
      name:
        type: string

pet.yml

includes:
  - './pet/store.yml'
  - './pet/update.yml'

pet/store.yml

paths:
  /pet:
    post:
      tags:
        - pet
      summary: |
        Add a new pet to the store
      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

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
        items:
          type: string

pet/update.yml

paths:
  /pet:
    put:
      tags:
        - pet
      summary: |
        Update an existing pet
      parameters:
        - in: body
          name: body
          description: Pet object that needs to be added to the store
          schema:
            $ref: '#/definitions/Pet'
      responses:
        400:
          description: Invalid ID supplied

After swagger-include:

swagger: "2.0"
info:
  version: 1.0.0
  title: Swagger Petstore

paths:
  /pet:
    post:
      tags:
        - pet
      summary: |
        Add a new pet to the store
      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
    put:
      tags:
        - pet
      summary: |
        Update an existing pet
      parameters:
        - in: body
          name: body
          description: Pet object that needs to be added to the store
          schema:
            $ref: '#/definitions/Pet'
      responses:
        400:
          description: Invalid ID supplied

definitions:
  Category:
    type: object
    properties:
      id:
        type: integr
        format: int64
      name:
        type: string
  Pet:
    type: object
    required:
      - name
      - photoUrls
    properties:
      id:
        type: integer
        format: int64
      category:
        $ref: '#/definitions/Category'
      name:
        type: string
        example: 'doggie'
      photoUrls:
        type: array
        items:
          type: string

FAQs

Package last updated on 11 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc