@@ -6,6 +6,7 @@ const OPENAPI_PATH = "schemas/sparsekernel.openapi.yaml";
66const DAEMON_PATH = "crates/sparsekernel-cli/src/lib.rs" ;
77const CLIENT_PATH = "packages/sparsekernel-client/src/index.ts" ;
88const CLIENT_SCHEMA_MAPPINGS = [
9+ mapping ( "SparseKernelBooleanResult" , "BooleanResult" ) ,
910 mapping ( "SparseKernelResourceBudgets" , "RuntimeResourceBudgets" ) ,
1011 mapping ( "SparseKernelResourceBudgetUpdateInput" , "RuntimeResourceBudgetUpdateInput" ) ,
1112 mapping ( "SparseKernelNetworkPolicy" , "NetworkPolicy" ) ,
@@ -238,6 +239,17 @@ export function checkSparseKernelOpenApi({ openapiText, daemonSource, clientSour
238239 errors . push ( formatList ( "Unresolved SparseKernel OpenAPI schema refs" , unresolvedSchemaRefs ) ) ;
239240 }
240241
242+ const mappedSchemaNames = new Set ( CLIENT_SCHEMA_MAPPINGS . map ( ( item ) => item . schemaName ) ) ;
243+ const referencedSchemaNames = [ ...collectSchemaRefs ( openapi ) ]
244+ . filter ( ( ref ) => ref . startsWith ( "#/components/schemas/" ) )
245+ . map ( ( ref ) => ref . slice ( "#/components/schemas/" . length ) ) ;
246+ pushSetDiff (
247+ errors ,
248+ "SparseKernel OpenAPI referenced schemas missing client parity mapping" ,
249+ new Set ( referencedSchemaNames ) ,
250+ mappedSchemaNames ,
251+ ) ;
252+
241253 const inlineRequestBodies = collectOpenApiInlineRequestBodyRoutes ( paths ) ;
242254 if ( inlineRequestBodies . size > 0 ) {
243255 errors . push (
@@ -247,7 +259,6 @@ export function checkSparseKernelOpenApi({ openapiText, daemonSource, clientSour
247259 ) ,
248260 ) ;
249261 }
250- const mappedSchemaNames = new Set ( CLIENT_SCHEMA_MAPPINGS . map ( ( item ) => item . schemaName ) ) ;
251262 pushSetDiff (
252263 errors ,
253264 "SparseKernel OpenAPI request body schemas missing client parity mapping" ,
0 commit comments