Skip to content

Commit

Permalink
refactor: fix deps problems
Browse files Browse the repository at this point in the history
  • Loading branch information
gogoyqj committed Apr 6, 2023
1 parent db29abc commit 7bb0f9b
Show file tree
Hide file tree
Showing 3 changed files with 9,002 additions and 8,941 deletions.
11 changes: 5 additions & 6 deletions __tests__/guard.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/* eslint-disable @typescript-eslint/camelcase */
import { operationIdGuard, strictModeGuard } from 'src/guard';
import { SwaggerJson, GuardConfig } from 'src/consts';

const url = '/api/v1/persons';
const url1 = '/api/v1/interviewer/persons';
const url2 = '/api/v1/interviewer/{user-name}';
function getSwagger(): SwaggerJson {
function getSwagger(): Autos.SwaggerJson {
return {
basePath: '/',
paths: {
Expand Down Expand Up @@ -49,13 +48,13 @@ function getSwagger(): SwaggerJson {
};
}

const optionIdMethodUrlIncrementMap: GuardConfig = {
const optionIdMethodUrlIncrementMap: Autos.GuardConfig = {
methodUrl2OperationIdMap: {
'get /api/v1/persons': 'personsUsingGET',
'get /api/v1/interviewer/persons': 'personsUsingGET_1'
}
};
const optionIdMethodUrlSafeModeDuplicateMap: GuardConfig = {
const optionIdMethodUrlSafeModeDuplicateMap: Autos.GuardConfig = {
mode: 'safe',
methodUrl2OperationIdMap: {
'get /api/v1/persons': 'personsUsingGET',
Expand All @@ -64,15 +63,15 @@ const optionIdMethodUrlSafeModeDuplicateMap: GuardConfig = {
}
};

const optionIdMethodUrlMap: GuardConfig = {
const optionIdMethodUrlMap: Autos.GuardConfig = {
methodUrl2OperationIdMap: {
'get /api/v1/persons': 'personsUsingGET',
'get /api/v1/interviewer/persons': 'personsUsingGET_1',
'get /api/v1/interviewer/{user-name}': 'personsUsingGET_2'
}
};

const optionIdMethodUrlMap2: GuardConfig = {
const optionIdMethodUrlMap2: Autos.GuardConfig = {
methodUrl2OperationIdMap: {
'get /api/v1/interviewer/persons': 'personsUsingGET',
'get /api/v1/persons': 'personsUsingGET_1',
Expand Down
3 changes: 1 addition & 2 deletions __tests__/utils/pathsFilter.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/no-object-literal-type-assertion */
/* eslint-disable @typescript-eslint/no-unused-vars */
import pathsFilter from 'src/utils/pathsFilter';
import { SwaggerJson } from 'src/init';

describe('utils/pathsFilter', () => {
const getSwagger = () =>
Expand Down Expand Up @@ -83,7 +82,7 @@ describe('utils/pathsFilter', () => {
ID3: {},
EID1_D1: {}
}
} as SwaggerJson);
} as Autos.SwaggerJson);
it('pathsFilter ok', () => {
const swagger = pathsFilter(getSwagger(), {
exclude: [/\/exclude\//]
Expand Down
Loading

0 comments on commit 7bb0f9b

Please sign in to comment.