v2.0.0: doc: add swagger from code

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2024-03-17 21:54:48 +01:00
commit ee4e2e3e31
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
8 changed files with 502 additions and 3 deletions

View file

@ -7,6 +7,14 @@ import (
logins "gitlab.g3e.fr/h6n/users/internal"
)
// Login
// @Tags auth
// @Description Cette route permet d'obtenir un token user
// @Accept json
// @Product json
// @Router / [post]
// @Param request body logins.RequestLogin true "request body"
// @Success 200 {object} logins.ResponseLogin
func login(c echo.Context) error {
var request logins.RequestLogin
if err := c.Bind(&request); err != nil {