kopia lustrzana https://github.com/reiver/greatape
241 wiersze
6.7 KiB
JSON
241 wiersze
6.7 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "GreatApe is a free audio and video social-media platform that can be used via an app. GreatApe is a Fediverse technology that supports federation via ActivityPub.",
|
|
"title": "GreatApe API",
|
|
"contact": {},
|
|
"version": "1.0"
|
|
},
|
|
"basePath": "/",
|
|
"paths": {
|
|
"/api/v1/login": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Authentication"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.LoginRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.LoginResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/signup": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Authentication"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.SignupRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.SignupResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/verify": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Authentication"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.VerifyRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/dto.VerifyResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"dto.Auth": {
|
|
"type": "object",
|
|
"properties": {
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.LoginRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.LoginResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"auth": {
|
|
"$ref": "#/definitions/dto.Auth"
|
|
},
|
|
"user": {
|
|
"$ref": "#/definitions/dto.User"
|
|
}
|
|
}
|
|
},
|
|
"dto.SignupRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"password",
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.SignupResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.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"
|
|
},
|
|
"publicKey": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"webfinger": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.VerifyRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dto.VerifyResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"auth": {
|
|
"$ref": "#/definitions/dto.Auth"
|
|
},
|
|
"user": {
|
|
"$ref": "#/definitions/dto.User"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |