Skip to content

Commit

Permalink
test: add test case(filter spec by tags)
Browse files Browse the repository at this point in the history
  • Loading branch information
rookie-luochao committed Jul 1, 2024
1 parent 1740013 commit 33b4c73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-roses-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'openapi-ts-request': patch
---

test: add test case(filter spec by tags)
6 changes: 6 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ const gen = async () => {
serversPath: './apis/display-enum-label',
});

await openAPI.generateService({
schemaPath: `${__dirname}/example-files/openapi.json`,
serversPath: './apis/filter-tags',
allowedTags: ['pet'],
});

// check 文件生成
const fileControllerStr = fs.readFileSync(
path.join(__dirname, 'apis/file/fileController.ts'),
Expand Down

0 comments on commit 33b4c73

Please sign in to comment.