Skip to content

Instantly share code, notes, and snippets.

@gabizinha12
Created Mar 26, 2021
Embed
What would you like to do?
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