Skip to content

Commit

Permalink
update swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
Taehoya committed Mar 3, 2024
1 parent f6d998c commit 6fc2df3
Show file tree
Hide file tree
Showing 3 changed files with 311 additions and 17 deletions.
122 changes: 116 additions & 6 deletions server/docs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

122 changes: 116 additions & 6 deletions server/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,66 @@
}
},
"/v1/trips/{id}": {
"get": {
"security": [
{
"bearer": []
}
],
"description": "get trip by id",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"trip"
],
"summary": "get trip by id",
"parameters": [
{
"type": "string",
"description": "Authorization",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "integer",
"description": "id",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.DetailedTripResponseDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/dto.ErrorResponseDTO"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/dto.ErrorResponseDTO"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/dto.ErrorResponseDTO"
}
}
}
},
"put": {
"security": [
{
Expand Down Expand Up @@ -661,6 +721,60 @@
}
}
},
"dto.DetailedTripResponseDTO": {
"type": "object",
"required": [
"countryProperty"
],
"properties": {
"budget": {
"type": "number",
"example": 12345.12
},
"countryProperty": {
"$ref": "#/definitions/dto.CountryResponseDTO"
},
"description": {
"type": "string",
"example": "sample-description"
},
"endDateTime": {
"type": "string",
"example": "2024-01-02T15:04:05Z"
},
"id": {
"type": "integer",
"example": 1
},
"name": {
"type": "string",
"example": "sample-name"
},
"noteProperty": {
"$ref": "#/definitions/dto.TripNoteProperty"
},
"startDateTime": {
"type": "string",
"example": "2024-01-02T15:04:05Z"
},
"top5Transactions": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.TransactionResponseDTO"
}
},
"totalExpense": {
"type": "number",
"example": 100.12
},
"transactions": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.TransactionResponseDTO"
}
}
}
},
"dto.ErrorResponseDTO": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -785,7 +899,7 @@
"properties": {
"budget": {
"type": "number",
"example": 2000.12
"example": 2000.02
},
"countryId": {
"type": "integer",
Expand Down Expand Up @@ -820,15 +934,11 @@
"properties": {
"budget": {
"type": "number",
"example": 100.12
"example": 12345.12
},
"countryProperty": {
"$ref": "#/definitions/dto.CountryResponseDTO"
},
"description": {
"type": "string",
"example": "sample-description"
},
"endDateTime": {
"type": "string",
"example": "2024-01-02T15:04:05Z"
Expand Down
Loading

0 comments on commit 6fc2df3

Please sign in to comment.