{ "swagger": "2.0", "info": { "title": "LOMS Service", "version": "1.0.0" }, "tags": [ { "name": "LOMS", "description": "LOMS Service", "externalDocs": { "description": "Find out more about grpc-gateway", "url": "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/examples/internal/proto/examplepb/a_bit_of_everything.proto" } } ], "schemes": [ "http", "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/order/cancel": { "post": { "operationId": "LOMS_OrderCancel", "responses": { "200": { "description": "A successful response.", "schema": { "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/OrderCancelRequest" } } ], "tags": [ "LOMS" ] } }, "/order/create": { "post": { "operationId": "LOMS_OrderCreate", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/OrderCreateResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/OrderCreateRequest" } } ], "tags": [ "LOMS" ] } }, "/order/info": { "get": { "operationId": "LOMS_OrderInfo", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/OrderInfoResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "orderId", "in": "query", "required": false, "type": "string", "format": "int64" } ], "tags": [ "LOMS" ] } }, "/order/pay": { "post": { "operationId": "LOMS_OrderPay", "responses": { "200": { "description": "A successful response.", "schema": { "type": "object", "properties": {} } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/OrderPayRequest" } } ], "tags": [ "LOMS" ] } }, "/stock/info": { "get": { "operationId": "LOMS_StocksInfo", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/StocksInfoResponse" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "sku", "in": "query", "required": false, "type": "string", "format": "int64" } ], "tags": [ "LOMS" ] } } }, "definitions": { "OrderCancelRequest": { "type": "object", "properties": { "orderId": { "type": "string", "format": "int64" } } }, "OrderCreateRequest": { "type": "object", "properties": { "userId": { "type": "string", "format": "int64" }, "items": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/OrderItem" } } } }, "OrderCreateResponse": { "type": "object", "properties": { "orderId": { "type": "string", "format": "int64" } } }, "OrderInfoResponse": { "type": "object", "properties": { "status": { "type": "string" }, "userId": { "type": "string", "format": "int64" }, "items": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/OrderItem" } } } }, "OrderItem": { "type": "object", "properties": { "sku": { "type": "string", "format": "int64" }, "count": { "type": "integer", "format": "int64" } } }, "OrderPayRequest": { "type": "object", "properties": { "orderId": { "type": "string", "format": "int64" } } }, "StocksInfoResponse": { "type": "object", "properties": { "count": { "type": "integer", "format": "int64" } } }, "protobufAny": { "type": "object", "properties": { "@type": { "type": "string" } }, "additionalProperties": {} }, "rpcStatus": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, "details": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/protobufAny" } } } } } }