Files
go-omni/examples/managedService/docs/openapi.json

1477 lines
40 KiB
JSON

{
"components": {
"securitySchemes": {}
},
"info": {
"title": "managed-api",
"version": "1.0.0"
},
"openapi": "3.0.3",
"paths": {
"/callback": {
"post": {
"operationId": "demo_Callback",
"requestBody": {
"content": {
"application/octet-stream": {
"schema": {
"format": "binary",
"type": "string"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"text/plain": {
"schema": {
"type": "string"
}
}
},
"description": "Success"
},
"400": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"413": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"415": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"501": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
}
},
"security": [],
"summary": "",
"tags": [
"demo"
],
"x-omni-max-body-bytes": 64,
"x-omni-request-policy": {
"unknownQuery": "",
"utf8": "",
"charset": "",
"body": "auto"
},
"x-omni-response": "CommonResponse"
}
},
"/check": {
"get": {
"operationId": "demo_Check",
"parameters": [
{
"in": "query",
"name": "kind",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"additionalProperties": false,
"properties": {
"bytes": {
"format": "int64",
"type": "integer"
}
},
"required": [
"bytes"
],
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Success"
},
"400": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"413": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"415": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"501": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
}
},
"security": [],
"summary": "",
"tags": [
"demo"
],
"x-omni-request-policy": {
"unknownQuery": "",
"utf8": "",
"charset": "",
"body": ""
},
"x-omni-response": "CommonResponse"
}
},
"/download": {
"get": {
"operationId": "demo_Download",
"responses": {
"200": {
"content": {
"application/octet-stream": {
"schema": {
"format": "binary",
"type": "string"
}
}
},
"description": "Success"
},
"400": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"413": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"415": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"501": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
}
},
"security": [],
"summary": "",
"tags": [
"demo"
],
"x-omni-request-policy": {
"unknownQuery": "",
"utf8": "",
"charset": "",
"body": ""
},
"x-omni-response": "CommonResponse"
}
},
"/other": {
"get": {
"operationId": "demo_Other",
"parameters": [
{
"in": "query",
"name": "kind",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"additionalProperties": false,
"properties": {
"bytes": {
"format": "int64",
"type": "integer"
}
},
"required": [
"bytes"
],
"type": "object"
},
"detail": {
"type": "string"
}
},
"required": [
"code",
"detail",
"data"
],
"type": "object"
}
}
},
"description": "Success"
},
"400": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"detail": {
"type": "string"
}
},
"required": [
"code",
"detail",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"413": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"detail": {
"type": "string"
}
},
"required": [
"code",
"detail",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"415": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"detail": {
"type": "string"
}
},
"required": [
"code",
"detail",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"detail": {
"type": "string"
}
},
"required": [
"code",
"detail",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"501": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"detail": {
"type": "string"
}
},
"required": [
"code",
"detail",
"data"
],
"type": "object"
}
}
},
"description": "Error"
}
},
"security": [],
"summary": "",
"tags": [
"demo"
],
"x-omni-request-policy": {
"unknownQuery": "",
"utf8": "",
"charset": "",
"body": ""
},
"x-omni-response": "AlternateResponse"
}
},
"/raw": {
"get": {
"operationId": "demo_RawJSON",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"bytes": {
"format": "int64",
"type": "integer"
}
},
"required": [
"bytes"
],
"type": "object"
}
}
},
"description": "Success"
},
"400": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"413": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"415": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"501": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
}
},
"security": [],
"summary": "",
"tags": [
"demo"
],
"x-omni-request-policy": {
"unknownQuery": "",
"utf8": "",
"charset": "",
"body": ""
},
"x-omni-response": "raw"
}
},
"/slow": {
"get": {
"operationId": "demo_Slow",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"additionalProperties": false,
"properties": {
"bytes": {
"format": "int64",
"type": "integer"
}
},
"required": [
"bytes"
],
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Success"
},
"400": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"413": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"415": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"501": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
}
},
"security": [],
"summary": "",
"tags": [
"demo"
],
"x-omni-request-policy": {
"unknownQuery": "",
"utf8": "",
"charset": "",
"body": ""
},
"x-omni-response": "CommonResponse"
}
},
"/upload": {
"post": {
"operationId": "demo_Upload",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"additionalProperties": true,
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"additionalProperties": false,
"properties": {
"bytes": {
"format": "int64",
"type": "integer"
}
},
"required": [
"bytes"
],
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Success"
},
"400": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"413": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"415": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"500": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
},
"501": {
"content": {
"application/json": {
"schema": {
"properties": {
"code": {
"format": "int32",
"type": "integer"
},
"data": {
"enum": [
null
],
"nullable": true,
"type": "object"
},
"msg": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data"
],
"type": "object"
}
}
},
"description": "Error"
}
},
"security": [],
"summary": "",
"tags": [
"demo"
],
"x-omni-max-body-bytes": 2048,
"x-omni-multipart-limits": {
"maxBytes": 2048,
"maxFieldBytes": 65536,
"maxFileBytes": 2048,
"maxParts": 128
},
"x-omni-request-policy": {
"unknownQuery": "",
"utf8": "",
"charset": "",
"body": "auto"
},
"x-omni-response": "CommonResponse"
}
}
},
"x-omni-contract-sources": {
"files": {
"managed.api": "cec14fe0da47a83804bf461be047df3e004ee470cbc3ea330dabc1537d596672"
},
"shared": {}
},
"x-omni-default-response": "CommonResponse"
}