Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit c9a83e7

Browse files
committed
Update tests after rebase
1 parent 18b786e commit c9a83e7

File tree

7 files changed

+2981
-3
lines changed

7 files changed

+2981
-3
lines changed

src/templates/api.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export namespace {{moduleName}} {
5757
{{/comments}}
5858
*/
5959
export namespace {{pascalName}} {
60-
export type RequestQuery = {{#queryType}}{{.}}{{/queryType}};
61-
export type RequestBody = {{#bodyType}}{{.}}{{/bodyType}};
60+
export type RequestQuery = {{queryType}};
61+
export type RequestBody = {{bodyType}};
6262
export type ResponseBody = {{returnType}};
6363
}
6464
{{/routes}}

tests/generated/v2.0/example1.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ type ApiConfig<SecurityDataType> = {
4949
}
5050

5151

52+
export namespace subscriptions {
53+
54+
/**
55+
* @tags ManagedInstanceTdeCertificates
56+
* @name ManagedInstanceTdeCertificates_Create
57+
* @request POST:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates
58+
* @description Creates a TDE certificate for a given server.
59+
*/
60+
export namespace ManagedInstanceTdeCertificatesCreate {
61+
export type RequestQuery = { "api-version": string };
62+
export type RequestBody = TdeCertificate;
63+
export type ResponseBody = any;
64+
}
65+
}
5266

5367
export class Api<SecurityDataType> {
5468

tests/generated/v2.0/furkot-example.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,30 @@ type ApiConfig<SecurityDataType> = {
9393
}
9494

9595

96+
export namespace trip {
97+
98+
/**
99+
* @name tripList
100+
* @request GET:/trip
101+
* @description list user's trips
102+
*/
103+
export namespace TripList {
104+
export type RequestQuery = {};
105+
export type RequestBody = never;
106+
export type ResponseBody = Trip[];
107+
}
108+
109+
/**
110+
* @name stopDetail
111+
* @request GET:/trip/{trip_id}/stop
112+
* @description list stops for a trip identified by {trip_id}
113+
*/
114+
export namespace StopDetail {
115+
export type RequestQuery = {};
116+
export type RequestBody = never;
117+
export type ResponseBody = Step[];
118+
}
119+
}
96120

97121
export class Api<SecurityDataType> {
98122

tests/generated/v2.0/giphy.ts

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,140 @@ type ApiConfig<SecurityDataType> = {
251251
}
252252

253253

254+
export namespace gifs {
255+
256+
/**
257+
* @tags gifs
258+
* @name getGifsById
259+
* @summary Get GIFs by ID
260+
* @request GET:/gifs
261+
* @description A multiget version of the get GIF by ID endpoint..
262+
*/
263+
export namespace GetGifsById {
264+
export type RequestQuery = { ids?: string };
265+
export type RequestBody = never;
266+
export type ResponseBody = { data?: Gif[], meta?: Meta, pagination?: Pagination };
267+
}
268+
269+
/**
270+
* @tags gifs
271+
* @name randomGif
272+
* @summary Random GIF
273+
* @request GET:/gifs/random
274+
* @description Returns a random GIF, limited by tag. Excluding the tag parameter will return a random GIF from the GIPHY catalog..
275+
*/
276+
export namespace RandomGif {
277+
export type RequestQuery = { tag?: string, rating?: string };
278+
export type RequestBody = never;
279+
export type ResponseBody = { data?: Gif, meta?: Meta };
280+
}
281+
282+
/**
283+
* @tags gifs
284+
* @name searchGifs
285+
* @summary Search GIFs
286+
* @request GET:/gifs/search
287+
* @description Search all GIPHY GIFs for a word or phrase. Punctuation will be stripped and ignored. Use a plus or url encode for phrases. Example paul+rudd, ryan+gosling or american+psycho..
288+
*/
289+
export namespace SearchGifs {
290+
export type RequestQuery = { q: string, limit?: number, offset?: number, rating?: string, lang?: string };
291+
export type RequestBody = never;
292+
export type ResponseBody = { data?: Gif[], meta?: Meta, pagination?: Pagination };
293+
}
294+
295+
/**
296+
* @tags gifs
297+
* @name translateGif
298+
* @summary Translate phrase to GIF
299+
* @request GET:/gifs/translate
300+
* @description The translate API draws on search, but uses the GIPHY `special sauce` to handle translating from one vocabulary to another. In this case, words and phrases to GIF.
301+
*/
302+
export namespace TranslateGif {
303+
export type RequestQuery = { s: string };
304+
export type RequestBody = never;
305+
export type ResponseBody = { data?: Gif, meta?: Meta };
306+
}
307+
308+
/**
309+
* @tags gifs
310+
* @name trendingGifs
311+
* @summary Trending GIFs
312+
* @request GET:/gifs/trending
313+
* @description Fetch GIFs currently trending online. Hand curated by the GIPHY editorial team. The data returned mirrors the GIFs showcased on the GIPHY homepage. Returns 25 results by default..
314+
*/
315+
export namespace TrendingGifs {
316+
export type RequestQuery = { limit?: number, offset?: number, rating?: string };
317+
export type RequestBody = never;
318+
export type ResponseBody = { data?: Gif[], meta?: Meta, pagination?: Pagination };
319+
}
320+
321+
/**
322+
* @tags gifs
323+
* @name getGifById
324+
* @summary Get GIF by Id
325+
* @request GET:/gifs/{gifId}
326+
* @description Returns a GIF given that GIF's unique ID.
327+
*/
328+
export namespace GetGifById {
329+
export type RequestQuery = {};
330+
export type RequestBody = never;
331+
export type ResponseBody = { data?: Gif, meta?: Meta };
332+
}
333+
}
334+
export namespace stickers {
335+
336+
/**
337+
* @tags stickers
338+
* @name randomSticker
339+
* @summary Random Sticker
340+
* @request GET:/stickers/random
341+
* @description Returns a random GIF, limited by tag. Excluding the tag parameter will return a random GIF from the GIPHY catalog..
342+
*/
343+
export namespace RandomSticker {
344+
export type RequestQuery = { tag?: string, rating?: string };
345+
export type RequestBody = never;
346+
export type ResponseBody = { data?: Gif, meta?: Meta };
347+
}
348+
349+
/**
350+
* @tags stickers
351+
* @name searchStickers
352+
* @summary Search Stickers
353+
* @request GET:/stickers/search
354+
* @description Replicates the functionality and requirements of the classic GIPHY search, but returns animated stickers rather than GIFs..
355+
*/
356+
export namespace SearchStickers {
357+
export type RequestQuery = { q: string, limit?: number, offset?: number, rating?: string, lang?: string };
358+
export type RequestBody = never;
359+
export type ResponseBody = { data?: Gif[], meta?: Meta, pagination?: Pagination };
360+
}
361+
362+
/**
363+
* @tags stickers
364+
* @name translateSticker
365+
* @summary Translate phrase to Sticker
366+
* @request GET:/stickers/translate
367+
* @description The translate API draws on search, but uses the GIPHY `special sauce` to handle translating from one vocabulary to another. In this case, words and phrases to GIFs..
368+
*/
369+
export namespace TranslateSticker {
370+
export type RequestQuery = { s: string };
371+
export type RequestBody = never;
372+
export type ResponseBody = { data?: Gif, meta?: Meta };
373+
}
374+
375+
/**
376+
* @tags stickers
377+
* @name trendingStickers
378+
* @summary Trending Stickers
379+
* @request GET:/stickers/trending
380+
* @description Fetch Stickers currently trending online. Hand curated by the GIPHY editorial team. Returns 25 results by default..
381+
*/
382+
export namespace TrendingStickers {
383+
export type RequestQuery = { limit?: number, offset?: number, rating?: string };
384+
export type RequestBody = never;
385+
export type ResponseBody = { data?: Gif[], meta?: Meta, pagination?: Pagination };
386+
}
387+
}
254388

255389
export class Api<SecurityDataType> {
256390

0 commit comments

Comments
 (0)