File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,24 @@ func main() {
4747 Route : "/users" ,
4848 HTTPMethod : "GET" ,
4949 OperationID : "getUser" ,
50+ Summary : "Get Users list" ,
51+ Responses : docs.Responses {
52+ getResponseOK (),
53+ },
54+ // HandlerFuncName: "handleCreateUser",
55+ RequestBody : docs.RequestBody {
56+ Description : "Get Users list" ,
57+ Content : docs.ContentTypes {
58+ getContentApplicationJSON ("#/components/schemas/User" ),
59+ },
60+ Required : true ,
61+ },
62+ })
63+
64+ apiDoc .AddRoute (& docs.Path {
65+ Route : "/users/{id}" ,
66+ HTTPMethod : "GET" ,
67+ OperationID : "getUser" ,
5068 Summary : "Get a User" ,
5169 Responses : docs.Responses {
5270 getResponseOK (),
@@ -59,6 +77,16 @@ func main() {
5977 },
6078 Required : true ,
6179 },
80+ Parameters : docs.Parameters {{
81+ Name : "id" ,
82+ Description : "User ID" ,
83+ In : "path" ,
84+ Required : true ,
85+ Schema : docs.Schema {
86+ Name : "id" ,
87+ Type : "string" ,
88+ },
89+ }},
6290 })
6391
6492 mux := http .NewServeMux ()
You can’t perform that action at this time.
0 commit comments