feat: add example validation and mismatch reporting for OpenAPI schemas
This commit is contained in:
@@ -28,6 +28,19 @@ export interface TagDetail {
|
||||
endpoints: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* A single example/type mismatch detected during mock generation.
|
||||
*/
|
||||
export interface ExampleMismatchEntry {
|
||||
schemaName: string;
|
||||
propertyName: string;
|
||||
declaredType: string;
|
||||
exampleValue: unknown;
|
||||
exampleJsType: string;
|
||||
action: 'coerced' | 'ignored';
|
||||
coercedValue?: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Final generation report persisted as `generation-report.json`.
|
||||
*/
|
||||
@@ -38,6 +51,10 @@ export interface GenerationReport {
|
||||
tagDetails: TagDetail[];
|
||||
outputDirectory: string;
|
||||
linting: LintResult;
|
||||
warnings: {
|
||||
exampleMismatches: ExampleMismatchEntry[];
|
||||
total: number;
|
||||
};
|
||||
structure: {
|
||||
dtos: number;
|
||||
repositories: number;
|
||||
|
||||
Reference in New Issue
Block a user