574 lines
15 KiB
JSON
574 lines
15 KiB
JSON
{
|
|
"openapi": "3.0.1",
|
|
"info": {
|
|
"title": "默认模块",
|
|
"description": "",
|
|
"version": "1.0.0"
|
|
},
|
|
"tags": [],
|
|
"paths": {
|
|
"/api/v1/admin/good/spec/list": {
|
|
"get": {
|
|
"summary": "获取商品参数列表",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"tags": [],
|
|
"parameters": [
|
|
{
|
|
"name": "good_id",
|
|
"in": "query",
|
|
"description": "商品id",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/good/spec/create": {
|
|
"post": {
|
|
"summary": "创建商品参数",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"tags": [],
|
|
"parameters": [
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"good_id": {
|
|
"description": "商品id",
|
|
"example": 0,
|
|
"type": "integer"
|
|
},
|
|
"arg_name": {
|
|
"description": "参数名称",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"arg_type": {
|
|
"description": "参数类型 string | number | select",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"arg_step": {
|
|
"description": "参数值步进值(number 类型参数)",
|
|
"example": 0,
|
|
"type": "integer"
|
|
},
|
|
"arg_max": {
|
|
"description": "参数值最大值(number 类型参数)",
|
|
"example": 0,
|
|
"type": "integer"
|
|
},
|
|
"arg_min": {
|
|
"description": "参数值最小值(number 类型参数)",
|
|
"example": 0,
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/good/spec/detail": {
|
|
"get": {
|
|
"summary": "获取商品参数详情",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"tags": [],
|
|
"parameters": [
|
|
{
|
|
"name": "good_id",
|
|
"in": "query",
|
|
"description": "商品id",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "arg_id",
|
|
"in": "query",
|
|
"description": "参数id",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/good/spec/update": {
|
|
"post": {
|
|
"summary": "更新商品参数",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"tags": [],
|
|
"parameters": [
|
|
{
|
|
"name": "good_id",
|
|
"in": "query",
|
|
"description": "商品id",
|
|
"required": false,
|
|
"example": "",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "arg_id",
|
|
"in": "query",
|
|
"description": "参数id",
|
|
"required": false,
|
|
"example": "",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "arg_name",
|
|
"in": "query",
|
|
"description": "参数名称",
|
|
"required": false,
|
|
"example": "",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "arg_type",
|
|
"in": "query",
|
|
"description": "参数类型 string | number | select",
|
|
"required": false,
|
|
"example": "",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "arg_step",
|
|
"in": "query",
|
|
"description": "参数值步进值(number 类型参数)",
|
|
"required": false,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "arg_max",
|
|
"in": "query",
|
|
"description": "参数值最大值(number 类型参数)",
|
|
"required": false,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "arg_min",
|
|
"in": "query",
|
|
"description": "参数值最小值(number 类型参数)",
|
|
"required": false,
|
|
"example": 0,
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/good/spec/delete": {
|
|
"delete": {
|
|
"summary": "删除商品参数",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"tags": [],
|
|
"parameters": [
|
|
{
|
|
"name": "good_id",
|
|
"in": "query",
|
|
"description": "商品id",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "arg_id",
|
|
"in": "query",
|
|
"description": "参数id",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/good/spec/add_value": {
|
|
"post": {
|
|
"summary": "增加商品参数值",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"tags": [],
|
|
"parameters": [
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"good_id": {
|
|
"description": "商品id",
|
|
"example": 0,
|
|
"type": "integer"
|
|
},
|
|
"arg_id": {
|
|
"description": "参数id",
|
|
"example": 0,
|
|
"type": "integer"
|
|
},
|
|
"attr_name": {
|
|
"description": "值名称",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"attr_value": {
|
|
"description": "参数值 (select 类型使用)",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"index": {
|
|
"description": "商品参数排序索引",
|
|
"example": 0,
|
|
"type": "integer"
|
|
},
|
|
"attr_range": {
|
|
"description": "参数值范围 (number类型使用)",
|
|
"example": 0,
|
|
"type": "integer"
|
|
},
|
|
"range_type": {
|
|
"description": "参数值范围类型 after \\ before \\ equal (number类型使用)",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"attr_price": {
|
|
"description": "价格",
|
|
"example": 0,
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/good/spec/delete_value": {
|
|
"delete": {
|
|
"summary": "删除商品参数值",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"tags": [],
|
|
"parameters": [
|
|
{
|
|
"name": "good_id",
|
|
"in": "query",
|
|
"description": "商品id",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "attr_id",
|
|
"in": "query",
|
|
"description": "参数值id",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
},
|
|
"/api/v1/admin/good/spec/update_value": {
|
|
"post": {
|
|
"summary": "更新商品参数值",
|
|
"deprecated": false,
|
|
"description": "",
|
|
"tags": [],
|
|
"parameters": [
|
|
{
|
|
"name": "Authorization",
|
|
"in": "header",
|
|
"description": "",
|
|
"example": "Bearer {{token}}",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": "Bearer {{token}}"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"good_id": {
|
|
"description": "商品id",
|
|
"example": 0,
|
|
"type": "integer"
|
|
},
|
|
"attr_id": {
|
|
"description": "参数值id",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"attr_name": {
|
|
"description": "值名称",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"attr_value": {
|
|
"description": "参数值 (select 类型使用)",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"attr_range": {
|
|
"description": "参数值范围 (number类型使用)",
|
|
"example": 0,
|
|
"type": "integer"
|
|
},
|
|
"index": {
|
|
"description": "商品参数排序索引",
|
|
"example": 0,
|
|
"type": "integer"
|
|
},
|
|
"range_type": {
|
|
"description": "参数值范围类型 after \\ before \\ equal (number类型使用)",
|
|
"example": "",
|
|
"type": "string"
|
|
},
|
|
"attr_price": {
|
|
"description": "价格",
|
|
"example": 0,
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {}
|
|
}
|
|
},
|
|
"security": []
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {},
|
|
"responses": {},
|
|
"securitySchemes": {}
|
|
},
|
|
"servers": [],
|
|
"security": []
|
|
} |