mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
public commit
This commit is contained in:
4
docs/api-reference/auth/login.mdx
Normal file
4
docs/api-reference/auth/login.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Login (password)'
|
||||
openapi: 'POST /api/auth/password/login'
|
||||
---
|
||||
4
docs/api-reference/auth/me.mdx
Normal file
4
docs/api-reference/auth/me.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Me'
|
||||
openapi: 'GET /api/auth/me'
|
||||
---
|
||||
4
docs/api-reference/auth/register.mdx
Normal file
4
docs/api-reference/auth/register.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Register (password)'
|
||||
openapi: 'POST /api/auth/password/register'
|
||||
---
|
||||
4
docs/api-reference/auth/strategies.mdx
Normal file
4
docs/api-reference/auth/strategies.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Strategies'
|
||||
openapi: 'GET /api/auth/strategies'
|
||||
---
|
||||
4
docs/api-reference/data/create.mdx
Normal file
4
docs/api-reference/data/create.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Create Entity'
|
||||
openapi: 'POST /api/data/{entity}'
|
||||
---
|
||||
4
docs/api-reference/data/delete.mdx
Normal file
4
docs/api-reference/data/delete.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Delete Entity'
|
||||
openapi: 'DELETE /api/data/{entity}/{id}'
|
||||
---
|
||||
4
docs/api-reference/data/get.mdx
Normal file
4
docs/api-reference/data/get.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Get Entity'
|
||||
openapi: 'GET /api/data/{entity}/{id}'
|
||||
---
|
||||
4
docs/api-reference/data/list.mdx
Normal file
4
docs/api-reference/data/list.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'List Entity'
|
||||
openapi: 'GET /api/data/{entity}'
|
||||
---
|
||||
4
docs/api-reference/data/update.mdx
Normal file
4
docs/api-reference/data/update.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Update Entity'
|
||||
openapi: 'PATCH /api/data/{entity}/{id}'
|
||||
---
|
||||
4
docs/api-reference/endpoint/create.mdx
Normal file
4
docs/api-reference/endpoint/create.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Create Plant'
|
||||
openapi: 'POST /plants'
|
||||
---
|
||||
4
docs/api-reference/endpoint/delete.mdx
Normal file
4
docs/api-reference/endpoint/delete.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Delete Plant'
|
||||
openapi: 'DELETE /plants/{id}'
|
||||
---
|
||||
4
docs/api-reference/endpoint/get.mdx
Normal file
4
docs/api-reference/endpoint/get.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Get Plants'
|
||||
openapi: 'GET /plants'
|
||||
---
|
||||
23
docs/api-reference/introduction.mdx
Normal file
23
docs/api-reference/introduction.mdx
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
title: 'Introduction'
|
||||
description: 'Example section for showcasing your API endpoints'
|
||||
---
|
||||
|
||||
<Warning>
|
||||
You need to make sure to point your request to your API server.
|
||||
</Warning>
|
||||
<Note>
|
||||
This section is a work in progress. Updates will be made soon.
|
||||
</Note>
|
||||
|
||||
## Authentication
|
||||
|
||||
All API endpoints are authenticated using Bearer tokens and picked up from the specification file.
|
||||
|
||||
```json
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
```
|
||||
391
docs/api-reference/openapi.json
Normal file
391
docs/api-reference/openapi.json
Normal file
@@ -0,0 +1,391 @@
|
||||
{
|
||||
"openapi": "3.1.0",
|
||||
"info": { "title": "bknd API", "version": "0.0.0" },
|
||||
"paths": {
|
||||
"/api/system/ping": {
|
||||
"get": {
|
||||
"summary": "Ping",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Pong",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pong": { "default": true, "type": "boolean" }
|
||||
},
|
||||
"required": ["pong"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["system"]
|
||||
}
|
||||
},
|
||||
"/api/system/config": {
|
||||
"get": {
|
||||
"summary": "Get config",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Config",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"version": { "type": "number" },
|
||||
"server": { "type": "object", "properties": {} },
|
||||
"data": { "type": "object", "properties": {} },
|
||||
"auth": { "type": "object", "properties": {} },
|
||||
"flows": { "type": "object", "properties": {} },
|
||||
"media": { "type": "object", "properties": {} }
|
||||
},
|
||||
"required": [
|
||||
"version",
|
||||
"server",
|
||||
"data",
|
||||
"auth",
|
||||
"flows",
|
||||
"media"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["system"]
|
||||
}
|
||||
},
|
||||
"/api/system/schema": {
|
||||
"get": {
|
||||
"summary": "Get config",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Config",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"version": { "type": "number" },
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"server": { "type": "object", "properties": {} },
|
||||
"data": { "type": "object", "properties": {} },
|
||||
"auth": { "type": "object", "properties": {} },
|
||||
"flows": { "type": "object", "properties": {} },
|
||||
"media": { "type": "object", "properties": {} }
|
||||
},
|
||||
"required": ["server", "data", "auth", "flows", "media"]
|
||||
}
|
||||
},
|
||||
"required": ["version", "schema"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["system"]
|
||||
}
|
||||
},
|
||||
"/api/data/{entity}": {
|
||||
"get": {
|
||||
"summary": "List entities",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "entity",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": { "type": "string" }
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "List of entities",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": { "id": { "type": "number" } },
|
||||
"required": ["id"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["data"]
|
||||
},
|
||||
"post": {
|
||||
"summary": "Create entity",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "entity",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": { "type": "string" }
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "type": "object", "properties": {} }
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Entity",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": { "id": { "type": "number" } },
|
||||
"required": ["id"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["data"]
|
||||
}
|
||||
},
|
||||
"/api/data/{entity}/{id}": {
|
||||
"get": {
|
||||
"summary": "Get entity",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "entity",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": { "type": "string" }
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": { "type": "number" }
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Entity",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": { "id": { "type": "number" } },
|
||||
"required": ["id"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["data"]
|
||||
},
|
||||
"patch": {
|
||||
"summary": "Update entity",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "entity",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": { "type": "string" }
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": { "type": "number" }
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "type": "object", "properties": {} }
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Entity",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": { "id": { "type": "number" } },
|
||||
"required": ["id"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["data"]
|
||||
},
|
||||
"delete": {
|
||||
"summary": "Delete entity",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "entity",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": { "type": "string" }
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": { "type": "number" }
|
||||
}
|
||||
],
|
||||
"responses": { "200": { "description": "Entity deleted" } },
|
||||
"tags": ["data"]
|
||||
}
|
||||
},
|
||||
"/api/auth/password/login": {
|
||||
"post": {
|
||||
"summary": "Login",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": { "type": "string" },
|
||||
"password": { "type": "string" }
|
||||
},
|
||||
"required": ["email", "password"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "User",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"user": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"email": { "type": "string" },
|
||||
"name": { "type": "string" }
|
||||
},
|
||||
"required": ["id", "email", "name"]
|
||||
}
|
||||
},
|
||||
"required": ["user"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["auth"]
|
||||
}
|
||||
},
|
||||
"/api/auth/password/register": {
|
||||
"post": {
|
||||
"summary": "Register",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": { "type": "string" },
|
||||
"password": { "type": "string" }
|
||||
},
|
||||
"required": ["email", "password"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "User",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"user": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"email": { "type": "string" },
|
||||
"name": { "type": "string" }
|
||||
},
|
||||
"required": ["id", "email", "name"]
|
||||
}
|
||||
},
|
||||
"required": ["user"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["auth"]
|
||||
}
|
||||
},
|
||||
"/api/auth/me": {
|
||||
"get": {
|
||||
"summary": "Get me",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "User",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"user": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "string" },
|
||||
"email": { "type": "string" },
|
||||
"name": { "type": "string" }
|
||||
},
|
||||
"required": ["id", "email", "name"]
|
||||
}
|
||||
},
|
||||
"required": ["user"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["auth"]
|
||||
}
|
||||
},
|
||||
"/api/auth/strategies": {
|
||||
"get": {
|
||||
"summary": "Get auth strategies",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Strategies",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"strategies": { "type": "object", "properties": {} }
|
||||
},
|
||||
"required": ["strategies"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["auth"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
4
docs/api-reference/system/config.mdx
Normal file
4
docs/api-reference/system/config.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Config'
|
||||
openapi: 'GET /api/system/config'
|
||||
---
|
||||
4
docs/api-reference/system/ping.mdx
Normal file
4
docs/api-reference/system/ping.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Ping'
|
||||
openapi: 'GET /api/system/ping'
|
||||
---
|
||||
4
docs/api-reference/system/schema.mdx
Normal file
4
docs/api-reference/system/schema.mdx
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: 'Schema'
|
||||
openapi: 'GET /api/system/schema'
|
||||
---
|
||||
Reference in New Issue
Block a user