Skip to content

Instantly share code, notes, and snippets.

@gabizinha12
Created March 26, 2021 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabizinha12/3428b543b3e6f9787499cf1ebe6e158d to your computer and use it in GitHub Desktop.
Save gabizinha12/3428b543b3e6f9787499cf1ebe6e158d to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
description: This is a simple API
version: 1.0.0
title: VUTTR
# put the contact info for your development or API team
contact:
email: gabrielle.clima23@gmail.com
license:
name: MIT
url: http://www.apache.org/licenses/LICENSE-2.0.html
# tags are used for organizing operations
tags:
- name: tools
description: Endpoints
paths:
/tools/{tag}:
get:
tags:
- tools
parameters:
- in: path
name: tag
description: pass an tag to get tool
required: true
type: string
summary: searches tools
operationId: searchToolsbyTag
description: |
produces:
- application/json
responses:
200:
description: search results matching criteria
schema:
type: array
items:
$ref: '#/definitions/Tool'
/tools:
get:
tags:
- tools
summary: searches tools
operationId: searchTools
description: |
produces:
- application/json
responses:
200:
description: search results matching criteria
schema:
type: array
items:
$ref: '#/definitions/Tool'
/tools/{id}:
delete:
tags:
- tools
summary: deletes tools by id
operationId: deleteToolsbyId
produces:
- application/json
parameters:
- in: path
name: id
description: pass an id to delete tool
required: true
type: string
responses:
204:
description: Success
schema:
type: array
items:
$ref: '#/definitions/Tool'
description: Deletes tools by id
/tools:
post:
tags:
- tools
summary: adds an tool
operationId: addTool
description: Adds an item to the API
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: Tool
description: Tool item to add
schema:
$ref: '#/definitions/Tool'
responses:
201:
description: item created
400:
description: invalid input, object invalid
definitions:
Tool:
type: object
required:
- id
- title
- description
- link
- tags
properties:
title:
type: string
example: hotel
link:
type: string
format: string
example: 'https://github.com/typicode/hotel'
description:
type: string
format: string
example: "Local app manager. Start apps within your browser, developer tool with local localhost domain and https out of the box"
tags:
type: array
items:
type: string
example: ["node", "organizing", "webapps", "domain", "developer", "https", "proxy"]
id:
type: string
format: number
example: 1
# Added by API Auto Mocking Plugin
host: virtserver.swaggerhub.com
basePath: /gabizinha12/VUTTR/1.0.0
schemes:
- https
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment