Skip to content

Commit

Permalink
chore: rename load method, update e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jun 6, 2023
1 parent 8d4db08 commit f02bfda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion e2e/validate-schema.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('Validate OpenAPI schema', () => {
});

it('should produce a valid OpenAPI 3.0 schema', async () => {
const document = SwaggerModule.createDocument(app, options, {
SwaggerModule.loadPluginMetadata({
metadata: {
'@nestjs/swagger': {
models: [
Expand Down Expand Up @@ -91,6 +91,7 @@ describe('Validate OpenAPI schema', () => {
}
}
});
const document = SwaggerModule.createDocument(app, options);

const doc = JSON.stringify(document, null, 2);
writeFileSync(join(__dirname, 'api-spec.json'), doc);
Expand Down
2 changes: 1 addition & 1 deletion lib/swagger-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class SwaggerModule {
};
}

public static async load(metadata: Record<string, any>) {
public static async loadPluginMetadata(metadata: Record<string, any>) {
return this.metadataLoader.load(metadata);
}

Expand Down

0 comments on commit f02bfda

Please sign in to comment.