cake_crm/resources/main.swagger.json

335 lines
6.9 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "main.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/breadcrumbs/{id}": {
"get": {
"operationId": "CRM_GetBreadcrumbs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/crmBreadcrumbsRsp"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
}
],
"tags": [
"CRM"
]
}
},
"/catalog": {
"get": {
"operationId": "CRM_GetCatalog",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/crmCatalogRsp"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"tags": [
"CRM"
]
}
},
"/positions/{id}": {
"get": {
"operationId": "CRM_GetPositions",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/crmPositionsRsp"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
}
],
"tags": [
"CRM"
]
}
},
"/products/{id}": {
"get": {
"operationId": "CRM_GetProduct",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/crmProductRsp"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
}
],
"tags": [
"CRM"
]
}
}
},
"definitions": {
"crmBreadcrumbsRsp": {
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"$ref": "#/definitions/crmCategory"
}
}
}
},
"crmCatalogRsp": {
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"$ref": "#/definitions/crmCategory"
}
}
}
},
"crmCategory": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"name": {
"type": "string"
},
"uri": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/crmCategory"
}
}
}
},
"crmCharacteristic": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"crmGroupedProduct": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"uri": {
"type": "string"
},
"image": {
"type": "string"
}
}
},
"crmPositionsRsp": {
"type": "object",
"properties": {
"products": {
"type": "array",
"items": {
"$ref": "#/definitions/crmProduct"
}
}
}
},
"crmProduct": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"article": {
"type": "string"
},
"name": {
"type": "string"
},
"uri": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "string"
}
},
"description": {
"type": "string"
},
"grouped_products": {
"type": "array",
"items": {
"$ref": "#/definitions/crmGroupedProduct"
}
},
"unit": {
"type": "string"
},
"inventory": {
"type": "number",
"format": "double"
},
"variants": {
"type": "array",
"items": {
"$ref": "#/definitions/crmVariant"
}
},
"characteristics": {
"type": "array",
"items": {
"$ref": "#/definitions/crmCharacteristic"
}
},
"category": {
"type": "string",
"format": "int64"
}
}
},
"crmProductRsp": {
"type": "object",
"properties": {
"product": {
"$ref": "#/definitions/crmProduct"
}
}
},
"crmProperty": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"crmVariant": {
"type": "object",
"properties": {
"price": {
"type": "string",
"format": "int64"
},
"properties": {
"type": "array",
"items": {
"$ref": "#/definitions/crmProperty"
}
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"type_url": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"runtimeError": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
}
}
}