| { |
| "openapi": "3.0.1", |
| "info": { |
| "title": "Dubbo-go OpenAPI", |
| "description": "dubbo-go generate OpenAPI docs.", |
| "version": "v1" |
| }, |
| "servers": [ |
| { |
| "url": "http://0.0.0.0:20000", |
| "description": "Dubbo-go Default Server" |
| } |
| ], |
| "paths": { |
| "/greet.GreetService/Greet": { |
| "post": { |
| "tags": [ |
| "greet.GreetService" |
| ], |
| "operationId": "Greet", |
| "requestBody": { |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/greet.GreetRequest" |
| } |
| } |
| }, |
| "required": true |
| }, |
| "responses": { |
| "200": { |
| "description": "OK", |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/greet.GreetResponse" |
| } |
| } |
| } |
| }, |
| "400": { |
| "description": "Bad Request", |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/ErrorResponse" |
| } |
| } |
| } |
| }, |
| "500": { |
| "description": "Internal Server Error", |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/ErrorResponse" |
| } |
| } |
| } |
| } |
| } |
| } |
| }, |
| "/greet.GreetService/GreetUser": { |
| "post": { |
| "tags": [ |
| "greet.GreetService" |
| ], |
| "operationId": "GreetUser", |
| "requestBody": { |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/greet.GreetUserRequest" |
| } |
| } |
| }, |
| "required": true |
| }, |
| "responses": { |
| "200": { |
| "description": "OK", |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/greet.GreetUserResponse" |
| } |
| } |
| } |
| }, |
| "400": { |
| "description": "Bad Request", |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/ErrorResponse" |
| } |
| } |
| } |
| }, |
| "500": { |
| "description": "Internal Server Error", |
| "content": { |
| "application/json": { |
| "schema": { |
| "$ref": "#/components/schemas/ErrorResponse" |
| } |
| } |
| } |
| } |
| } |
| } |
| } |
| }, |
| "components": { |
| "schemas": { |
| "greet.GreetRequest": { |
| "type": "object", |
| "properties": { |
| "name": { |
| "type": "string", |
| "title": "name" |
| } |
| }, |
| "title": "GreetRequest" |
| }, |
| "greet.GreetResponse": { |
| "type": "object", |
| "properties": { |
| "greeting": { |
| "type": "string", |
| "title": "greeting" |
| } |
| }, |
| "title": "GreetResponse" |
| }, |
| "greet.GreetUserRequest": { |
| "type": "object", |
| "properties": { |
| "name": { |
| "type": "string", |
| "title": "name" |
| } |
| }, |
| "title": "GreetUserRequest" |
| }, |
| "greet.GreetUserResponse": { |
| "type": "object", |
| "properties": { |
| "greeting": { |
| "type": "string", |
| "title": "greeting" |
| } |
| }, |
| "title": "GreetUserResponse" |
| }, |
| "ErrorResponse": { |
| "type": "object", |
| "properties": { |
| "status": { |
| "type": "string", |
| "description": "The status code." |
| }, |
| "message": { |
| "type": "string", |
| "description": "A developer-facing error message." |
| } |
| }, |
| "title": "ErrorResponse", |
| "description": "Error type returned by triple: https://cn.dubbo.apache.org/zh-cn/overview/reference/protocols/triple-spec/" |
| } |
| } |
| }, |
| "security": [], |
| "tags": [ |
| { |
| "name": "greet.GreetService" |
| } |
| ] |
| } |