Skip to content

Commit 2336699

Browse files
author
Luis Fernando Planella Gonzalez
committed
Added a test for duplicated ids.
This was actually already fixed with a previous issue. Closes #286
1 parent d089b27 commit 2336699

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

test/all-operations.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,24 @@
398398
"204": {}
399399
}
400400
}
401+
},
402+
"/duplicated1": {
403+
"get": {
404+
"operationId": "duplicated",
405+
"summary": "Test a duplicated operationId",
406+
"responses": {
407+
"200": {}
408+
}
409+
}
410+
},
411+
"/duplicated2": {
412+
"get": {
413+
"operationId": "duplicated",
414+
"summary": "Test a duplicated operationId",
415+
"responses": {
416+
"200": {}
417+
}
418+
}
401419
}
402420
},
403421
"components": {

test/all-operations.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ describe('Generation tests using all-operations.json', () => {
115115
const noTag = gen.services.get('noTag');
116116
expect(noTag).toBeDefined();
117117
if (!noTag) return;
118-
expect(noTag.operations.length).toBe(5);
118+
expect(noTag.operations.length).toBe(7);
119119

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

0 commit comments

Comments
 (0)