docs(app): 📝 update for routes

master
Xeronith 2022-10-10 12:32:25 +03:30
rodzic 0a900796e4
commit 17005cd73d
8 zmienionych plików z 57 dodań i 57 usunięć

Wyświetl plik

@ -12,15 +12,15 @@ import (
"server"
)
// @title GreatApe API
// @version 1.0
// @description GreatApe is a free audio and video social-media platform that can be used via an app.
// @description It is a Fediverse technology that supports federation via ActivityPub.
// @BasePath /
// @title GreatApe API
// @version 1.0
// @description GreatApe is a free audio and video social-media platform that can be used via an app.
// @description It is a Fediverse technology that supports federation via ActivityPub.
// @BasePath /
// @securityDefinitions.apiKey JWT
// @in header
// @name Authorization
// @description Example: Bearer {Your JWT Token}
// @in header
// @name Authorization
// @description Example: Bearer {Your JWT Token}
func main() {
if config.IsProduction() {
docs.SwaggerInfo.Host = config.DOMAIN

Wyświetl plik

@ -11,13 +11,13 @@ import (
"strconv"
)
// Followers godoc
// @Tags ActivityPub
// @Accept json
// @Produce json
// @Param username path string true "Username"
// @Success 200 {object} map[string]interface{}
// @Router /u/{username}/followers [get]
// Followers godoc
// @Tags ActivityPub
// @Accept json
// @Produce json
// @Param username path string true "Username"
// @Success 200 {object} map[string]interface{}
// @Router /u/{username}/followers [get]
func _() {}
var Followers = route.New(HttpGet, "/u/:username/followers", func(x IContext) error {

Wyświetl plik

@ -10,12 +10,12 @@ import (
)
// Following godoc
// @Tags ActivityPub
// @Accept json
// @Produce json
// @Param username path string true "Username"
// @Success 200 {object} map[string]interface{}
// @Router /u/{username}/following [get]
// @Tags ActivityPub
// @Accept json
// @Produce json
// @Param username path string true "Username"
// @Success 200 {object} map[string]interface{}
// @Router /u/{username}/following [get]
func _() {}
var Following = route.New(HttpGet, "/u/:username/following", func(x IContext) error {

Wyświetl plik

@ -11,12 +11,12 @@ import (
)
// Login godoc
// @Tags Authentication
// @Accept json
// @Produce json
// @Param payload body dto.LoginRequest true "Payload"
// @Success 200 {object} dto.LoginResponse
// @Router /api/v1/login [post]
// @Tags Authentication
// @Accept json
// @Produce json
// @Param payload body dto.LoginRequest true "Payload"
// @Success 200 {object} dto.LoginResponse
// @Router /api/v1/login [post]
func _() {}
var Login = route.New(HttpPost, "/api/v1/login", func(x IContext) error {

Wyświetl plik

@ -18,12 +18,12 @@ var Profile = route.New(HttpGet, "/profile", func(x IContext) error {
})
// GetProfile godoc
// @Tags User
// @Accept json
// @Produce json
// @Security JWT
// @Success 200 {object} dto.User
// @Router /api/v1/profile [get]
// @Tags User
// @Accept json
// @Produce json
// @Security JWT
// @Success 200 {object} dto.User
// @Router /api/v1/profile [get]
func _() {}
var GetProfile = route.New(HttpGet, "/api/v1/profile", func(x IContext) error {

Wyświetl plik

@ -12,12 +12,12 @@ import (
)
// Signup godoc
// @Tags Authentication
// @Accept json
// @Produce json
// @Param payload body dto.SignupRequest true "Payload"
// @Success 200 {object} dto.SignupResponse
// @Router /api/v1/signup [post]
// @Tags Authentication
// @Accept json
// @Produce json
// @Param payload body dto.SignupRequest true "Payload"
// @Success 200 {object} dto.SignupResponse
// @Router /api/v1/signup [post]
func _() {}
var Signup = route.New(HttpPost, "/api/v1/signup", func(x IContext) error {
@ -64,12 +64,12 @@ var Signup = route.New(HttpPost, "/api/v1/signup", func(x IContext) error {
})
// Verify godoc
// @Tags Authentication
// @Accept json
// @Produce json
// @Param payload body dto.VerifyRequest true "Payload"
// @Success 200 {object} dto.VerifyResponse
// @Router /api/v1/verify [post]
// @Tags Authentication
// @Accept json
// @Produce json
// @Param payload body dto.VerifyRequest true "Payload"
// @Success 200 {object} dto.VerifyResponse
// @Router /api/v1/verify [post]
func _() {}
var Verify = route.New(HttpPost, "/api/v1/verify", func(x IContext) error {

Wyświetl plik

@ -9,12 +9,12 @@ import (
)
// User godoc
// @Tags ActivityPub
// @Accept json
// @Produce json
// @Param username path string true "Username"
// @Success 200 {object} map[string]interface{}
// @Router /u/{username} [get]
// @Tags ActivityPub
// @Accept json
// @Produce json
// @Param username path string true "Username"
// @Success 200 {object} map[string]interface{}
// @Router /u/{username} [get]
func _() {}
var User = route.New(contracts.HttpGet, "/u/:username", func(x contracts.IContext) error {

Wyświetl plik

@ -9,12 +9,12 @@ import (
)
// WebFinger godoc
// @Tags WebFinger
// @Accept json
// @Produce json
// @Param resource query string true "Resource" default(acct:user@domain.com)
// @Success 200 {object} map[string]interface{}
// @Router /.well-known/webfinger [get]
// @Tags WebFinger
// @Accept json
// @Produce json
// @Param resource query string true "Resource" default(acct:user@domain.com)
// @Success 200 {object} map[string]interface{}
// @Router /.well-known/webfinger [get]
func _() {}
var WebFinger = route.New(HttpGet, "/.well-known/webfinger", func(x IContext) error {