|
4 | 4 | OpenAPIObject,
|
5 | 5 | OperationObject,
|
6 | 6 | ParameterObject,
|
| 7 | + ReferenceObject, |
| 8 | + RequestBodyObject, |
| 9 | + ResponsesObject, |
7 | 10 | SchemaObject,
|
8 | 11 | } from 'openapi3-ts';
|
9 | 12 | import swagger2openapi from 'swagger2openapi';
|
@@ -175,7 +178,8 @@ export type OutputClient =
|
175 | 178 | | 'react-query'
|
176 | 179 | | 'svelte-query'
|
177 | 180 | | 'vue-query'
|
178 |
| - | 'swr'; |
| 181 | + | 'swr' |
| 182 | + | 'zod'; |
179 | 183 |
|
180 | 184 | export const OutputClient = {
|
181 | 185 | ANGULAR: 'angular' as OutputClient,
|
@@ -591,9 +595,12 @@ export type GetterResponse = {
|
591 | 595 | };
|
592 | 596 | contentTypes: string[];
|
593 | 597 | schemas: GeneratorSchema[];
|
| 598 | + |
| 599 | + originalSchema?: ResponsesObject; |
594 | 600 | };
|
595 | 601 |
|
596 | 602 | export type GetterBody = {
|
| 603 | + originalSchema: ReferenceObject | RequestBodyObject; |
597 | 604 | imports: GeneratorImport[];
|
598 | 605 | definition: string;
|
599 | 606 | implementation: string;
|
@@ -623,6 +630,7 @@ export type GetterQueryParam = {
|
623 | 630 | schema: GeneratorSchema;
|
624 | 631 | deps: GeneratorSchema[];
|
625 | 632 | isOptional: boolean;
|
| 633 | + originalSchema?: SchemaObject; |
626 | 634 | };
|
627 | 635 |
|
628 | 636 | export type GetterPropType = 'param' | 'body' | 'queryParam' | 'header';
|
@@ -668,22 +676,26 @@ export const SchemaType = {
|
668 | 676 | unknown: 'unknown',
|
669 | 677 | };
|
670 | 678 |
|
671 |
| -export type ResolverValue = { |
| 679 | +export type ScalarValue = { |
672 | 680 | value: string;
|
673 | 681 | isEnum: boolean;
|
674 | 682 | type: SchemaType;
|
675 | 683 | imports: GeneratorImport[];
|
676 | 684 | schemas: GeneratorSchema[];
|
677 |
| - originalSchema?: SchemaObject; |
678 | 685 | isRef: boolean;
|
679 | 686 | };
|
680 | 687 |
|
681 |
| -export type ResReqTypesValue = ResolverValue & { |
| 688 | +export type ResolverValue = ScalarValue & { |
| 689 | + originalSchema: SchemaObject; |
| 690 | +}; |
| 691 | + |
| 692 | +export type ResReqTypesValue = ScalarValue & { |
682 | 693 | formData?: string;
|
683 | 694 | formUrlEncoded?: string;
|
684 | 695 | isRef?: boolean;
|
685 | 696 | key: string;
|
686 | 697 | contentType: string;
|
| 698 | + originalSchema?: SchemaObject; |
687 | 699 | };
|
688 | 700 |
|
689 | 701 | export type WriteSpecsBuilder = {
|
|
1 commit comments
vercel[bot] commentedon Mar 27, 2023
Successfully deployed to the following URLs:
orval – ./
orval-git-master-anymaniax.vercel.app
orval.vercel.app
orval.dev
www.orval.dev
orval-anymaniax.vercel.app