greatape/greataped/app/docs/docs.go

495 wiersze
14 KiB
Go

// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/.well-known/webfinger": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"WebFinger"
],
"parameters": [
{
"type": "string",
"default": "acct:user@domain.com",
"description": "Resource",
"name": "resource",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/api/v1/feed/types": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Feed"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"/api/v1/login": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Authentication"
],
"parameters": [
{
"description": "Payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/LoginRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/LoginResponse"
}
}
}
}
},
"/api/v1/profile": {
"get": {
"security": [
{
"JWT": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"User"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/User"
}
}
}
}
},
"/api/v1/signup": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Authentication"
],
"parameters": [
{
"description": "Payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SignupRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/SignupResponse"
}
}
}
}
},
"/api/v1/users/{username}/feed/{type}": {
"get": {
"security": [
{
"JWT": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Feed"
],
"parameters": [
{
"type": "string",
"description": "Username",
"name": "username",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Type",
"name": "type",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/api/v1/verify": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Authentication"
],
"parameters": [
{
"description": "Payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/VerifyRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/VerifyResponse"
}
}
}
}
},
"/u/{username}": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ActivityPub"
],
"parameters": [
{
"type": "string",
"description": "Username",
"name": "username",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/u/{username}/followers": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ActivityPub"
],
"parameters": [
{
"type": "string",
"description": "Username",
"name": "username",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/u/{username}/following": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ActivityPub"
],
"parameters": [
{
"type": "string",
"description": "Username",
"name": "username",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
},
"definitions": {
"Auth": {
"type": "object",
"properties": {
"token": {
"type": "string"
}
}
},
"LoginRequest": {
"type": "object",
"required": [
"email",
"password"
],
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"LoginResponse": {
"type": "object",
"properties": {
"auth": {
"$ref": "#/definitions/Auth"
},
"user": {
"$ref": "#/definitions/User"
}
}
},
"SignupRequest": {
"type": "object",
"required": [
"email",
"password",
"username"
],
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"SignupResponse": {
"type": "object",
"properties": {
"code": {
"type": "string"
}
}
},
"User": {
"type": "object",
"properties": {
"actor": {
"type": "string"
},
"api_key": {
"type": "string"
},
"avatar": {
"type": "string"
},
"banner": {
"type": "string"
},
"bio": {
"type": "string"
},
"display_name": {
"type": "string"
},
"email": {
"type": "string"
},
"github": {
"type": "string"
},
"id": {
"type": "integer"
},
"private_profile": {
"type": "boolean"
},
"public_key": {
"type": "string"
},
"username": {
"type": "string"
},
"webfinger": {
"type": "string"
}
}
},
"VerifyRequest": {
"type": "object",
"required": [
"code",
"email"
],
"properties": {
"code": {
"type": "string"
},
"email": {
"type": "string"
}
}
},
"VerifyResponse": {
"type": "object",
"properties": {
"auth": {
"$ref": "#/definitions/Auth"
},
"user": {
"$ref": "#/definitions/User"
}
}
}
},
"securityDefinitions": {
"JWT": {
"description": "Example: Bearer {Your JWT Token}",
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "1.0",
Host: "",
BasePath: "/",
Schemes: []string{},
Title: "GreatApe API",
Description: "GreatApe is a free audio and video social-media platform that can be used via an app.\nIt is a Fediverse technology that supports federation via ActivityPub.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}