Flow
ServicesTemplate Service

Getting started

Run the template service locally with Make, Swagger, and curl.

Prerequisites

Follow Local development: make dev-up and make migrate.

Start the API

make dev-template

Authorization is not wired in the template service yet — endpoints are open aside from Idempotency-Key on writes.

Create a domain1 record

curl -s -X POST localhost:8081/v1/domain1 \
  -H "Idempotency-Key: $(uuidgen)" \
  -H 'Content-Type: application/json' \
  -d '{"value":"hello"}' | jq

Get by id

curl -s localhost:8081/v1/domain1/{id} | jq

Domain2 uses the same shape at /v1/domain2.

Generate OpenAPI

go run ./services/template/cmd/api -openapi > /tmp/template-openapi.yaml

The checked-in spec is services/template/openapi.yaml.

On this page