Skip to content

Commit

Permalink
Added a test for duplicated ids.
Browse files Browse the repository at this point in the history
This was actually already fixed with a previous issue.

Closes #286
  • Loading branch information
Luis Fernando Planella Gonzalez committed Oct 9, 2023
1 parent d089b27 commit 2336699
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions test/all-operations.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,24 @@
"204": {}
}
}
},
"/duplicated1": {
"get": {
"operationId": "duplicated",
"summary": "Test a duplicated operationId",
"responses": {
"200": {}
}
}
},
"/duplicated2": {
"get": {
"operationId": "duplicated",
"summary": "Test a duplicated operationId",
"responses": {
"200": {}
}
}
}
},
"components": {
Expand Down
2 changes: 1 addition & 1 deletion test/all-operations.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe('Generation tests using all-operations.json', () => {
const noTag = gen.services.get('noTag');
expect(noTag).toBeDefined();
if (!noTag) return;
expect(noTag.operations.length).toBe(5);
expect(noTag.operations.length).toBe(7);

const ts = gen.templates.apply('service', noTag);
const parser = new TypescriptParser();
Expand Down

0 comments on commit 2336699

Please sign in to comment.