1+ {
2+ "components" : {
3+ "schemas" : {
4+ "middleware.UserContext" : {
5+ "description" : " Information about the current user session." ,
6+ "properties" : {
7+ "email" : {
8+ "description" : " Primary email address (nullable)" ,
9+ "example" : " user@example.com" ,
10+ "type" : " string"
11+ },
12+ "emailConsent" : {
13+ "description" : " Whether the user agreed to receive emails" ,
14+ "example" : false ,
15+ "type" : " boolean"
16+ },
17+ "image" : {
18+ "description" : " Optional profile image URL\n @nullable" ,
19+ "example" : " https://cdn.example.com/avatar.png" ,
20+ "nullable" : true ,
21+ "type" : " string"
22+ },
23+ "name" : {
24+ "description" : " Full display name" ,
25+ "example" : " Jane Doe" ,
26+ "type" : " string"
27+ },
28+ "onboarded" : {
29+ "description" : " Whether the user completed onboarding" ,
30+ "example" : true ,
31+ "type" : " boolean"
32+ },
33+ "preferredEmail" : {
34+ "description" : " Preferred email address for communications" ,
35+ "example" : " user.alt@example.com" ,
36+ "type" : " string"
37+ },
38+ "role" : {
39+ "$ref" : " #/components/schemas/sqlc.AuthUserRole"
40+ },
41+ "userId" : {
42+ "description" : " Unique identifier for the user" ,
43+ "example" : " 550e8400-e29b-41d4-a716-446655440000" ,
44+ "format" : " uuid" ,
45+ "type" : " string"
46+ }
47+ },
48+ "type" : " object"
49+ },
50+ "response.ErrorResponse" : {
51+ "properties" : {
52+ "error" : {
53+ "type" : " string"
54+ },
55+ "message" : {
56+ "type" : " string"
57+ }
58+ },
59+ "type" : " object"
60+ },
61+ "sqlc.AuthUserRole" : {
62+ "description" : " Role assigned to the user" ,
63+ "enum" : [
64+ " user" ,
65+ " superuser"
66+ ],
67+ "type" : " string" ,
68+ "x-enum-varnames" : [
69+ " AuthUserRoleUser" ,
70+ " AuthUserRoleSuperuser"
71+ ]
72+ }
73+ }
74+ },
75+ "info" : {
76+ "contact" : {
77+ "email" : " support@swagger.io" ,
78+ "name" : " API Support" ,
79+ "url" : " http://www.swagger.io/support"
80+ },
81+ "description" : " This is SwampHacks' OpenAPI documentation." ,
82+ "license" : {
83+ "name" : " Apache 2.0" ,
84+ "url" : " http://www.apache.org/licenses/LICENSE-2.0.html"
85+ },
86+ "termsOfService" : " TODO" ,
87+ "title" : " SwampHacks Test API" ,
88+ "version" : " 1.0"
89+ },
90+ "externalDocs" : {
91+ "description" : " " ,
92+ "url" : " "
93+ },
94+ "paths" : {
95+ "/auth/me" : {
96+ "get" : {
97+ "description" : " get user from session" ,
98+ "requestBody" : {
99+ "content" : {
100+ "application/json" : {
101+ "schema" : {
102+ "type" : " object"
103+ }
104+ }
105+ }
106+ },
107+ "responses" : {
108+ "200" : {
109+ "content" : {
110+ "application/json" : {
111+ "schema" : {
112+ "$ref" : " #/components/schemas/middleware.UserContext"
113+ }
114+ }
115+ },
116+ "description" : " OK"
117+ },
118+ "400" : {
119+ "content" : {
120+ "application/json" : {
121+ "schema" : {
122+ "$ref" : " #/components/schemas/response.ErrorResponse"
123+ }
124+ }
125+ },
126+ "description" : " Bad Request"
127+ },
128+ "500" : {
129+ "content" : {
130+ "application/json" : {
131+ "schema" : {
132+ "$ref" : " #/components/schemas/response.ErrorResponse"
133+ }
134+ }
135+ },
136+ "description" : " Internal Server Error"
137+ }
138+ },
139+ "summary" : " Get details of current user." ,
140+ "tags" : [
141+ " auth"
142+ ]
143+ }
144+ }
145+ },
146+ "openapi" : " 3.1.0"
147+ }
0 commit comments