Example files for the guided onboarding at try.grapity.dev.
These files match the missions shown in the panel. You can download them directly from the panel UI or clone this repository.
| File | Purpose |
|---|---|
payments-api.yaml |
Rich OpenAPI 3.1 Payments API for the registry missions. |
payments-api-breaking.yaml |
Same spec with a breaking change to demonstrate compatibility protection. |
payments-api-evolved.yaml |
Backward-compatible evolution with an optional query parameter, bumping the version to 1.1.0. |
grapity.yaml |
Project config for grapity materialize. |
gateway.config.yaml |
Kong gateway config for the gateway mission. |
docker-compose.kong.yml |
Local Kong + PostgreSQL stack for the optional bonus mission. |
-
Install the CLI:
npm install -g @grapity/grapity
-
Initialize against your demo instance (copy the command from the panel):
grapity init --remote --url https://<your-registry-hostname> \ --auth keycloak \ --keycloak-server https://keycloak.grapity.dev \ --keycloak-realm <your-realm> \ --keycloak-client-id <your-cli-client-id>
-
Export your client secret:
export GRAPITY_CLIENT_SECRET="<your-cli-client-secret>"
-
Push the Payments API:
grapity registry push ./payments-api.yaml --name payments-api
-
Try the breaking change:
grapity registry push ./payments-api-breaking.yaml --name payments-api
This should fail with a breaking-change error. Then push the safe evolution:
grapity registry push ./payments-api-evolved.yaml --name payments-api
-
Materialize the locked spec:
grapity materialize payments-api
-
Push and preview the gateway config:
grapity gateway push ./gateway.config.yaml grapity gateway preview --name payments-gateway --env staging
-
Optional: provision to a local Kong:
docker compose -f docker-compose.kong.yml up -d grapity gateway provision --name payments-gateway --env staging --sync curl http://localhost:8000/v1/payments