Skip to content

Commit

Permalink
Event cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Raajheer1 committed Oct 13, 2024
1 parent a08b0c0 commit 9d87bc4
Show file tree
Hide file tree
Showing 8 changed files with 353 additions and 106 deletions.
115 changes: 101 additions & 14 deletions external/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,58 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/events": {
"get": {
"description": "Get All Events (Paginated, default 10, limit 25)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"event"
],
"summary": "Get All Events",
"parameters": [
{
"type": "integer",
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Limit",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/event.EventResponse"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/utils.ErrResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/utils.ErrResponse"
}
}
}
}
},
"/facility": {
"get": {
"description": "Get all facilities",
Expand Down Expand Up @@ -392,6 +444,15 @@ const docTemplate = `{
"event"
],
"summary": "Get Events",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -429,6 +490,13 @@ const docTemplate = `{
],
"summary": "Create an Event",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
},
{
"description": "Event",
"name": "event",
Expand Down Expand Up @@ -475,6 +543,13 @@ const docTemplate = `{
],
"summary": "Get Event",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Event ID",
Expand Down Expand Up @@ -523,6 +598,13 @@ const docTemplate = `{
],
"summary": "Update Event",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Event ID",
Expand Down Expand Up @@ -580,6 +662,13 @@ const docTemplate = `{
],
"summary": "Delete Event",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Event ID",
Expand Down Expand Up @@ -625,6 +714,13 @@ const docTemplate = `{
],
"summary": "Patch Event",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Event ID",
Expand Down Expand Up @@ -5136,9 +5232,7 @@ const docTemplate = `{
"$ref": "#/definitions/constants.FacilityID"
},
"example": [
"[\"ZDV\"",
" \"ZAB\"",
" \"ZLC\"]"
"ZDV"
]
},
"fields": {
Expand All @@ -5147,9 +5241,7 @@ const docTemplate = `{
"type": "string"
},
"example": [
"[\"KDEN\"",
" \"KBJC\"",
" \"KAPA\"]"
"KDEN"
]
},
"start_date": {
Expand Down Expand Up @@ -5369,9 +5461,7 @@ const docTemplate = `{
"$ref": "#/definitions/constants.FacilityID"
},
"example": [
"[\"ZDV\"",
" \"ZAB\"",
" \"ZLC\"]"
"ZDV"
]
},
"fields": {
Expand All @@ -5380,9 +5470,7 @@ const docTemplate = `{
"type": "string"
},
"example": [
"[\"KDEN\"",
" \"KBJC\"",
" \"KAPA\"]"
"KDEN"
]
},
"positions": {
Expand All @@ -5391,8 +5479,7 @@ const docTemplate = `{
"type": "string"
},
"example": [
"[\"ZDV_APP\"",
" \"ZDV_TWR\"]"
"ZDV_APP"
]
},
"shifts": {
Expand Down
115 changes: 101 additions & 14 deletions external/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,58 @@
},
"basePath": "/v3",
"paths": {
"/events": {
"get": {
"description": "Get All Events (Paginated, default 10, limit 25)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"event"
],
"summary": "Get All Events",
"parameters": [
{
"type": "integer",
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Limit",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/event.EventResponse"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/utils.ErrResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/utils.ErrResponse"
}
}
}
}
},
"/facility": {
"get": {
"description": "Get all facilities",
Expand Down Expand Up @@ -385,6 +437,15 @@
"event"
],
"summary": "Get Events",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -422,6 +483,13 @@
],
"summary": "Create an Event",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
},
{
"description": "Event",
"name": "event",
Expand Down Expand Up @@ -468,6 +536,13 @@
],
"summary": "Get Event",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Event ID",
Expand Down Expand Up @@ -516,6 +591,13 @@
],
"summary": "Update Event",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Event ID",
Expand Down Expand Up @@ -573,6 +655,13 @@
],
"summary": "Delete Event",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Event ID",
Expand Down Expand Up @@ -618,6 +707,13 @@
],
"summary": "Patch Event",
"parameters": [
{
"type": "string",
"description": "Facility ID",
"name": "FacilityID",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Event ID",
Expand Down Expand Up @@ -5129,9 +5225,7 @@
"$ref": "#/definitions/constants.FacilityID"
},
"example": [
"[\"ZDV\"",
" \"ZAB\"",
" \"ZLC\"]"
"ZDV"
]
},
"fields": {
Expand All @@ -5140,9 +5234,7 @@
"type": "string"
},
"example": [
"[\"KDEN\"",
" \"KBJC\"",
" \"KAPA\"]"
"KDEN"
]
},
"start_date": {
Expand Down Expand Up @@ -5362,9 +5454,7 @@
"$ref": "#/definitions/constants.FacilityID"
},
"example": [
"[\"ZDV\"",
" \"ZAB\"",
" \"ZLC\"]"
"ZDV"
]
},
"fields": {
Expand All @@ -5373,9 +5463,7 @@
"type": "string"
},
"example": [
"[\"KDEN\"",
" \"KBJC\"",
" \"KAPA\"]"
"KDEN"
]
},
"positions": {
Expand All @@ -5384,8 +5472,7 @@
"type": "string"
},
"example": [
"[\"ZDV_APP\"",
" \"ZDV_TWR\"]"
"ZDV_APP"
]
},
"shifts": {
Expand Down
Loading

0 comments on commit 9d87bc4

Please sign in to comment.