Examples about Fusion framework.
To run the documentation website locally:
mvn process-classes -pl app-documentation yupiik-tools:serve-minisite -e
On local dev
REST:
curl http://localhost:8080/product | jq
JSON-RPC:
curl -X POST http://localhost:8080/jsonrpc -d '
{
"jsonrpc": "2.0",
"method": "fusion.examples.product.findAll"
}
' | jq
On Minikube
REST:
curl http://192.168.49.2:32340/product | jq
JSON-RPC:
curl -X POST http://192.168.49.2:32340/jsonrpc -d '
{
"jsonrpc": "2.0",
"method": "fusion.examples.product.findAll"
}
' | jq
On local dev
REST:
curl -X POST http://localhost:8080/order -d '
{
"description": "Mobile Line",
"name": "Mobile Line",
"products": [
{
"id": "123456789",
"name": "Mobile Line",
"description": "Mobile Line with MSISDN"
},
{
"id": "987654321",
"name": "Device Phone",
"description": "Phone Device X Model Alpha GT"
}
]
}
' | jq
curl http://localhost:8080/order | jq
JSON-RPC:
curl -X POST http://localhost:8080/jsonrpc -d '
{
"jsonrpc": "2.0",
"method": "fusion.examples.order.create",
"params": {
"order": {
"description": "Mobile Line",
"name": "Mobile Line",
"products": [
{
"id": "123456789",
"name": "Mobile Line",
"description": "Mobile Line with MSISDN"
},
{
"id": "987654321",
"name": "Device Phone",
"description": "Phone Device X Model Alpha GT"
}
]
}
}
}
' | jq
curl -X POST http://localhost:8080/jsonrpc -d '
{
"jsonrpc": "2.0",
"method": "fusion.examples.order.findAll"
}
' | jq
On Minikube
REST:
curl -X POST http://192.168.49.2:32340/order -d '
{
"description": "Mobile Line",
"name": "Mobile Line",
"products": [
{
"id": "123456789",
"name": "Mobile Line",
"description": "Mobile Line with MSISDN"
},
{
"id": "987654321",
"name": "Device Phone",
"description": "Phone Device X Model Alpha GT"
}
]
}
' | jq
curl http://192.168.49.2:32340/order | jq
JSON-RPC:
curl -X POST http://192.168.49.2:32340/jsonrpc -d '
{
"jsonrpc": "2.0",
"method": "fusion.examples.order.create",
"params": {
"order": {
"description": "Mobile Line",
"name": "Mobile Line",
"products": [
{
"id": "123456789",
"name": "Mobile Line",
"description": "Mobile Line with MSISDN"
},
{
"id": "987654321",
"name": "Device Phone",
"description": "Phone Device X Model Alpha GT"
}
]
}
}
}
' | jq
curl -X POST http://192.168.49.2:32340/jsonrpc -d '
{
"jsonrpc": "2.0",
"method": "fusion.examples.order.findAll"
}
' | jq