Last active
September 30, 2017 21:56
-
-
Save yogsototh/574366154148f26b09d5e694af86e685 to your computer and use it in GitHub Desktop.
swagger-3.x-bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "swagger": "2.0", | |
| "info": { | |
| "version": "1.0", | |
| "title": "RedBot Configuration API" | |
| }, | |
| "paths": { | |
| "/redbot/{bot-id}": { | |
| "get": { | |
| "tags": [ | |
| "Bot" | |
| ], | |
| "produces": [ | |
| "application/json;charset=utf-8" | |
| ], | |
| "parameters": [ | |
| { | |
| "in": "header", | |
| "name": "Authorization", | |
| "type": "string" | |
| }, | |
| { | |
| "required": true, | |
| "in": "path", | |
| "name": "bot-id", | |
| "type": "string" | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "schema": { | |
| "description": "Some configuration", | |
| "required": [ | |
| "subreddit", | |
| "responders", | |
| "creds" | |
| ], | |
| "properties": { | |
| "subreddit": { | |
| "type": "string" | |
| }, | |
| "responders": { | |
| "additionalProperties": { | |
| "description": "Some Bot configuration", | |
| "required": [ | |
| "searchTxt", | |
| "replyTxt" | |
| ], | |
| "properties": { | |
| "searchTxt": { | |
| "type": "string" | |
| }, | |
| "replyTxt": { | |
| "type": "string" | |
| } | |
| }, | |
| "example": { | |
| "searchTxt": "UR", | |
| "replyTxt": "you're!" | |
| }, | |
| "type": "object" | |
| }, | |
| "type": "object" | |
| }, | |
| "creds": { | |
| "required": [ | |
| "username", | |
| "password", | |
| "botId", | |
| "botSecret" | |
| ], | |
| "properties": { | |
| "username": { | |
| "type": "string" | |
| }, | |
| "password": { | |
| "type": "string" | |
| }, | |
| "botId": { | |
| "type": "string" | |
| }, | |
| "botSecret": { | |
| "type": "string" | |
| } | |
| }, | |
| "type": "object" | |
| } | |
| }, | |
| "example": { | |
| "subreddit": "testingground4bots", | |
| "responders": { | |
| "botname": { | |
| "searchTxt": "bot search text", | |
| "replyTxt": "response to the searched text" | |
| } | |
| }, | |
| "creds": { | |
| "username": "username", | |
| "botId": "bot-id", | |
| "password": "password", | |
| "botSecret": "bot-secret" | |
| } | |
| }, | |
| "type": "object" | |
| }, | |
| "description": "" | |
| }, | |
| "400": { | |
| "description": "Invalid `Authorization`" | |
| }, | |
| "404": { | |
| "description": "`bot-id` not found" | |
| } | |
| } | |
| }, | |
| "post": { | |
| "tags": [ | |
| "Bot" | |
| ], | |
| "consumes": [ | |
| "application/json;charset=utf-8" | |
| ], | |
| "produces": [ | |
| "application/json;charset=utf-8" | |
| ], | |
| "parameters": [ | |
| { | |
| "in": "header", | |
| "name": "Authorization", | |
| "type": "string" | |
| }, | |
| { | |
| "required": true, | |
| "in": "path", | |
| "name": "bot-id", | |
| "type": "string" | |
| }, | |
| { | |
| "required": true, | |
| "schema": { | |
| "description": "Some configuration", | |
| "required": [ | |
| "subreddit", | |
| "responders", | |
| "creds" | |
| ], | |
| "properties": { | |
| "subreddit": { | |
| "type": "string" | |
| }, | |
| "responders": { | |
| "additionalProperties": { | |
| "description": "Some Bot configuration", | |
| "required": [ | |
| "searchTxt", | |
| "replyTxt" | |
| ], | |
| "properties": { | |
| "searchTxt": { | |
| "type": "string" | |
| }, | |
| "replyTxt": { | |
| "type": "string" | |
| } | |
| }, | |
| "example": { | |
| "searchTxt": "UR", | |
| "replyTxt": "you're!" | |
| }, | |
| "type": "object" | |
| }, | |
| "type": "object" | |
| }, | |
| "creds": { | |
| "required": [ | |
| "username", | |
| "password", | |
| "botId", | |
| "botSecret" | |
| ], | |
| "properties": { | |
| "username": { | |
| "type": "string" | |
| }, | |
| "password": { | |
| "type": "string" | |
| }, | |
| "botId": { | |
| "type": "string" | |
| }, | |
| "botSecret": { | |
| "type": "string" | |
| } | |
| }, | |
| "type": "object" | |
| } | |
| }, | |
| "example": { | |
| "subreddit": "testingground4bots", | |
| "responders": { | |
| "botname": { | |
| "searchTxt": "bot search text", | |
| "replyTxt": "response to the searched text" | |
| } | |
| }, | |
| "creds": { | |
| "username": "username", | |
| "botId": "bot-id", | |
| "password": "password", | |
| "botSecret": "bot-secret" | |
| } | |
| }, | |
| "type": "object" | |
| }, | |
| "in": "body", | |
| "name": "body" | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "schema": { | |
| "description": "Some configuration", | |
| "required": [ | |
| "subreddit", | |
| "responders", | |
| "creds" | |
| ], | |
| "properties": { | |
| "subreddit": { | |
| "type": "string" | |
| }, | |
| "responders": { | |
| "additionalProperties": { | |
| "description": "Some Bot configuration", | |
| "required": [ | |
| "searchTxt", | |
| "replyTxt" | |
| ], | |
| "properties": { | |
| "searchTxt": { | |
| "type": "string" | |
| }, | |
| "replyTxt": { | |
| "type": "string" | |
| } | |
| }, | |
| "example": { | |
| "searchTxt": "UR", | |
| "replyTxt": "you're!" | |
| }, | |
| "type": "object" | |
| }, | |
| "type": "object" | |
| }, | |
| "creds": { | |
| "required": [ | |
| "username", | |
| "password", | |
| "botId", | |
| "botSecret" | |
| ], | |
| "properties": { | |
| "username": { | |
| "type": "string" | |
| }, | |
| "password": { | |
| "type": "string" | |
| }, | |
| "botId": { | |
| "type": "string" | |
| }, | |
| "botSecret": { | |
| "type": "string" | |
| } | |
| }, | |
| "type": "object" | |
| } | |
| }, | |
| "example": { | |
| "subreddit": "testingground4bots", | |
| "responders": { | |
| "botname": { | |
| "searchTxt": "bot search text", | |
| "replyTxt": "response to the searched text" | |
| } | |
| }, | |
| "creds": { | |
| "username": "username", | |
| "botId": "bot-id", | |
| "password": "password", | |
| "botSecret": "bot-secret" | |
| } | |
| }, | |
| "type": "object" | |
| }, | |
| "description": "" | |
| }, | |
| "400": { | |
| "description": "Invalid `body` or `Authorization`" | |
| }, | |
| "404": { | |
| "description": "`bot-id` not found" | |
| } | |
| } | |
| } | |
| }, | |
| "/redbot/bot/{bot-id}/{responder-id}": { | |
| "post": { | |
| "tags": [ | |
| "Bot" | |
| ], | |
| "consumes": [ | |
| "application/json;charset=utf-8" | |
| ], | |
| "produces": [ | |
| "application/json;charset=utf-8" | |
| ], | |
| "parameters": [ | |
| { | |
| "in": "header", | |
| "name": "Authorization", | |
| "type": "string" | |
| }, | |
| { | |
| "required": true, | |
| "in": "path", | |
| "name": "bot-id", | |
| "type": "string" | |
| }, | |
| { | |
| "required": true, | |
| "in": "path", | |
| "name": "responder-id", | |
| "type": "string" | |
| }, | |
| { | |
| "required": true, | |
| "schema": { | |
| "description": "Some Bot configuration", | |
| "required": [ | |
| "searchTxt", | |
| "replyTxt" | |
| ], | |
| "properties": { | |
| "searchTxt": { | |
| "type": "string" | |
| }, | |
| "replyTxt": { | |
| "type": "string" | |
| } | |
| }, | |
| "example": { | |
| "searchTxt": "UR", | |
| "replyTxt": "you're!" | |
| }, | |
| "type": "object" | |
| }, | |
| "in": "body", | |
| "name": "body" | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "schema": { | |
| "description": "Some Bot configuration", | |
| "required": [ | |
| "searchTxt", | |
| "replyTxt" | |
| ], | |
| "properties": { | |
| "searchTxt": { | |
| "type": "string" | |
| }, | |
| "replyTxt": { | |
| "type": "string" | |
| } | |
| }, | |
| "example": { | |
| "searchTxt": "UR", | |
| "replyTxt": "you're!" | |
| }, | |
| "type": "object" | |
| }, | |
| "description": "" | |
| }, | |
| "400": { | |
| "description": "Invalid `body` or `Authorization`" | |
| }, | |
| "404": { | |
| "description": "`bot-id` or `responder-id` not found" | |
| } | |
| } | |
| }, | |
| "delete": { | |
| "tags": [ | |
| "Bot" | |
| ], | |
| "produces": [ | |
| "application/json;charset=utf-8" | |
| ], | |
| "parameters": [ | |
| { | |
| "in": "header", | |
| "name": "Authorization", | |
| "type": "string" | |
| }, | |
| { | |
| "required": true, | |
| "in": "path", | |
| "name": "bot-id", | |
| "type": "string" | |
| }, | |
| { | |
| "required": true, | |
| "in": "path", | |
| "name": "responder-id", | |
| "type": "string" | |
| } | |
| ], | |
| "responses": { | |
| "200": { | |
| "schema": { | |
| "type": "string" | |
| }, | |
| "description": "" | |
| }, | |
| "400": { | |
| "description": "Invalid `Authorization`" | |
| }, | |
| "404": { | |
| "description": "`bot-id` or `responder-id` not found" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "definitions": { | |
| "RedbotConf": { | |
| "description": "Some configuration", | |
| "required": [ | |
| "subreddit", | |
| "responders", | |
| "creds" | |
| ], | |
| "properties": { | |
| "subreddit": { | |
| "type": "string" | |
| }, | |
| "responders": { | |
| "additionalProperties": { | |
| "description": "Some Bot configuration", | |
| "required": [ | |
| "searchTxt", | |
| "replyTxt" | |
| ], | |
| "properties": { | |
| "searchTxt": { | |
| "type": "string" | |
| }, | |
| "replyTxt": { | |
| "type": "string" | |
| } | |
| }, | |
| "example": { | |
| "searchTxt": "UR", | |
| "replyTxt": "you're!" | |
| }, | |
| "type": "object" | |
| }, | |
| "type": "object" | |
| }, | |
| "creds": { | |
| "required": [ | |
| "username", | |
| "password", | |
| "botId", | |
| "botSecret" | |
| ], | |
| "properties": { | |
| "username": { | |
| "type": "string" | |
| }, | |
| "password": { | |
| "type": "string" | |
| }, | |
| "botId": { | |
| "type": "string" | |
| }, | |
| "botSecret": { | |
| "type": "string" | |
| } | |
| }, | |
| "type": "object" | |
| } | |
| }, | |
| "example": { | |
| "subreddit": "testingground4bots", | |
| "responders": { | |
| "botname": { | |
| "searchTxt": "bot search text", | |
| "replyTxt": "response to the searched text" | |
| } | |
| }, | |
| "creds": { | |
| "username": "username", | |
| "botId": "bot-id", | |
| "password": "password", | |
| "botSecret": "bot-secret" | |
| } | |
| }, | |
| "type": "object" | |
| }, | |
| "ResponderConf": { | |
| "description": "Some Bot configuration", | |
| "required": [ | |
| "searchTxt", | |
| "replyTxt" | |
| ], | |
| "properties": { | |
| "searchTxt": { | |
| "type": "string" | |
| }, | |
| "replyTxt": { | |
| "type": "string" | |
| } | |
| }, | |
| "example": { | |
| "searchTxt": "UR", | |
| "replyTxt": "you're!" | |
| }, | |
| "type": "object" | |
| }, | |
| "Creds": { | |
| "required": [ | |
| "username", | |
| "password", | |
| "botId", | |
| "botSecret" | |
| ], | |
| "properties": { | |
| "username": { | |
| "type": "string" | |
| }, | |
| "password": { | |
| "type": "string" | |
| }, | |
| "botId": { | |
| "type": "string" | |
| }, | |
| "botSecret": { | |
| "type": "string" | |
| } | |
| }, | |
| "type": "object" | |
| } | |
| }, | |
| "tags": [ | |
| { | |
| "name": "Bot", | |
| "description": "Bot manipulation operations" | |
| }, | |
| { | |
| "name": "Bot", | |
| "description": "Bot operations" | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment