Use a skipper for the auth, so tokens aren't needed for swagger docs.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "A read/write API for the Matterbridge chat bridge.",
|
||||
"description": "OK",
|
||||
"title": "Matterbridge API",
|
||||
"contact": {},
|
||||
"license": {
|
||||
@@ -11,8 +11,27 @@
|
||||
},
|
||||
"basePath": "/api",
|
||||
"paths": {
|
||||
"/api/health": {
|
||||
"get": {
|
||||
"description": "OK",
|
||||
"summary": "Checks if the server is alive.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/message": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -45,6 +64,11 @@
|
||||
},
|
||||
"/messages": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -64,6 +88,11 @@
|
||||
},
|
||||
"/stream": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/x-json-stream"
|
||||
],
|
||||
@@ -117,6 +146,10 @@
|
||||
"type": "string",
|
||||
"example": "slack 1541361213.030700"
|
||||
},
|
||||
"parent_id": {
|
||||
"description": "Unique ID of a parent message, if threaded\n",
|
||||
"type": "string"
|
||||
},
|
||||
"protocol": {
|
||||
"description": "Chat protocol of incoming message\n",
|
||||
"type": "string",
|
||||
@@ -145,7 +178,7 @@
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"": {
|
||||
"ApiKeyAuth": {
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
|
||||
@@ -35,6 +35,10 @@ definitions:
|
||||
Unique ID of message on the gateway
|
||||
example: slack 1541361213.030700
|
||||
type: string
|
||||
parent_id:
|
||||
description: |
|
||||
Unique ID of a parent message, if threaded
|
||||
type: string
|
||||
protocol:
|
||||
description: |
|
||||
Chat protocol of incoming message
|
||||
@@ -61,12 +65,21 @@ definitions:
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
description: A read/write API for the Matterbridge chat bridge.
|
||||
description: OK
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: https://github.com/42wim/matterbridge/blob/master/LICENSE
|
||||
title: Matterbridge API
|
||||
paths:
|
||||
/api/health:
|
||||
get:
|
||||
description: OK
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
type: string
|
||||
summary: Checks if the server is alive.
|
||||
/message:
|
||||
post:
|
||||
consumes:
|
||||
@@ -87,6 +100,8 @@ paths:
|
||||
schema:
|
||||
$ref: '#/definitions/config.Message'
|
||||
type: object
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Create/Update a message
|
||||
/messages:
|
||||
get:
|
||||
@@ -99,6 +114,8 @@ paths:
|
||||
items:
|
||||
$ref: '#/definitions/config.Message'
|
||||
type: array
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: List new messages
|
||||
/stream:
|
||||
get:
|
||||
@@ -110,9 +127,11 @@ paths:
|
||||
schema:
|
||||
$ref: '#/definitions/config.Message'
|
||||
type: object
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Stream realtime messages
|
||||
securityDefinitions:
|
||||
"":
|
||||
ApiKeyAuth:
|
||||
in: header
|
||||
name: Authorization
|
||||
type: apiKey
|
||||
|
||||
Reference in New Issue
Block a user