-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
41 lines (36 loc) · 914 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package main
// swagg-doc:api
// openapi: 3.0.0
// info:
// title: Sandbox API
// description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.
// version: 0.0.1
// servers:
// - url: http://localhost:8080/api/v1
// description: Optional server description, e.g. Development server for testing and development
//
// securitySchemes:
// ApiKeyAuth:
// type: apiKey
// in: header
// name: Authentication
//
// parameters:
// language-code:
// name: language-code
// in: header
// description: Translation fields language code
// required: true
// schema:
// type: string
// example: pt-br
import (
"net/http"
"github.com/andreluzz/swagg-doc/mock/api/controller"
"github.com/go-chi/chi"
)
func main() {
r := chi.NewRouter()
r.Get("/users", controller.GetUsers)
http.ListenAndServe(":1234", r)
}