{
“swagger”: “2.0”,
“info”: {
“title”: “化妆品API文档”,
“description”: “提供化妆品相关数据的接口服务,包括产品信息、品牌信息、成分分析、用户评价等。”,
“version”: “1.0.0”
},
“host”: “api.cosmetic.com”,
“basePath”: “/api/v1”,
“schemes”: [“https”],
“consumes”: [“application/json”],
“produces”: [“application/json”],
“securityDefinitions”: {
“Bearer”: {
“type”: “apiKey”,
“name”: “Authorization”,
“in”: “header”
}
},
“paths”: {
“/products”: {
“get”: {
“summary”: “获取所有化妆品产品列表”,
“description”: “返回系统中所有的化妆品产品信息,支持分页和过滤条件。”,
“parameters”: [
{
“name”: “page”,
“in”: “query”,
“type”: “integer”,
“default”: 1,
“description”: “当前页码”
},
{
“name”: “pageSize”,
“in”: “query”,
“type”: “integer”,
“default”: 10,
“description”: “每页显示数量”
},
{
“name”: “brandId”,
“in”: “query”,
“type”: “integer”,
“description”: “按品牌ID过滤”
},
{
“name”: “category”,
“in”: “query”,
“type”: “string”,
“description”: “按分类名称过滤”
}
],
“responses”: {
“200”: {
“description”: “成功获取产品列表”,
“schema”: {
“type”: “object”,
“properties”: {
“data”: {
“type”: “array”,
“items”: {
“type”: “object”,
“properties”: {
“id”: {“type”: “integer”},
“name”: {“type”: “string”},
“brandId”: {“type”: “integer”},
“categoryId”: {“type”: “integer”},
“price”: {“type”: “number”},
“stock”: {“type”: “integer”},
“description”: {“type”: “string”},
“image”: {“type”: “string”}
}
}
},
“total”: {“type”: “integer”},
“currentPage”: {“type”: “integer”},
“pageSize”: {“type”: “integer”}
}
}
}
},
“security”: [
{
“Bearer”: []
}
]
},
“post”: {
“summary”: “创建新的化妆品产品”,
“description”: “向系统中添加一个新的化妆品产品。”,
“parameters”: {
“in”: “body”,
“name”: “product”,
“schema”: {
“type”: “object”,
“properties”: {
“name”: {“type”: “string”, “required”: true},
“brandId”: {“type”: “integer”, “required”: true},
“categoryId”: {“type”: “integer”, “required”: true},
“price”: {“type”: “number”, “required”: true},
“stock”: {“type”: “integer”, “required”: true},
“description”: {“type”: “string”},
“image”: {“type”: “string”}
}
}
},
“responses”: {
“201”: {
“description”: “产品创建成功”,
“schema”: {
“type”: “object”,
“properties”: {
“id”: {“type”: “integer”},
“name”: {“type”: “string”},
“brandId”: {“type”: “integer”},
“categoryId”: {“type”: “integer”},
“price”: {“type”: “number”},
“stock”: {“type”: “integer”},
“description”: {“type”: “string”},
“image”: {“type”: “string”}
}
}
}
},
“security”: [
{
“Bearer”: []
}
]
}
},
“/products/{id}”: {
“get”: {
“summary”: “根据ID获取化妆品产品详情”,
“description”: “通过产品ID获取该产品的详细信息。”,
“parameters”: [
{
“name”: “id”,
“in”: “path”,
“type”: “integer”,
“required”: true
}
],
“responses”: {
“200”: {
“description”: “成功获取产品详情”,
“schema”: {
“type”: “object”,
“properties”: {
“id”: {“type”:
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。本站所有资源的密码都是:pangseng.com/ziyuan/

评论(28)
支持一下
值得拥有 推荐
挺不错 特别好
已经推荐给朋友了
信赖之选 很好
对比之后,最终选择了,是对的
真是迷上了 喜欢
体验很好
解决了燃眉之急
经常来逛逛 收获满满
很用心 有保障 放心
我很支持
感觉不错 满意到无法形容
非常非常好
会持续关注和支持的
信任这个
它是可靠的选择
好东西要让大家知道
真是不错
初次尝试很成功 非常推荐
很不错 我喜欢
很好很不错 支持
长期来看 确实不错
支持
不错不错 我喜欢
每天都来逛逛 挺喜欢的
很好 完美了
很合适 提升了