@@ -94,6 +94,18 @@ export type RestApiRouteCategory = z.infer<typeof RestApiRouteCategory>;
9494// Route Registration Schema
9595// ==========================================
9696
97+ /**
98+ * Handler Implementation Status
99+ * Shared enum for tracking whether an endpoint has a real handler.
100+ * Used by both `RestApiEndpointSchema` and `RouteCoverageEntrySchema`.
101+ *
102+ * - `implemented` – A real handler is coded and registered.
103+ * - `stub` – A placeholder handler exists that returns 501 Not Implemented.
104+ * - `planned` – Declared in the protocol spec but not yet implemented.
105+ */
106+ export const HandlerStatusSchema = z . enum ( [ 'implemented' , 'stub' , 'planned' ] ) ;
107+ export type HandlerStatus = z . infer < typeof HandlerStatusSchema > ;
108+
97109/**
98110 * REST API Endpoint Schema
99111 * Defines a single REST API endpoint with its metadata
@@ -169,7 +181,7 @@ export const RestApiEndpointSchema = z.object({
169181 * - `planned` – Declared in the protocol spec but not yet implemented.
170182 * @default 'implemented'
171183 */
172- handlerStatus : z . enum ( [ 'implemented' , 'stub' , 'planned' ] ) . optional ( )
184+ handlerStatus : HandlerStatusSchema . optional ( )
173185 . describe ( 'Handler implementation status: implemented (default if omitted), stub, or planned' ) ,
174186} ) ;
175187
@@ -1685,11 +1697,11 @@ export const RouteCoverageEntrySchema = z.object({
16851697 /** Full URL path of the endpoint */
16861698 path : z . string ( ) . describe ( 'Full URL path (e.g. /api/v1/analytics/query)' ) ,
16871699 /** HTTP method */
1688- method : z . string ( ) . describe ( 'HTTP method (GET, POST, etc.)' ) ,
1700+ method : HttpMethod . describe ( 'HTTP method (GET, POST, etc.)' ) ,
16891701 /** Route category */
16901702 category : RestApiRouteCategory . describe ( 'Route category' ) ,
16911703 /** Handler implementation status */
1692- handlerStatus : z . enum ( [ 'implemented' , 'stub' , 'planned' ] ) . describe ( 'Handler status' ) ,
1704+ handlerStatus : HandlerStatusSchema . describe ( 'Handler status' ) ,
16931705 /** Target service */
16941706 service : z . string ( ) . describe ( 'Target service name' ) ,
16951707 /** Whether the handler was successfully called during health check */
0 commit comments