This is example implementation about jwt in robyn with driver db postgresql and logger request
create database connection
docker-compose up -d db
running app service
docker-compose up -d app
- Method: POST
- Endpoint:
/api/v1/user/register
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Body :
{
"id": "int",
"name": "string",
"email": "string",
"password": "string",
}
- Method: POST
- Endpoint:
/api/v1/user/login
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Body :
{
"email": "string",
"password": "string",
}
- Method: POST
- Endpoint:
/api/v1/todo/create
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Body :
{
"id": "int",
"name": "string",
"desc": "string",
"time": "time"
}
- Method: PUT
- Endpoint:
/api/v1/todo/update/{id}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Body :
{
"id": "int",
"name": "string",
"desc": "string",
"time": "time"
}
- Method: GET
- Endpoint:
/api/v1/todo/find
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Response :
{
"status_code": "int",
"description": "string",
"data": [
{
"id": "int",
"name": "string",
"desc": "string",
"time": "time"
}
],
}
- Method: GET
- Endpoint:
/api/v1/todo/find/{id}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Response :
{
"status_code": "int",
"description": "string",
"data":
{
"id": "int",
"name": "string",
"desc": "string",
"time": "time"
}
}
- Method: DELETE
- Endpoint:
/api/v1/todo/delete/{id}
- Header:
- Content-Type:
application/json
- Accept:
application/json
- Content-Type:
- Response :
{
"status_code": "int",
"description": "string",
}