Skip to content

Commit 9fc3a9d

Browse files
committedNov 29, 2023
feat: allParamsOptional generated tests
1 parent 2077ded commit 9fc3a9d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
 

‎samples/vue-query/orval.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default defineConfig({
4747
useInfiniteQueryParam: 'limit',
4848
},
4949
},
50-
allParamsOptional: true, // TODO: this this not a default, maybe consider creating a separate sample to test default behaviour still works; Definitely add a generated test (same as named-params for other clients)
50+
allParamsOptional: true, // TODO: this this not a default, maybe consider creating a separate sample to test default behaviour still works; There is a generated test tho (same as named-params for other clients)
5151
},
5252
input: {
5353
target: './petstore.yaml',

‎tests/configs/vue-query.config.ts

+12
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ export default defineConfig({
4747
},
4848
},
4949
},
50+
allParamsOptional: {
51+
output: {
52+
target: '../generated/vue-query/all-params-optional/endpoints.ts',
53+
schemas: '../generated/vue-query/all-params-optional/model',
54+
client: 'vue-query',
55+
mock: true,
56+
allParamsOptional: true,
57+
},
58+
input: {
59+
target: '../specifications/petstore.yaml',
60+
},
61+
},
5062
// Unsupported for now, see for context: https://github.com/anymaniax/orval/pull/931#issuecomment-1752355686
5163
// namedParameters: {
5264
// output: {

0 commit comments

Comments
 (0)
Please sign in to comment.