Skip to content

Commit bd9426c

Browse files
author
carmine
committed
removes example and examples from all schemas, not just object types
1 parent 8e37442 commit bd9426c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/middlewares/parsers/schema.preprocessor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,12 @@ export class SchemaPreprocessor {
463463
schema: OpenAPIV3.SchemaObject,
464464
opts,
465465
) {
466-
if (schema.type !== 'object') return;
466+
// Remove example and examples from all schema types, not just objects
467467
if (schema?.example) {
468-
delete schema.example
468+
delete schema.example;
469469
}
470470
if (schema?.examples) {
471-
delete schema.examples
471+
delete schema.examples;
472472
}
473473
}
474474

0 commit comments

Comments
 (0)