https://github.com/koutsoumposval/integrator-ballerina
Service integrator written in Ballerina
https://github.com/koutsoumposval/integrator-ballerina
ballerina ballerina-lang integrator integrators-api
Last synced: 2 months ago
JSON representation
Service integrator written in Ballerina
- Host: GitHub
- URL: https://github.com/koutsoumposval/integrator-ballerina
- Owner: koutsoumposval
- Created: 2020-03-07T20:59:59.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-08T20:08:08.000Z (over 5 years ago)
- Last Synced: 2025-01-23T01:31:29.206Z (10 months ago)
- Topics: ballerina, ballerina-lang, integrator, integrators-api
- Language: Ballerina
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Ballerina Integrator
This is part of the ddd-playground project.
The project consists of many dockerised services written in different languages and exposing APIs.
An integrator component written in Ballerina lang will expose transformed and combined data of those APIs.
## Content
The application is the Integrator and it is written in Ballerina lang.
Base path of integrator is: `http://localhost:9090`
### Product Endpoints
API Endpoints available are:
```
GET "/product"
GET "/product/{id}"
POST "/product"
```
In details
```
curl --location --request GET "http://localhost:9090/product"
{
"data":[
{
"id":1,
"name":"Red Chair",
"categoryId":1
},
{
"id":2,
"name":"Blue Table",
"categoryId":2
},
{
"id":3,
"name":"Yellow Carpet",
"categoryId":3
}
],
"meta":{
"count":3,
"page":1,
"pageSize":3
}
}
```
### Get specific product
```
curl --location --request GET 'http://localhost:9090/product/2'
{
"id":2,
"name":"Blue Table",
"categoryId":2
}
```
### Create a new product
```
curl --location --request POST 'http://localhost:9090/product' -d '{"name":"Yellow Chair", "category_id":1}'
{
"id":4,
"name":"Yellow Chair",
"categoryId":1
}
```
### Configuration
There is a `ballerina.conf.dist` available.
Create a new `ballerina.conf` with your configuration preferences.
### Start
```
make start
```
### Stop
```
make stop
```