Spring webflux restful build using spring boot webflux and mongodb, this project used to learn reactive programming and code analytic using sonarqube
- Build skip tests
mvn clean install -DskipTests
- Build and run test
mvn clean install
- Build and push image using jib
mvn compile jib:build
- Build image local
mvn compile jib:dockerBuild
- Run test using gatling
mvn gatling:test
Request :
- Method : POST
- Endpoint :
/auth/signup
- Header :
- Content-Type: application/stream+json
- Accept: application/stream+json
- Body :
{
"username": "string",
"password": "string",
"email": "string",
"profileName": "string",
"roles": [
"string"
]
}
Response :
{
"accessToken": "string",
"refreshToken": "string",
"user": {
"id": "string",
"username": "string",
"email": "string",
"profileName": "string",
"active": true,
"roles": [
"string"
]
}
}
Request :
- Method : POST
- Endpoint :
/auth/token
- Header :
- Content-Type: application/stream+json
- Accept: application/stream+json
- Body :
{
"username": "string",
"password": "string"
}
Response :
{
"accessToken": "string",
"refreshToken": "string",
"user": {
"id": "string",
"username": "string",
"email": "string",
"profileName": "string",
"active": "boolean",
"roles": [
"string"
]
}
}
Request :
- Method : POST
- Endpoint :
/auth/refresh-token
- Header :
- Content-Type: application/stream+json
- Accept: application/stream+json
- Body :
{
"refreshToken": "string"
}
Response :
{
"accessToken": "string",
"refreshToken": "string",
"user": {
"id": "string",
"username": "string",
"email": "string",
"profileName": "string",
"active": "boolean",
"roles": [
"string"
]
}
}
Request :
- Method : POST
- Endpoint :
/posts
- Header :
- Authorization: Bearer xxxxx
- Content-Type: application/stream+json
- Accept: application/stream+json
- Body :
{
"title": "string",
"body": "string",
"comments": [
{
"name": "string",
"body": "string"
}
]
}
Response :
{
"status": "string",
"code": "number",
"rows": "number",
"data": {
"id": "string",
"title": "string",
"body": "string",
"comments": [
{
"name": "string",
"body": "string"
}
]
}
}
Request :
- Method : GET
- Endpoint :
/posts
- Header :
- Authorization: Bearer xxxxx
- Content-Type: application/stream+json
- Accept: application/stream+json
Response :
{
"status": "string",
"code": "number",
"rows": "number",
"data": [
{
"id": "string",
"title": "string",
"body": "string",
"comments": [
{
"name": "string",
"body": "string"
}
]
}
]
}
Request :
- Method : GET
- Endpoint :
/posts/{id}
- Header :
- Authorization: Bearer xxxxx
- Content-Type: application/stream+json
- Accept: application/stream+json
Response :
{
"status": "string",
"code": "number",
"rows": "number",
"data": {
"id": "string",
"title": "string",
"body": "string",
"comments": [
{
"name": "string",
"body": "string"
}
]
}
}
Request :
- Method : PUT
- Endpoint :
/posts/{id}
- Header :
- Authorization: Bearer xxxxx
- Content-Type: application/stream+json
- Accept: application/stream+json
- Body :
{
"title": "string",
"body": "string",
"comments": [
{
"name": "string",
"body": "string"
}
]
}
Response :
{
"status": "string",
"code": "number",
"rows": "number",
"data": {
"id": "string",
"title": "string",
"body": "string",
"comments": [
{
"name": "string",
"body": "string"
}
]
}
}
Request :
- Method : PUT
- Endpoint :
/posts/{id}/comment
- Header :
- Authorization: Bearer xxxxx
- Content-Type: application/stream+json
- Accept: application/stream+json
- Body :
{
"name": "string",
"body": "string"
}
Response :
{
"status": "string",
"code": "number",
"rows": "number",
"data": {
"id": "string",
"title": "string",
"body": "string",
"comments": [
{
"name": "string",
"body": "string"
}
]
}
}
Request :
- Method : DELETE
- Endpoint :
/posts/{id}
- Header :
- Authorization: Bearer xxxxx
- Accept: application/stream+json
Response :
{
"status": "string",
"code": "number",
"rows": "number",
"data": "string"
}