From 3aec7b6e9f10ed7ba52fb75536b31e203788d8bd Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期二, 26 三月 2024 16:43:38 +0800
Subject: [PATCH] swag 提交
---
api/v1/purchase/purchase.go | 4 +-
docs/swagger.yaml | 25 ++++++++----
docs/docs.go | 35 ++++++++++++-----
docs/swagger.json | 35 ++++++++++++-----
4 files changed, 69 insertions(+), 30 deletions(-)
diff --git a/api/v1/purchase/purchase.go b/api/v1/purchase/purchase.go
index 3fb647d..aec7d9e 100644
--- a/api/v1/purchase/purchase.go
+++ b/api/v1/purchase/purchase.go
@@ -226,7 +226,7 @@
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
-// @Param id path int true "閲囪喘鍗旾D"
+// @Param data body purchaserequest.SubmitPurchase true "鍙傛暟"
// @Success 200 {object} response.Response{msg=string} "鎻愪氦閲囪喘鍗�"
// @Router /purchase/submit [post]
func (e *PurchaseApi) Submit(c *gin.Context) {
@@ -439,7 +439,7 @@
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
-// @Param id path int true "閲囪喘鍗旾D" true "閲囪喘鍗旾D"
+// @Param data body purchaserequest.SubmitPurchase true "鍙傛暟"
// @Success 200 {object} response.Response{msg=string} "鏂扮増鎻愪氦"
// @Router /purchase/newSubmit [post]
func (e *PurchaseApi) NewSubmit(c *gin.Context) {
diff --git a/docs/docs.go b/docs/docs.go
index 7e686f0..238ddaf 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -1851,11 +1851,13 @@
"summary": "鏂扮増鎻愪氦",
"parameters": [
{
- "type": "integer",
- "description": "閲囪喘鍗旾D",
- "name": "id",
- "in": "path",
- "required": true
+ "description": "鍙傛暟",
+ "name": "data",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/purchaserequest.SubmitPurchase"
+ }
}
],
"responses": {
@@ -2434,11 +2436,13 @@
"summary": "鎻愪氦閲囪喘鍗�",
"parameters": [
{
- "type": "integer",
- "description": "閲囪喘鍗旾D",
- "name": "id",
- "in": "path",
- "required": true
+ "description": "鍙傛暟",
+ "name": "data",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/purchaserequest.SubmitPurchase"
+ }
}
],
"responses": {
@@ -4555,6 +4559,17 @@
}
}
},
+ "purchaserequest.SubmitPurchase": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "status": {
+ "$ref": "#/definitions/purchase.OrderStatus"
+ }
+ }
+ },
"purchaserequest.UpdatePurchase": {
"type": "object",
"properties": {
diff --git a/docs/swagger.json b/docs/swagger.json
index 0c2bd32..d26802e 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -1842,11 +1842,13 @@
"summary": "鏂扮増鎻愪氦",
"parameters": [
{
- "type": "integer",
- "description": "閲囪喘鍗旾D",
- "name": "id",
- "in": "path",
- "required": true
+ "description": "鍙傛暟",
+ "name": "data",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/purchaserequest.SubmitPurchase"
+ }
}
],
"responses": {
@@ -2425,11 +2427,13 @@
"summary": "鎻愪氦閲囪喘鍗�",
"parameters": [
{
- "type": "integer",
- "description": "閲囪喘鍗旾D",
- "name": "id",
- "in": "path",
- "required": true
+ "description": "鍙傛暟",
+ "name": "data",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/purchaserequest.SubmitPurchase"
+ }
}
],
"responses": {
@@ -4546,6 +4550,17 @@
}
}
},
+ "purchaserequest.SubmitPurchase": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "status": {
+ "$ref": "#/definitions/purchase.OrderStatus"
+ }
+ }
+ },
"purchaserequest.UpdatePurchase": {
"type": "object",
"properties": {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index f7dd39a..2a84e04 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -808,6 +808,13 @@
status:
type: integer
type: object
+ purchaserequest.SubmitPurchase:
+ properties:
+ id:
+ type: integer
+ status:
+ $ref: '#/definitions/purchase.OrderStatus'
+ type: object
purchaserequest.UpdatePurchase:
properties:
productList:
@@ -2243,11 +2250,12 @@
consumes:
- application/json
parameters:
- - description: 閲囪喘鍗旾D
- in: path
- name: id
+ - description: 鍙傛暟
+ in: body
+ name: data
required: true
- type: integer
+ schema:
+ $ref: '#/definitions/purchaserequest.SubmitPurchase'
produces:
- application/json
responses:
@@ -2575,11 +2583,12 @@
consumes:
- application/json
parameters:
- - description: 閲囪喘鍗旾D
- in: path
- name: id
+ - description: 鍙傛暟
+ in: body
+ name: data
required: true
- type: integer
+ schema:
+ $ref: '#/definitions/purchaserequest.SubmitPurchase'
produces:
- application/json
responses:
--
Gitblit v1.8.0