kopia lustrzana https://github.com/reiver/greatape
docs(app): 📝 update for routes
rodzic
0a900796e4
commit
17005cd73d
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Ładowanie…
Reference in New Issue