Skip to content

Latest commit

 

History

History
214 lines (179 loc) · 3.69 KB

README.adoc

File metadata and controls

214 lines (179 loc) · 3.69 KB

Fusion

Github CI
Examples about Fusion framework.

Build

Pre-requisite: Maven >= 3.8 and Java >= 17.

mvn clean install

Documentation

To run the documentation website locally:

mvn process-classes -pl app-documentation yupiik-tools:serve-minisite -e

Test

Products

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

Orders

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