refactor: extract omnigraph-api-types crate from omnigraph-server

Move api.rs (HTTP request/response DTOs + OpenAPI schemas) into omnigraph-api-types (deps: engine, compiler, queries, serde, serde_json, utoipa). Repoint crate::queries::StoredQuery -> omnigraph_queries. Relocate the two catalog-projection tests here, where query_catalog_entry lives, eliminating the queries<->api dev-dep cycle (no cycle, tests at their boundary). Server aliases via 'pub use omnigraph_api_types as api;'. openapi.json byte-identical (drift test passes; no regen). 2 api-types tests pass; server+cli compile. No behavior change.
This commit is contained in:
Ragnor Comerford 2026-06-03 11:14:19 +02:00
parent 628ecf428a
commit c51b9e1e20
No known key found for this signature in database
6 changed files with 118 additions and 2 deletions

13
Cargo.lock generated
View file

@ -4541,6 +4541,18 @@ dependencies = [
"tokio",
]
[[package]]
name = "omnigraph-api-types"
version = "0.6.1"
dependencies = [
"omnigraph-compiler",
"omnigraph-engine",
"omnigraph-queries",
"serde",
"serde_json",
"utoipa",
]
[[package]]
name = "omnigraph-cli"
version = "0.6.1"
@ -4673,6 +4685,7 @@ dependencies = [
"futures",
"lance",
"lance-index",
"omnigraph-api-types",
"omnigraph-compiler",
"omnigraph-config",
"omnigraph-engine",