mirror of
https://github.com/Such-Software/adaptive-multi-protocol-gateway.git
synced 2026-10-17 15:41:41 +02:00
Add route catalog manifest generator
This commit is contained in:
@@ -207,9 +207,14 @@ The public schema is committed at `schemas/ampg.route-manifest.v1.schema.json`.
|
||||
Applications can validate generated manifests before AMPG config parsing:
|
||||
|
||||
```sh
|
||||
python3 tools/generate_route_manifest.py examples/route-catalog.json examples/route-manifest.json
|
||||
python3 -m ampg route-manifest validate routes.json
|
||||
```
|
||||
|
||||
`examples/route-catalog.json` is a neutral app-side input shape. Real framework adapters
|
||||
can replace it with generated route data from the application's router, then emit the same
|
||||
AMPG route-manifest contract.
|
||||
|
||||
```json
|
||||
{
|
||||
"schema": "ampg.route-manifest.v1",
|
||||
|
||||
@@ -59,9 +59,13 @@ The schema is generated at `schemas/ampg.route-manifest.v1.schema.json`, and app
|
||||
validate generated manifests with:
|
||||
|
||||
```sh
|
||||
python3 tools/generate_route_manifest.py examples/route-catalog.json examples/route-manifest.json
|
||||
python3 -m ampg route-manifest validate routes.json
|
||||
```
|
||||
|
||||
`examples/route-catalog.json` shows the adapter side of the workflow: app route metadata
|
||||
goes in, the stable AMPG route manifest comes out.
|
||||
|
||||
Required top-level fields:
|
||||
|
||||
- `schema`: must be `ampg.route-manifest.v1`.
|
||||
|
||||
Reference in New Issue
Block a user