Skip to content

Instantly share code, notes, and snippets.

@daimoniac
Last active March 13, 2024 18:58
Show Gist options
  • Save daimoniac/006fe319d3dab458ce68b9822dffab1b to your computer and use it in GitHub Desktop.
Save daimoniac/006fe319d3dab458ce68b9822dffab1b to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
title: SocialHub API2
description: SocialHub API Version 2 Specification
version: '2.0.0'
contact:
email: [email protected]
host: app.socialhub.io
basePath: /api2
externalDocs:
description: Product information (DE)
url: https://socialhubio.zendesk.com/hc/de
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
token:
type: apiKey
description: String of characters used to authenticate specific logged in users
name: accesstoken
in: query
security:
- token: []
# API Routes and Operations
paths:
'/':
get:
responses:
200:
$ref: '#/responses/SuccessResponse'
400:
$ref: '#/responses/BadRequestError'
401:
$ref: '#/responses/AccessTokenInvalidError'
406:
$ref: '#/responses/NotAcceptableError'
500:
$ref: '#/responses/InternalServerError'
# Responses
responses:
SuccessResponse:
description: Successful Operation
schema:
type: object
properties:
data:
type: string
BadRequestError:
description: Bad Request
schema:
$ref: '#/definitions/Error'
AccessTokenInvalidError:
description: Unauthorized Access
schema:
$ref: '#/definitions/Error'
NotAcceptableError:
description: Not Acceptable
schema:
$ref: '#/definitions/Error'
InternalServerError:
description: Internal Server Error
schema:
$ref: '#/definitions/Error'
# Definitions
definitions:
Error:
type: object
properties:
message:
type: string
code:
type: integer
fields:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment