diff --git a/e2e/integration/menu.e2e.ts b/e2e/integration/menu.e2e.ts index f21aebc6..26cb93a7 100644 --- a/e2e/integration/menu.e2e.ts +++ b/e2e/integration/menu.e2e.ts @@ -30,7 +30,7 @@ describe('Menu', () => { cy.location('hash').should('equal', '#tag/pet'); cy.contains('[role=menuitem]', 'Find pet by ID').click({ force: true }); - cy.location('hash').should('equal', '#operation/getPetById'); + cy.location('hash').should('equal', '#tag/pet/operation/getPetById'); }); it('should deactivate tag when other is activated', () => { diff --git a/e2e/integration/misc.e2e.ts b/e2e/integration/misc.e2e.ts index f90b4378..f265c881 100644 --- a/e2e/integration/misc.e2e.ts +++ b/e2e/integration/misc.e2e.ts @@ -21,12 +21,12 @@ describe('Servers', () => { initReDoc(win, spec, {}); // TODO add cy-data attributes - cy.get('[data-section-id="operation/addPet"]').should( + cy.get('[data-section-id="tag/pet/operation/addPet"]').should( 'contain', 'http://petstore.swagger.io/v2/pet', ); - cy.get('[data-section-id="operation/addPet"]').should( + cy.get('[data-section-id="tag/pet/operation/addPet"]').should( 'contain', 'http://petstore.swagger.io/sandbox/pet', ); @@ -40,7 +40,7 @@ describe('Servers', () => { initReDoc(win, spec, {}); // TODO add cy-data attributes - cy.get('[data-section-id="operation/addPet"]').should( + cy.get('[data-section-id="tag/pet/operation/addPet"]').should( 'contain', 'http://localhost:' + win.location.port + '/pet', ); @@ -55,7 +55,7 @@ describe('Servers', () => { initReDoc(win, spec, {}); // TODO add cy-data attributes - cy.get('[data-section-id="operation/addPet"]').should( + cy.get('[data-section-id="tag/pet/operation/addPet"]').should( 'contain', 'http://localhost:' + win.location.port + '/pet', ); diff --git a/src/services/models/Operation.ts b/src/services/models/Operation.ts index fc2d41ce..69b1d0b3 100644 --- a/src/services/models/Operation.ts +++ b/src/services/models/Operation.ts @@ -108,7 +108,7 @@ export class OperationModel implements IMenuItem { } else { this.id = operationSpec.operationId !== undefined - ? 'operation/' + operationSpec.operationId + ? (parent ? parent.id + '/' : '') + 'operation/' + operationSpec.operationId : parent !== undefined ? parent.id + this.pointer : this.pointer;