Browse Source

update

master
dengbiao 1 month ago
parent
commit
19c249284e
2 changed files with 53 additions and 5 deletions
  1. +49
    -1
      docs/open.json
  2. +4
    -4
      generate_swagger.sh

+ 49
- 1
docs/open.json View File

@@ -16,7 +16,55 @@
"version": "1.0"
},
"host": "xxxxx.adcms.zhiyingos.cn",
"paths": {},
"paths": {
"/api/dataCenter/income/data/list": {
"post": {
"description": "数据中心-收益报表-列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"数据中心-----OPEN"
],
"summary": "收益报表-列表",
"parameters": [
{
"type": "string",
"description": "秘钥内容",
"name": "AppSecret",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.DataCenterGenerateDataReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容 这是data里面的数据",
"schema": {
"$ref": "#/definitions/md.DataCenterIncomeDataRes"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
}
},
"definitions": {
"hdl.WxOpenThirdPartyAppList": {
"type": "object",


+ 4
- 4
generate_swagger.sh View File

@@ -6,10 +6,10 @@ swag init --parseDependency --parseInternal --output ./docs
# 提取带有 "open" 标签的路径
jq '.paths | with_entries(
select(
(.value.post?.tags? | type == "array" and any(. == "数据中心------OPEN")) or
(.value.get?.tags? | type == "array" and any(. == "数据中心------OPEN")) or
(.value.put?.tags? | type == "array" and any(. == "数据中心------OPEN")) or
(.value.delete?.tags? | type == "array" and any(. == "数据中心------OPEN"))
(.value.post?.tags? | type == "array" and any(. == "数据中心-----OPEN")) or
(.value.get?.tags? | type == "array" and any(. == "数据中心-----OPEN")) or
(.value.put?.tags? | type == "array" and any(. == "数据中心-----OPEN")) or
(.value.delete?.tags? | type == "array" and any(. == "数据中心-----OPEN"))
)
) // {} as $filtered_paths | . * { paths: $filtered_paths }' docs/swagger.json > open_paths.json



Loading…
Cancel
Save