Skip to content

Commit fdb2209

Browse files
committed
refactor: update query option naming convention in React Query generator
This commit includes: - Modified the naming convention for generated query options to remove unnecessary underscores. - Cleaned up the package.json file formatting for better readability.
1 parent 304566d commit fdb2209

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
"license": "MIT",
55
"description": "Generate Axios API clients and React Query options from OpenAPI specifications",
66
"exports": "./dist/index.js",
7-
"files": [
8-
"src",
9-
"dist"
10-
],
7+
"files": ["src", "dist"],
118
"author": {
129
"name": "Oliver Winter",
1310
"email": "[email protected]"

src/generator/reactQueryGenerator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function generateQueryOptions(operation: OperationInfo, spec: OpenAPIV3.Document
3535
: []),
3636
];
3737

38-
const namedQueryOptions = camelCase(`get_${operationId}_Query_Options`);
38+
const namedQueryOptions = `get${operationId}QueryOptions`;
3939
const namedQuery = camelCase(`${method}_${operationId}`);
4040

4141
return `

0 commit comments

Comments
 (0)