fix: remove destructive migrate rewrite, add replay source attribution and warning drain
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Route rewriter for APOPHIS migrate command.
|
||||
*
|
||||
* Responsibilities:
|
||||
* - Rewrite route schema annotations (e.g., x-validate-runtime → runtime)
|
||||
* - Rewrite route schema annotations
|
||||
* - Preserve schema structure and formatting
|
||||
* - Handle annotations in Fastify route definitions
|
||||
* - Detect ambiguous annotations and require manual choice
|
||||
@@ -40,10 +40,12 @@ export interface AmbiguousRoutePattern {
|
||||
|
||||
/**
|
||||
* Mapping of deprecated route schema annotations to their modern equivalents.
|
||||
* x-validate-runtime is intentionally NOT here — it is the current, active annotation
|
||||
* used by contract.ts and hook-validator.ts for per-route runtime validation opt-out.
|
||||
* Rewriting it to 'runtime' would break it, since 'runtime' is a top-level plugin
|
||||
* config option, not a valid route schema annotation.
|
||||
*/
|
||||
export const LEGACY_ROUTE_ANNOTATIONS: Record<string, string> = {
|
||||
'x-validate-runtime': 'runtime',
|
||||
};
|
||||
export const LEGACY_ROUTE_ANNOTATIONS: Record<string, string> = {};
|
||||
|
||||
/**
|
||||
* Ambiguous route patterns that require manual choice.
|
||||
|
||||
Reference in New Issue
Block a user