Skip to content

Commit

Permalink
chore: added plain tests for each mode (orval-labs#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
soartec-lab authored Feb 9, 2024
1 parent 288f488 commit cb597a6
Show file tree
Hide file tree
Showing 6 changed files with 204 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/configs/angular.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,36 @@ export default defineConfig({
},
},
},
split: {
output: {
target: '../generated/angular/split/endpoints.ts',
schemas: '../generated/angular/split/model',
client: 'angular',
mode: 'split',
mock: true,
},
input: {
target: '../specifications/petstore.yaml',
override: {
transformer: '../transformers/add-version.js',
},
},
},
tags: {
output: {
target: '../generated/angular/tags/endpoints.ts',
schemas: '../generated/angular/tags/model',
client: 'angular',
mode: 'tags',
mock: true,
},
input: {
target: '../specifications/petstore.yaml',
override: {
transformer: '../transformers/add-version.js',
},
},
},
customClient: {
output: {
target: '../generated/angular/custom-client/endpoints.ts',
Expand Down
30 changes: 30 additions & 0 deletions tests/configs/axios.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,36 @@ export default defineConfig({
},
},
},
petstoreSplit: {
output: {
target: '../generated/axios/split/endpoints.ts',
schemas: '../generated/axios/split/model',
mock: true,
mode: 'split',
client: 'axios',
},
input: {
target: '../specifications/petstore.yaml',
override: {
transformer,
},
},
},
petstoreTags: {
output: {
target: '../generated/axios/tags/endpoints.ts',
schemas: '../generated/axios/tags/model',
mock: true,
mode: 'tags',
client: 'axios',
},
input: {
target: '../specifications/petstore.yaml',
override: {
transformer,
},
},
},
namedParameters: {
output: {
target: '../generated/axios/named-parameters/endpoints.ts',
Expand Down
36 changes: 36 additions & 0 deletions tests/configs/react-query.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,42 @@ export default defineConfig({
target: '../specifications/petstore.yaml',
},
},
petstoreTagsSplit: {
output: {
target: '../generated/react-query/petstore-tags-split/endpoints.ts',
schemas: '../generated/react-query/petstore-tags-split/model',
mock: true,
mode: 'tags-split',
client: 'react-query',
},
input: {
target: '../specifications/petstore.yaml',
},
},
petstoreSplit: {
output: {
target: '../generated/react-query/split/endpoints.ts',
schemas: '../generated/react-query/split/model',
mock: true,
mode: 'split',
client: 'react-query',
},
input: {
target: '../specifications/petstore.yaml',
},
},
petstoreTags: {
output: {
target: '../generated/react-query/tags/endpoints.ts',
schemas: '../generated/react-query/tags/model',
mock: true,
mode: 'tags',
client: 'react-query',
},
input: {
target: '../specifications/petstore.yaml',
},
},
mutator: {
output: {
target: '../generated/react-query/mutator/endpoints.ts',
Expand Down
36 changes: 36 additions & 0 deletions tests/configs/svelte-query.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,42 @@ export default defineConfig({
},
},
},
petstoreTagsSplit: {
output: {
target: '../generated/svelte-query/petstore-tags-split/endpoints.ts',
schemas: '../generated/svelte-query/petstore-tags-split/model',
mock: true,
mode: 'tags-split',
client: 'svelte-query',
},
input: {
target: '../specifications/petstore.yaml',
},
},
petstoreSplit: {
output: {
target: '../generated/svelte-query/split/endpoints.ts',
schemas: '../generated/svelte-query/split/model',
mock: true,
mode: 'split',
client: 'svelte-query',
},
input: {
target: '../specifications/petstore.yaml',
},
},
petstoreTags: {
output: {
target: '../generated/svelte-query/tags/endpoints.ts',
schemas: '../generated/svelte-query/tags/model',
mock: true,
mode: 'tags',
client: 'svelte-query',
},
input: {
target: '../specifications/petstore.yaml',
},
},
mutator: {
output: {
target: '../generated/svelte-query/mutator/endpoints.ts',
Expand Down
36 changes: 36 additions & 0 deletions tests/configs/swr.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,42 @@ export default defineConfig({
},
},
},
petstoreTagsSplit: {
output: {
target: '../generated/swr/petstore-tags-split/endpoints.ts',
schemas: '../generated/swr/petstore-tags-split/model',
mock: true,
mode: 'tags-split',
client: 'swr',
},
input: {
target: '../specifications/petstore.yaml',
},
},
petstoreSplit: {
output: {
target: '../generated/swr/split/endpoints.ts',
schemas: '../generated/swr/split/model',
mock: true,
mode: 'split',
client: 'swr',
},
input: {
target: '../specifications/petstore.yaml',
},
},
petstoreTags: {
output: {
target: '../generated/swr/tags/endpoints.ts',
schemas: '../generated/swr/tags/model',
mock: true,
mode: 'tags',
client: 'swr',
},
input: {
target: '../specifications/petstore.yaml',
},
},
mutator: {
output: {
target: '../generated/swr/mutator/endpoints.ts',
Expand Down
36 changes: 36 additions & 0 deletions tests/configs/vue-query.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,42 @@ export default defineConfig({
},
},
},
petstoreTagsSplit: {
output: {
target: '../generated/vue-query/petstore-tags-split/endpoints.ts',
schemas: '../generated/vue-query/petstore-tags-split/model',
mock: true,
mode: 'tags-split',
client: 'vue-query',
},
input: {
target: '../specifications/petstore.yaml',
},
},
petstoreSplit: {
output: {
target: '../generated/vue-query/split/endpoints.ts',
schemas: '../generated/vue-query/split/model',
mock: true,
mode: 'split',
client: 'vue-query',
},
input: {
target: '../specifications/petstore.yaml',
},
},
petstoreTags: {
output: {
target: '../generated/vue-query/tags/endpoints.ts',
schemas: '../generated/vue-query/tags/model',
mock: true,
mode: 'tags',
client: 'vue-query',
},
input: {
target: '../specifications/petstore.yaml',
},
},
mutator: {
output: {
target: '../generated/vue-query/mutator/endpoints.ts',
Expand Down

0 comments on commit cb597a6

Please sign in to comment.