255 lines
6.9 KiB
JSON
255 lines
6.9 KiB
JSON
{
|
|
"schemes": [
|
|
"http"
|
|
],
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "Easy and feature-rich wishlist.",
|
|
"title": "Easywish client API",
|
|
"contact": {},
|
|
"license": {
|
|
"name": "GPL 3.0"
|
|
},
|
|
"version": "1.0"
|
|
},
|
|
"basePath": "/api/",
|
|
"paths": {
|
|
"/account/changePassword": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"JWT": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"summary": "Change account password",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/auth/login": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Acquire tokens via login credentials or by providing 2FA code",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/auth/passwordResetBegin": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Request password reset email",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/auth/passwordResetComplete": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Complete password reset with email code and provide 2FA code or backup code if needed",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/auth/refresh": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Receive new tokens via refresh token",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/auth/registrationBegin": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Register an account",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/auth/registrationComplete": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Confirm with code, finish creating the account",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/profile/me": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JWT": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Profile"
|
|
],
|
|
"summary": "Get own profile when authorized",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/profile/privacy": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JWT": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Profile"
|
|
],
|
|
"summary": "Get profile privacy settings",
|
|
"responses": {}
|
|
},
|
|
"patch": {
|
|
"security": [
|
|
{
|
|
"JWT": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Profile"
|
|
],
|
|
"summary": "Update profile privacy settings",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/profile/{username}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"JWT": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Profile"
|
|
],
|
|
"summary": "Get someone's profile details",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Username",
|
|
"name": "username",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/service/health": {
|
|
"get": {
|
|
"description": "Used internally for checking service health",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Service"
|
|
],
|
|
"summary": "Get health status",
|
|
"responses": {
|
|
"200": {
|
|
"description": "desc",
|
|
"schema": {
|
|
"$ref": "#/definitions/controllers.HealthStatus"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"controllers.HealthStatus": {
|
|
"type": "object",
|
|
"properties": {
|
|
"healthy": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"JWT": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
} |