-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Miroslav Bajtoš <mbajtoss@gmail.com>
- Loading branch information
1 parent
124c078
commit 4decf7b
Showing
10 changed files
with
331 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/rest/src/__tests__/unit/router/assign-router-spec.unit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright IBM Corp. 2019. All Rights Reserved. | ||
// Node module: @loopback/rest | ||
// This file is licensed under the MIT License. | ||
// License text available at https://opensource.org/licenses/MIT | ||
|
||
import {RouterSpec} from '../../../router'; | ||
|
||
describe('assignRouterSpec', () => { | ||
// tslint:disable:no-unused - will remove once implemented | ||
const target: RouterSpec = {paths: {}, components: {}, tags: []}; | ||
const additions: RouterSpec = {paths: {}, components: {}, tags: []}; | ||
|
||
it('duplicates the additions spec if the target spec is empty', async () => {}); | ||
|
||
it('does not assign components without schema', async () => {}); | ||
|
||
it('uses the route registered first', async () => {}); | ||
|
||
it('does not duplicate tags from the additional spec', async () => {}); | ||
}); |
14 changes: 14 additions & 0 deletions
14
packages/rest/src/__tests__/unit/router/rebase-openapi-spec.unit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright IBM Corp. 2019. All Rights Reserved. | ||
// Node module: @loopback/rest | ||
// This file is licensed under the MIT License. | ||
// License text available at https://opensource.org/licenses/MIT | ||
|
||
describe('rebaseOpenApiSpec', () => { | ||
it('does not modify the OpenApiSpec if it does not have paths', async () => {}); | ||
|
||
it('does not modify the OpenApiSpec if basePath is empty or `/`', async () => {}); | ||
|
||
it('rebases OpenApiSpec if there is a basePath', async () => {}); | ||
|
||
it('does not modify the original OpenApiSpec', async () => {}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.