@@ -22,249 +22,6 @@ const docTemplate = `{
2222 "host": "{{.Host}}",
2323 "basePath": "{{.BasePath}}",
2424 "paths": {
25- "/auth/check": {
26- "get": {
27- "security": [
28- {
29- "Bearer": []
30- }
31- ],
32- "description": "Checks if the provided token is valid",
33- "produces": [
34- "application/json"
35- ],
36- "tags": [
37- "Auth"
38- ],
39- "summary": "Check authentication",
40- "responses": {
41- "200": {
42- "description": "OK",
43- "schema": {
44- "type": "object",
45- "additionalProperties": {
46- "type": "boolean"
47- }
48- }
49- },
50- "401": {
51- "description": "Unauthorized",
52- "schema": {
53- "type": "object",
54- "additionalProperties": {
55- "type": "string"
56- }
57- }
58- }
59- }
60- }
61- },
62- "/auth/delete-account": {
63- "delete": {
64- "security": [
65- {
66- "Bearer": []
67- }
68- ],
69- "description": "Deletes the authenticated user's account",
70- "produces": [
71- "application/json"
72- ],
73- "tags": [
74- "Auth"
75- ],
76- "summary": "Delete user account",
77- "responses": {
78- "200": {
79- "description": "OK",
80- "schema": {
81- "type": "object",
82- "additionalProperties": {
83- "type": "string"
84- }
85- }
86- },
87- "401": {
88- "description": "Unauthorized",
89- "schema": {
90- "type": "object",
91- "additionalProperties": {
92- "type": "string"
93- }
94- }
95- }
96- }
97- }
98- },
99- "/auth/login": {
100- "post": {
101- "description": "Authenticates a user and returns a JWT token",
102- "consumes": [
103- "application/json"
104- ],
105- "produces": [
106- "application/json"
107- ],
108- "tags": [
109- "Auth"
110- ],
111- "summary": "User login",
112- "parameters": [
113- {
114- "description": "Login credentials",
115- "name": "request",
116- "in": "body",
117- "required": true,
118- "schema": {
119- "$ref": "#/definitions/models.LoginRequest"
120- }
121- }
122- ],
123- "responses": {
124- "200": {
125- "description": "OK",
126- "schema": {
127- "$ref": "#/definitions/models.LoginResponse"
128- }
129- },
130- "400": {
131- "description": "Bad Request",
132- "schema": {
133- "type": "object",
134- "additionalProperties": {
135- "type": "string"
136- }
137- }
138- },
139- "401": {
140- "description": "Unauthorized",
141- "schema": {
142- "type": "object",
143- "additionalProperties": {
144- "type": "string"
145- }
146- }
147- }
148- }
149- }
150- },
151- "/auth/logout": {
152- "post": {
153- "security": [
154- {
155- "Bearer": []
156- }
157- ],
158- "description": "Logs out a user by invalidating their token",
159- "produces": [
160- "application/json"
161- ],
162- "tags": [
163- "Auth"
164- ],
165- "summary": "User logout",
166- "responses": {
167- "200": {
168- "description": "OK",
169- "schema": {
170- "type": "object",
171- "additionalProperties": {
172- "type": "string"
173- }
174- }
175- },
176- "401": {
177- "description": "Unauthorized",
178- "schema": {
179- "type": "object",
180- "additionalProperties": {
181- "type": "string"
182- }
183- }
184- }
185- }
186- }
187- },
188- "/auth/register": {
189- "post": {
190- "description": "Registers a new user",
191- "consumes": [
192- "application/json"
193- ],
194- "produces": [
195- "application/json"
196- ],
197- "tags": [
198- "Auth"
199- ],
200- "summary": "User registration",
201- "parameters": [
202- {
203- "description": "Registration details",
204- "name": "request",
205- "in": "body",
206- "required": true,
207- "schema": {
208- "$ref": "#/definitions/models.RegisterRequest"
209- }
210- }
211- ],
212- "responses": {
213- "200": {
214- "description": "OK",
215- "schema": {
216- "type": "object",
217- "additionalProperties": {
218- "type": "string"
219- }
220- }
221- },
222- "400": {
223- "description": "Bad Request",
224- "schema": {
225- "type": "object",
226- "additionalProperties": {
227- "type": "string"
228- }
229- }
230- }
231- }
232- }
233- },
234- "/auth/user": {
235- "get": {
236- "security": [
237- {
238- "Bearer": []
239- }
240- ],
241- "description": "Returns information about the authenticated user",
242- "produces": [
243- "application/json"
244- ],
245- "tags": [
246- "Auth"
247- ],
248- "summary": "Get user information",
249- "responses": {
250- "200": {
251- "description": "OK",
252- "schema": {
253- "$ref": "#/definitions/models.UserResponse"
254- }
255- },
256- "401": {
257- "description": "Unauthorized",
258- "schema": {
259- "type": "object",
260- "additionalProperties": {
261- "type": "string"
262- }
263- }
264- }
265- }
266- }
267- },
26825 "/name": {
26926 "get": {
27027 "description": "Returns the name of the server",
@@ -827,35 +584,6 @@ const docTemplate = `{
827584 }
828585 },
829586 "definitions": {
830- "models.LoginRequest": {
831- "type": "object",
832- "required": [
833- "password",
834- "username"
835- ],
836- "properties": {
837- "password": {
838- "type": "string"
839- },
840- "username": {
841- "type": "string"
842- }
843- }
844- },
845- "models.LoginResponse": {
846- "type": "object",
847- "properties": {
848- "message": {
849- "type": "string"
850- },
851- "token": {
852- "type": "string"
853- },
854- "username": {
855- "type": "string"
856- }
857- }
858- },
859587 "models.PuzzleResponse": {
860588 "type": "object",
861589 "properties": {
@@ -894,21 +622,6 @@ const docTemplate = `{
894622 }
895623 }
896624 },
897- "models.RegisterRequest": {
898- "type": "object",
899- "required": [
900- "password",
901- "username"
902- ],
903- "properties": {
904- "password": {
905- "type": "string"
906- },
907- "username": {
908- "type": "string"
909- }
910- }
911- },
912625 "models.ThemeResponse": {
913626 "type": "object",
914627 "properties": {
@@ -928,17 +641,6 @@ const docTemplate = `{
928641 "type": "integer"
929642 }
930643 }
931- },
932- "models.UserResponse": {
933- "type": "object",
934- "properties": {
935- "createdAt": {
936- "type": "string"
937- },
938- "username": {
939- "type": "string"
940- }
941- }
942644 }
943645 },
944646 "securityDefinitions": {
0 commit comments