Skip to content

Commit

Permalink
fix(fix): Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
deo002 committed Apr 2, 2024
1 parent 0e20943 commit de097ee
Show file tree
Hide file tree
Showing 5 changed files with 254 additions and 151 deletions.
48 changes: 44 additions & 4 deletions cmd/laas/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -909,10 +909,25 @@ const docTemplate = `{
}
],
"responses": {
"207": {
"description": "Multi-Status",
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.ImportObligationsResponse"
"allOf": [
{
"$ref": "#/definitions/models.ImportObligationsResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/models.ObligationImportStatus"
}
}
}
}
]
}
},
"400": {
Expand Down Expand Up @@ -1416,7 +1431,7 @@ const docTemplate = `{
},
"status": {
"type": "integer",
"example": 207
"example": 200
}
}
},
Expand Down Expand Up @@ -1784,6 +1799,31 @@ const docTemplate = `{
}
}
},
"models.ObligationId": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 31
},
"topic": {
"type": "string",
"example": "copyleft"
}
}
},
"models.ObligationImportStatus": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/models.ObligationId"
},
"status": {
"type": "integer",
"example": 200
}
}
},
"models.ObligationMapResponse": {
"type": "object",
"properties": {
Expand Down
48 changes: 44 additions & 4 deletions cmd/laas/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -902,10 +902,25 @@
}
],
"responses": {
"207": {
"description": "Multi-Status",
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.ImportObligationsResponse"
"allOf": [
{
"$ref": "#/definitions/models.ImportObligationsResponse"
},
{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/models.ObligationImportStatus"
}
}
}
}
]
}
},
"400": {
Expand Down Expand Up @@ -1409,7 +1424,7 @@
},
"status": {
"type": "integer",
"example": 207
"example": 200
}
}
},
Expand Down Expand Up @@ -1777,6 +1792,31 @@
}
}
},
"models.ObligationId": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 31
},
"topic": {
"type": "string",
"example": "copyleft"
}
}
},
"models.ObligationImportStatus": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/models.ObligationId"
},
"status": {
"type": "integer",
"example": 200
}
}
},
"models.ObligationMapResponse": {
"type": "object",
"properties": {
Expand Down
32 changes: 28 additions & 4 deletions cmd/laas/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ definitions:
items: {}
type: array
status:
example: 207
example: 200
type: integer
type: object
models.LicenseDB:
Expand Down Expand Up @@ -328,6 +328,23 @@ definitions:
example: risk
type: string
type: object
models.ObligationId:
properties:
id:
example: 31
type: integer
topic:
example: copyleft
type: string
type: object
models.ObligationImportStatus:
properties:
data:
$ref: '#/definitions/models.ObligationId'
status:
example: 200
type: integer
type: object
models.ObligationMapResponse:
properties:
data:
Expand Down Expand Up @@ -1256,10 +1273,17 @@ paths:
produces:
- application/json
responses:
"207":
description: Multi-Status
"200":
description: OK
schema:
$ref: '#/definitions/models.ImportObligationsResponse'
allOf:
- $ref: '#/definitions/models.ImportObligationsResponse'
- properties:
data:
items:
$ref: '#/definitions/models.ObligationImportStatus'
type: array
type: object
"400":
description: input file must be present
schema:
Expand Down
Loading

0 comments on commit de097ee

Please sign in to comment.