diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-04-19 14:14:11 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-04-19 14:14:11 +0300 |
| commit | 9fade13368c732401030d392ef2332279716243e (patch) | |
| tree | 17427c8ec058ee8c32d0244230031fb4f6f50767 /docs/swagger.yaml | |
| parent | doc: swagger init for login and user routes (#34) (diff) | |
| download | lphub-9fade13368c732401030d392ef2332279716243e.tar.gz lphub-9fade13368c732401030d392ef2332279716243e.tar.bz2 lphub-9fade13368c732401030d392ef2332279716243e.zip | |
doc: complete rest of swagger implementation, change rankings response (#34)
Diffstat (limited to 'docs/swagger.yaml')
| -rw-r--r-- | docs/swagger.yaml | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 81d4073..5300e1f 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml | |||
| @@ -5,6 +5,20 @@ definitions: | |||
| 5 | token: | 5 | token: |
| 6 | type: string | 6 | type: string |
| 7 | type: object | 7 | type: object |
| 8 | models.Map: | ||
| 9 | properties: | ||
| 10 | id: | ||
| 11 | type: integer | ||
| 12 | is_coop: | ||
| 13 | type: boolean | ||
| 14 | name: | ||
| 15 | type: string | ||
| 16 | records: {} | ||
| 17 | wr_score: | ||
| 18 | type: integer | ||
| 19 | wr_time: | ||
| 20 | type: integer | ||
| 21 | type: object | ||
| 8 | models.ProfileResponse: | 22 | models.ProfileResponse: |
| 9 | properties: | 23 | properties: |
| 10 | avatar_link: | 24 | avatar_link: |
| @@ -26,6 +40,22 @@ definitions: | |||
| 26 | username: | 40 | username: |
| 27 | type: string | 41 | type: string |
| 28 | type: object | 42 | type: object |
| 43 | models.RecordRequest: | ||
| 44 | properties: | ||
| 45 | is_partner_orange: | ||
| 46 | type: boolean | ||
| 47 | partner_id: | ||
| 48 | type: string | ||
| 49 | score_count: | ||
| 50 | type: integer | ||
| 51 | score_time: | ||
| 52 | type: integer | ||
| 53 | required: | ||
| 54 | - is_partner_orange | ||
| 55 | - partner_id | ||
| 56 | - score_count | ||
| 57 | - score_time | ||
| 58 | type: object | ||
| 29 | models.Response: | 59 | models.Response: |
| 30 | properties: | 60 | properties: |
| 31 | data: {} | 61 | data: {} |
| @@ -50,6 +80,28 @@ info: | |||
| 50 | title: Least Portals Database API | 80 | title: Least Portals Database API |
| 51 | version: "1.0" | 81 | version: "1.0" |
| 52 | paths: | 82 | paths: |
| 83 | /demo: | ||
| 84 | get: | ||
| 85 | consumes: | ||
| 86 | - application/json | ||
| 87 | parameters: | ||
| 88 | - description: Demo UUID | ||
| 89 | in: path | ||
| 90 | name: uuid | ||
| 91 | required: true | ||
| 92 | type: integer | ||
| 93 | produces: | ||
| 94 | - application/octet-stream | ||
| 95 | responses: | ||
| 96 | "200": | ||
| 97 | description: Demo File | ||
| 98 | schema: | ||
| 99 | type: file | ||
| 100 | "400": | ||
| 101 | description: Bad Request | ||
| 102 | schema: | ||
| 103 | $ref: '#/definitions/models.Response' | ||
| 104 | summary: Get demo with specified demo uuid. | ||
| 53 | /login: | 105 | /login: |
| 54 | get: | 106 | get: |
| 55 | consumes: | 107 | consumes: |
| @@ -71,6 +123,86 @@ paths: | |||
| 71 | schema: | 123 | schema: |
| 72 | $ref: '#/definitions/models.Response' | 124 | $ref: '#/definitions/models.Response' |
| 73 | summary: Get (redirect) login page for Steam auth. | 125 | summary: Get (redirect) login page for Steam auth. |
| 126 | /maps/{id}: | ||
| 127 | get: | ||
| 128 | consumes: | ||
| 129 | - application/json | ||
| 130 | parameters: | ||
| 131 | - description: Map ID | ||
| 132 | in: path | ||
| 133 | name: id | ||
| 134 | required: true | ||
| 135 | type: integer | ||
| 136 | produces: | ||
| 137 | - application/json | ||
| 138 | responses: | ||
| 139 | "200": | ||
| 140 | description: OK | ||
| 141 | schema: | ||
| 142 | allOf: | ||
| 143 | - $ref: '#/definitions/models.Response' | ||
| 144 | - properties: | ||
| 145 | data: | ||
| 146 | $ref: '#/definitions/models.Map' | ||
| 147 | type: object | ||
| 148 | "400": | ||
| 149 | description: Bad Request | ||
| 150 | schema: | ||
| 151 | $ref: '#/definitions/models.Response' | ||
| 152 | summary: Get map page with specified id. | ||
| 153 | /maps/{id}/record: | ||
| 154 | post: | ||
| 155 | consumes: | ||
| 156 | - multipart/form-data | ||
| 157 | parameters: | ||
| 158 | - description: Demos | ||
| 159 | in: formData | ||
| 160 | items: | ||
| 161 | type: file | ||
| 162 | name: demos | ||
| 163 | required: true | ||
| 164 | type: array | ||
| 165 | - description: Score Count | ||
| 166 | in: formData | ||
| 167 | name: score_count | ||
| 168 | required: true | ||
| 169 | type: integer | ||
| 170 | - description: Score Time | ||
| 171 | in: formData | ||
| 172 | name: score_time | ||
| 173 | required: true | ||
| 174 | type: integer | ||
| 175 | - description: Is Partner Orange | ||
| 176 | in: formData | ||
| 177 | name: is_partner_orange | ||
| 178 | required: true | ||
| 179 | type: boolean | ||
| 180 | - description: Partner ID | ||
| 181 | in: formData | ||
| 182 | name: partner_id | ||
| 183 | required: true | ||
| 184 | type: string | ||
| 185 | produces: | ||
| 186 | - application/json | ||
| 187 | responses: | ||
| 188 | "200": | ||
| 189 | description: OK | ||
| 190 | schema: | ||
| 191 | allOf: | ||
| 192 | - $ref: '#/definitions/models.Response' | ||
| 193 | - properties: | ||
| 194 | data: | ||
| 195 | $ref: '#/definitions/models.RecordRequest' | ||
| 196 | type: object | ||
| 197 | "400": | ||
| 198 | description: Bad Request | ||
| 199 | schema: | ||
| 200 | $ref: '#/definitions/models.Response' | ||
| 201 | "401": | ||
| 202 | description: Unauthorized | ||
| 203 | schema: | ||
| 204 | $ref: '#/definitions/models.Response' | ||
| 205 | summary: Post record with demo of a specific map. | ||
| 74 | /profile: | 206 | /profile: |
| 75 | get: | 207 | get: |
| 76 | consumes: | 208 | consumes: |