ModelKG Gateway Routing
Overview
Keep gateway routing and aggregated API contracts consistent as services are added or extracted.
Workflow
- •Identify the target service, port, and external API prefix.
- •Add Traefik labels and dependencies in
docker-compose.yml. - •Add path rewrite middleware if the service uses
/api/v1internally. - •Decide whether to add the service to OpenAPI aggregation.
- •Verify routes and contracts.
Routing Checklist
- •Add a router rule for the new
/api/*prefix. - •Set
traefik.http.services.<name>.loadbalancer.server.port. - •Add
depends_onif the service relies on Postgres/Redis/Neo4j. - •Add rewrite middleware for
/api/v1services. - •Update the API catalog aggregator if frontends need the spec.
References
- •
references/gateway-routing.mdfor Traefik label patterns. - •
references/openapi-aggregation.mdfor contract aggregation. - •
references/validation.mdfor verification steps.