@@ -66,6 +66,161 @@ export type Request = keyof Input;
6666"
6767`;
6868
69+ exports[`Integration > Should support HEAD method by default 0 1`] = `
70+ "type SomeOf<T > = T[keyof T];
71+
72+ /** get /v1/path */
73+ type GetV1PathInput = {
74+ some : string ;
75+ } ;
76+
77+ /** get /v1/path */
78+ type GetV1PathPositiveVariant1 = {
79+ status : " success" ;
80+ data : {};
81+ } ;
82+
83+ /** get /v1/path */
84+ interface GetV1PathPositiveResponseVariants {
85+ 200 : GetV1PathPositiveVariant1 ;
86+ }
87+
88+ /** get /v1/path */
89+ type GetV1PathNegativeVariant1 = {
90+ status : " error" ;
91+ error : {
92+ message: string ;
93+ };
94+ } ;
95+
96+ /** get /v1/path */
97+ interface GetV1PathNegativeResponseVariants {
98+ 400 : GetV1PathNegativeVariant1 ;
99+ }
100+
101+ /** head /v1/path */
102+ type HeadV1PathInput = {
103+ some : string ;
104+ } ;
105+
106+ /** head /v1/path */
107+ type HeadV1PathPositiveVariant1 = undefined;
108+
109+ /** head /v1/path */
110+ interface HeadV1PathPositiveResponseVariants {
111+ 200 : HeadV1PathPositiveVariant1 ;
112+ }
113+
114+ /** head /v1/path */
115+ type HeadV1PathNegativeVariant1 = undefined;
116+
117+ /** head /v1/path */
118+ interface HeadV1PathNegativeResponseVariants {
119+ 400 : HeadV1PathNegativeVariant1 ;
120+ }
121+
122+ export type Path = "/v1/path";
123+
124+ export type Method = "get" | "post" | "put" | "delete" | "patch" | "head";
125+
126+ export interface Input {
127+ " get /v1/path" : GetV1PathInput ;
128+ " head /v1/path" : HeadV1PathInput ;
129+ }
130+
131+ export interface PositiveResponse {
132+ " get /v1/path" : SomeOf <GetV1PathPositiveResponseVariants >;
133+ "head /v1/path": SomeOf<HeadV1PathPositiveResponseVariants >;
134+ }
135+
136+ export interface NegativeResponse {
137+ " get /v1/path" : SomeOf <GetV1PathNegativeResponseVariants >;
138+ "head /v1/path": SomeOf<HeadV1PathNegativeResponseVariants >;
139+ }
140+
141+ export interface EncodedResponse {
142+ " get /v1/path" : GetV1PathPositiveResponseVariants &
143+ GetV1PathNegativeResponseVariants ;
144+ " head /v1/path" : HeadV1PathPositiveResponseVariants &
145+ HeadV1PathNegativeResponseVariants ;
146+ }
147+
148+ export interface Response {
149+ " get /v1/path" :
150+ | PositiveResponse [" get /v1/path" ]
151+ | NegativeResponse [" get /v1/path" ];
152+ " head /v1/path" :
153+ | PositiveResponse [" head /v1/path" ]
154+ | NegativeResponse [" head /v1/path" ];
155+ }
156+
157+ export type Request = keyof Input;
158+ "
159+ `;
160+
161+ exports[`Integration > Should support HEAD method by default 1 1`] = `
162+ "type SomeOf<T > = T[keyof T];
163+
164+ /** get /v1/path */
165+ type GetV1PathInput = {
166+ some : string ;
167+ } ;
168+
169+ /** get /v1/path */
170+ type GetV1PathPositiveVariant1 = {
171+ status : " success" ;
172+ data : {};
173+ } ;
174+
175+ /** get /v1/path */
176+ interface GetV1PathPositiveResponseVariants {
177+ 200 : GetV1PathPositiveVariant1 ;
178+ }
179+
180+ /** get /v1/path */
181+ type GetV1PathNegativeVariant1 = {
182+ status : " error" ;
183+ error : {
184+ message: string ;
185+ };
186+ } ;
187+
188+ /** get /v1/path */
189+ interface GetV1PathNegativeResponseVariants {
190+ 400 : GetV1PathNegativeVariant1 ;
191+ }
192+
193+ export type Path = "/v1/path";
194+
195+ export type Method = "get" | "post" | "put" | "delete" | "patch" | "head";
196+
197+ export interface Input {
198+ " get /v1/path" : GetV1PathInput ;
199+ }
200+
201+ export interface PositiveResponse {
202+ " get /v1/path" : SomeOf <GetV1PathPositiveResponseVariants >;
203+ }
204+
205+ export interface NegativeResponse {
206+ " get /v1/path" : SomeOf <GetV1PathNegativeResponseVariants >;
207+ }
208+
209+ export interface EncodedResponse {
210+ " get /v1/path" : GetV1PathPositiveResponseVariants &
211+ GetV1PathNegativeResponseVariants ;
212+ }
213+
214+ export interface Response {
215+ " get /v1/path" :
216+ | PositiveResponse [" get /v1/path" ]
217+ | NegativeResponse [" get /v1/path" ];
218+ }
219+
220+ export type Request = keyof Input;
221+ "
222+ `;
223+
69224exports[`Integration > Should support multiple response schemas depending on status code 1`] = `
70225"type SomeOf<T > = T[keyof T];
71226
0 commit comments