Skip to content

Commit 4a9e2f3

Browse files
authored
JSDoc stuff (#5032)
1 parent 79dba51 commit 4a9e2f3

File tree

1 file changed

+15
-16
lines changed
  • packages/rtk-query-codegen-openapi/src

1 file changed

+15
-16
lines changed

packages/rtk-query-codegen-openapi/src/types.ts

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,77 +38,76 @@ export interface CommonOptions {
3838
*/
3939
schemaFile: string;
4040
/**
41-
* defaults to "api"
41+
* @default "api"
4242
*/
4343
apiImport?: string;
4444
/**
45-
* defaults to "enhancedApi"
45+
* @default "enhancedApi"
4646
*/
4747
exportName?: string;
4848
/**
49-
* defaults to "ApiArg"
49+
* @default "ApiArg"
5050
*/
5151
argSuffix?: string;
5252
/**
53-
* defaults to "ApiResponse"
53+
* @default "ApiResponse"
5454
*/
5555
responseSuffix?: string;
5656
/**
57-
* defaults to empty
57+
* @default ""
5858
*/
5959
operationNameSuffix?: string;
6060
/**
61-
* defaults to `false`
6261
* `true` will generate hooks for queries and mutations, but no lazyQueries
62+
* @default false
6363
*/
6464
hooks?: boolean | { queries: boolean; lazyQueries: boolean; mutations: boolean };
6565
/**
66-
* defaults to false
6766
* `true` will generate a union type for `undefined` properties like: `{ id?: string | undefined }` instead of `{ id?: string }`
67+
* @default false
6868
*/
6969
unionUndefined?: boolean;
7070
/**
71-
* defaults to false
7271
* `true` will result in all generated endpoints having `providesTags`/`invalidatesTags` declarations for the `tags` of their respective operation definition
72+
* @default false
7373
* @see https://redux-toolkit.js.org/rtk-query/usage/code-generation for more information
7474
*/
7575
tag?: boolean;
7676
/**
77-
* defaults to false
7877
* `true` will add `encodeURIComponent` to the generated path parameters
78+
* @default false
7979
*/
8080
encodePathParams?: boolean;
8181
/**
82-
* defaults to false
8382
* `true` will add `encodeURIComponent` to the generated query parameters
83+
* @default false
8484
*/
8585
encodeQueryParams?: boolean;
8686
/**
87-
* defaults to false
8887
* `true` will "flatten" the arg so that you can do things like `useGetEntityById(1)` instead of `useGetEntityById({ entityId: 1 })`
88+
* @default false
8989
*/
9090
flattenArg?: boolean;
9191
/**
92-
* default to false
9392
* If set to `true`, the default response type will be included in the generated code for all endpoints.
93+
* @default false
9494
* @see https://swagger.io/docs/specification/describing-responses/#default
9595
*/
9696
includeDefault?: boolean;
9797
/**
98-
* default to false
9998
* `true` will not generate separate types for read-only and write-only properties.
99+
* @default false
100100
*/
101101
mergeReadWriteOnly?: boolean;
102102
/**
103-
*
104103
* HTTPResolverOptions object that is passed to the SwaggerParser bundle function.
105104
*/
106105
httpResolverOptions?: SwaggerParser.HTTPResolverOptions;
107106

108107
/**
109-
* defaults to undefined
110108
* If present the given file will be used as prettier config when formatting the generated code. If undefined the default prettier config
111109
* resolution mechanism will be used.
110+
* @default undefined
112111
*/
113112
prettierConfigFile?: string;
114113
}
@@ -128,8 +127,8 @@ export interface OutputFileOptions extends Partial<CommonOptions> {
128127
filterEndpoints?: EndpointMatcher;
129128
endpointOverrides?: EndpointOverrides[];
130129
/**
131-
* defaults to false
132130
* If passed as true it will generate TS enums instead of union of strings
131+
* @default false
133132
*/
134133
useEnumType?: boolean;
135134
}

0 commit comments

Comments
 (0)