Skip to content

Commit

Permalink
Merge pull request #102 from nicolas-chaulet/refactor/types-generic
Browse files Browse the repository at this point in the history
refactor(types): move generic types to types folder
  • Loading branch information
mrlubos authored Mar 20, 2024
2 parents df99278 + 4445b79 commit 8382138
Show file tree
Hide file tree
Showing 21 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/openApi/v2/interfaces/OpenApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiExternalDocs } from './OpenApiExternalDocs';
import type { OpenApiInfo } from './OpenApiInfo';
import type { OpenApiParameter } from './OpenApiParameter';
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v2/interfaces/OpenApiHeader.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiItems } from './OpenApiItems';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v2/interfaces/OpenApiResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiExample } from './OpenApiExample';
import type { OpenApiHeader } from './OpenApiHeader';
import type { OpenApiReference } from './OpenApiReference';
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v2/interfaces/OpenApiSchema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { WithEnumExtension } from '../../../types/client';
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { WithNullableExtension } from './Extensions/WithNullableExtension';
import type { OpenApiExternalDocs } from './OpenApiExternalDocs';
import type { OpenApiReference } from './OpenApiReference';
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v2/interfaces/OpenApiSecurityScheme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';

/**
* https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#securitySchemeObject
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiComponents.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiCallback } from './OpenApiCallback';
import type { OpenApiExample } from './OpenApiExample';
import type { OpenApiHeader } from './OpenApiHeader';
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiDiscriminator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';

/**
* https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#discriminatorObject
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiEncoding.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiHeader } from './OpenApiHeader';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiHeader.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiExample } from './OpenApiExample';
import type { OpenApiReference } from './OpenApiReference';
import type { OpenApiSchema } from './OpenApiSchema';
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiLink.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiReference } from './OpenApiReference';
import type { OpenApiServer } from './OpenApiServer';

Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiMediaType.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiEncoding } from './OpenApiEncoding';
import type { OpenApiExample } from './OpenApiExample';
import type { OpenApiReference } from './OpenApiReference';
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiOAuthFlow.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';

/**
* https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#oauthFlowObject
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiOperation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiCallback } from './OpenApiCallback';
import type { OpenApiExternalDocs } from './OpenApiExternalDocs';
import type { OpenApiParameter } from './OpenApiParameter';
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiParameter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiExample } from './OpenApiExample';
import type { OpenApiReference } from './OpenApiReference';
import type { OpenApiSchema } from './OpenApiSchema';
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiRequestBody.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiMediaType } from './OpenApiMediaType';
import type { OpenApiReference } from './OpenApiReference';

Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiHeader } from './OpenApiHeader';
import type { OpenApiLink } from './OpenApiLink';
import type { OpenApiMediaType } from './OpenApiMediaType';
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiSchema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { WithEnumExtension } from '../../../types/client';
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiDiscriminator } from './OpenApiDiscriminator';
import type { OpenApiExternalDocs } from './OpenApiExternalDocs';
import type { OpenApiReference } from './OpenApiReference';
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/interfaces/OpenApiServer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApiServerVariable } from './OpenApiServerVariable';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/openApi/v3/parser/getContent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Dictionary } from '../../../utils/types';
import type { Dictionary } from '../../../types/generic';
import type { OpenApi } from '../interfaces/OpenApi';
import type { OpenApiMediaType } from '../interfaces/OpenApiMediaType';
import type { OpenApiSchema } from '../interfaces/OpenApiSchema';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/utils/discriminator.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { OpenApi } from '../openApi/v3/interfaces/OpenApi';
import type { OpenApiDiscriminator } from '../openApi/v3/interfaces/OpenApiDiscriminator';
import type { Model } from '../types/client';
import type { Dictionary } from '../types/generic';
import { stripNamespace } from './stripNamespace';
import type { Dictionary } from './types';

const inverseDictionary = (map: Dictionary<string>): Dictionary<string> => {
const m2: Dictionary<string> = {};
Expand Down

0 comments on commit 8382138

Please sign in to comment.