Skip to content

Commit d32424a

Browse files
feat: option to include @openapi.ignored models in the spec file
1 parent 17ad113 commit d32424a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/plugins/openapi/src/generator-base.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ export abstract class OpenAPIGeneratorBase {
1515
abstract generate(): PluginResult;
1616

1717
protected get includedModels() {
18-
return getDataModels(this.model).filter((d) => !hasAttribute(d, '@@openapi.ignore'));
18+
const includeApiIgnored = this.getOption<boolean>('includeApiIgnored', false);
19+
if (includeApiIgnored) {
20+
return getDataModels(this.model);
21+
} else {
22+
return getDataModels(this.model).filter(
23+
(d) => !hasAttribute(d, '@@openapi.ignore')
24+
);
25+
}
1926
}
2027

2128
protected wrapArray(

0 commit comments

Comments
 (0)