Patch 2 #1493
Annotations
10 errors
tests/extended.test.ts > extended > 'additional-properties':
tests/extended.test.ts#L45
Error: Snapshot `extended > 'additional-properties' 1` mismatched
- Expected
+ Received
@@ -8,224 +8,234 @@
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/
export interface Message {
- code?: number;
+ code?: number;
- text?: string;
+ text?: string;
}
export type Messages = Record<string, Message>;
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
- /** set parameter to `true` for call `securityWorker` for this request */
+ /** set parameter to `true` for call `securityWorker` for this request */
- secure?: boolean;
+ secure?: boolean;
- /** request path */
+ /** request path */
- path: string;
+ path: string;
- /** content type of request body */
+ /** content type of request body */
- type?: ContentType;
+ type?: ContentType;
- /** query params */
+ /** query params */
- query?: QueryParamsType;
+ query?: QueryParamsType;
- /** format of response (i.e. response.json() -> format: "json") */
+ /** format of response (i.e. response.json() -> format: "json") */
- format?: ResponseFormat;
+ format?: ResponseFormat;
- /** request body */
+ /** request body */
- body?: unknown;
+ body?: unknown;
- /** base url */
+ /** base url */
- baseUrl?: string;
+ baseUrl?: string;
- /** request cancellation token */
+ /** request cancellation token */
- cancelToken?: CancelToken;
+ cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
- baseUrl?: string;
+ baseUrl?: string;
- baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
+ baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
- securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
+ securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
- customFetch?: typeof fetch;
+ customFetch?: typeof fetch;
}
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
- data: D;
+ data: D;
- error: E;
+ error: E;
}
type CancelToken = Symbol | string | number;
export enum ContentType {
- Json = "application/json",
+ Json = "application/json",
- FormData = "multipart/form-data",
+ FormData = "multipart/form-data",
- UrlEncoded = "application/x-www-form-urlencoded",
+ UrlEncoded = "application/x-www-form-urlencoded",
- Text = "text/plain",
+ Text = "text/plain",
}
export class HttpClient<SecurityDataType = unknown> {
- public baseUrl: string = "";
+ public baseUrl: string = "";
- private securityData: SecurityDataType | null = null;
+ private securityData: SecurityDataType | null = null;
- private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
+ private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
- private abortControllers = new Map<CancelToken, AbortController>();
+ private abortControllers = new Map<CancelToken, AbortController>();
- private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);
+ private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);
- private baseApiParams: RequestParams = {
+ private baseApiParams: RequestParams = {
- credentials: "same-origin",
+ credentials: "same-origin",
- headers: {},
+ headers: {},
- redirect: "follow",
+ redirect: "follow",
- referrerPolicy: "no-referrer",
+ referrerPolicy: "no-referrer",
- };
+ };
- constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
+ constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
- Object.assign(this, apiConfig);
+ Object.assign(this, apiConfig);
- }
+ }
- public setSecurityData = (data: SecurityDataType |
|
tests/extended.test.ts > extended > 'additional-properties2':
tests/extended.test.ts#L45
Error: Snapshot `extended > 'additional-properties2' 1` mismatched
- Expected
+ Received
@@ -15,214 +15,224 @@
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
- /** set parameter to `true` for call `securityWorker` for this request */
+ /** set parameter to `true` for call `securityWorker` for this request */
- secure?: boolean;
+ secure?: boolean;
- /** request path */
+ /** request path */
- path: string;
+ path: string;
- /** content type of request body */
+ /** content type of request body */
- type?: ContentType;
+ type?: ContentType;
- /** query params */
+ /** query params */
- query?: QueryParamsType;
+ query?: QueryParamsType;
- /** format of response (i.e. response.json() -> format: "json") */
+ /** format of response (i.e. response.json() -> format: "json") */
- format?: ResponseFormat;
+ format?: ResponseFormat;
- /** request body */
+ /** request body */
- body?: unknown;
+ body?: unknown;
- /** base url */
+ /** base url */
- baseUrl?: string;
+ baseUrl?: string;
- /** request cancellation token */
+ /** request cancellation token */
- cancelToken?: CancelToken;
+ cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
- baseUrl?: string;
+ baseUrl?: string;
- baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
+ baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
- securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
+ securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
- customFetch?: typeof fetch;
+ customFetch?: typeof fetch;
}
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
- data: D;
+ data: D;
- error: E;
+ error: E;
}
type CancelToken = Symbol | string | number;
export enum ContentType {
- Json = "application/json",
+ Json = "application/json",
- FormData = "multipart/form-data",
+ FormData = "multipart/form-data",
- UrlEncoded = "application/x-www-form-urlencoded",
+ UrlEncoded = "application/x-www-form-urlencoded",
- Text = "text/plain",
+ Text = "text/plain",
}
export class HttpClient<SecurityDataType = unknown> {
- public baseUrl: string = "";
+ public baseUrl: string = "";
- private securityData: SecurityDataType | null = null;
+ private securityData: SecurityDataType | null = null;
- private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
+ private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
- private abortControllers = new Map<CancelToken, AbortController>();
+ private abortControllers = new Map<CancelToken, AbortController>();
- private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);
+ private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);
- private baseApiParams: RequestParams = {
+ private baseApiParams: RequestParams = {
- credentials: "same-origin",
+ credentials: "same-origin",
- headers: {},
+ headers: {},
- redirect: "follow",
+ redirect: "follow",
- referrerPolicy: "no-referrer",
+ referrerPolicy: "no-referrer",
- };
+ };
- constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
+ constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
- Object.assign(this, apiConfig);
+ Object.assign(this, apiConfig);
- }
+ }
- public setSecurityData = (data: SecurityDataType | null) => {
+ public setSecurityData = (data: SecurityDataType | null) => {
- this.securityData = data;
+ this.securityData = data;
- };
+ };
- protected encodeQueryParam(key: string, value: any) {
+ protected encodeQueryParam(key: string, value: any) {
- const encodedKey = encodeURI
|
tests/extended.test.ts > extended > 'allof-example':
tests/extended.test.ts#L45
Error: Snapshot `extended > 'allof-example' 1` mismatched
- Expected
+ Received
@@ -8,277 +8,287 @@
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/
export type Cat = Pet & {
- age?: number;
+ age?: number;
- hunts?: boolean;
+ hunts?: boolean;
};
export type Dog = Pet & {
- bark?: boolean;
+ bark?: boolean;
- breed: DogBreedEnum;
+ breed: DogBreedEnum;
};
export enum DogBreedEnum {
- Dingo = "Dingo",
+ Dingo = "Dingo",
- Husky = "Husky",
+ Husky = "Husky",
- Retriever = "Retriever",
+ Retriever = "Retriever",
- Shepherd = "Shepherd",
+ Shepherd = "Shepherd",
}
export interface Pet {
- pet_type: string;
+ pet_type: string;
}
export type PetsPartialUpdateData = any;
export type PetsPartialUpdatePayload = Cat | Dog;
export namespace Pets {
- /**
+ /**
- * No description
+ * No description
- * @name PetsPartialUpdate
+ * @name PetsPartialUpdate
- * @request PATCH:/pets
+ * @request PATCH:/pets
- */
+ */
- export namespace PetsPartialUpdate {
+ export namespace PetsPartialUpdate {
- export type RequestParams = {};
+ export type RequestParams = {};
- export type RequestQuery = {};
+ export type RequestQuery = {};
- export type RequestBody = PetsPartialUpdatePayload;
+ export type RequestBody = PetsPartialUpdatePayload;
- export type RequestHeaders = {};
+ export type RequestHeaders = {};
- export type ResponseBody = PetsPartialUpdateData;
+ export type ResponseBody = PetsPartialUpdateData;
- }
+ }
}
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
- /** set parameter to `true` for call `securityWorker` for this request */
+ /** set parameter to `true` for call `securityWorker` for this request */
- secure?: boolean;
+ secure?: boolean;
- /** request path */
+ /** request path */
- path: string;
+ path: string;
- /** content type of request body */
+ /** content type of request body */
- type?: ContentType;
+ type?: ContentType;
- /** query params */
+ /** query params */
- query?: QueryParamsType;
+ query?: QueryParamsType;
- /** format of response (i.e. response.json() -> format: "json") */
+ /** format of response (i.e. response.json() -> format: "json") */
- format?: ResponseFormat;
+ format?: ResponseFormat;
- /** request body */
+ /** request body */
- body?: unknown;
+ body?: unknown;
- /** base url */
+ /** base url */
- baseUrl?: string;
+ baseUrl?: string;
- /** request cancellation token */
+ /** request cancellation token */
- cancelToken?: CancelToken;
+ cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
- baseUrl?: string;
+ baseUrl?: string;
- baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
+ baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
- securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
+ securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
- customFetch?: typeof fetch;
+ customFetch?: typeof fetch;
}
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
- data: D;
+ data: D;
- error: E;
+ error: E;
}
type CancelToken = Symbol | string | number;
export enum ContentType {
- Json = "application/json",
+ Json = "application/json",
- FormData = "multipart/form-data",
+ FormData = "multipart/form-data",
- UrlEncoded = "application/x-www-form-urlencoded",
+ UrlEncoded = "application/x-www-form-urlencoded",
- Text = "text/plain",
+ Text = "text/plain",
}
export class HttpClient<SecurityDataType = unknown> {
- public baseUrl: string = "";
+ public
|
tests/extended.test.ts > extended > 'anyof-example':
tests/extended.test.ts#L45
Error: Snapshot `extended > 'anyof-example' 1` mismatched
- Expected
+ Received
@@ -8,271 +8,281 @@
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/
export interface PetByAge {
- age: number;
+ age: number;
- nickname?: string;
+ nickname?: string;
}
export interface PetByType {
- hunts?: boolean;
+ hunts?: boolean;
- pet_type: PetByTypePetTypeEnum;
+ pet_type: PetByTypePetTypeEnum;
}
export enum PetByTypePetTypeEnum {
- Cat = "Cat",
+ Cat = "Cat",
- Dog = "Dog",
+ Dog = "Dog",
}
export type PetsPartialUpdateData = any;
export type PetsPartialUpdatePayload = PetByAge | PetByType;
export namespace Pets {
- /**
+ /**
- * No description
+ * No description
- * @name PetsPartialUpdate
+ * @name PetsPartialUpdate
- * @request PATCH:/pets
+ * @request PATCH:/pets
- */
+ */
- export namespace PetsPartialUpdate {
+ export namespace PetsPartialUpdate {
- export type RequestParams = {};
+ export type RequestParams = {};
- export type RequestQuery = {};
+ export type RequestQuery = {};
- export type RequestBody = PetsPartialUpdatePayload;
+ export type RequestBody = PetsPartialUpdatePayload;
- export type RequestHeaders = {};
+ export type RequestHeaders = {};
- export type ResponseBody = PetsPartialUpdateData;
+ export type ResponseBody = PetsPartialUpdateData;
- }
+ }
}
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
- /** set parameter to `true` for call `securityWorker` for this request */
+ /** set parameter to `true` for call `securityWorker` for this request */
- secure?: boolean;
+ secure?: boolean;
- /** request path */
+ /** request path */
- path: string;
+ path: string;
- /** content type of request body */
+ /** content type of request body */
- type?: ContentType;
+ type?: ContentType;
- /** query params */
+ /** query params */
- query?: QueryParamsType;
+ query?: QueryParamsType;
- /** format of response (i.e. response.json() -> format: "json") */
+ /** format of response (i.e. response.json() -> format: "json") */
- format?: ResponseFormat;
+ format?: ResponseFormat;
- /** request body */
+ /** request body */
- body?: unknown;
+ body?: unknown;
- /** base url */
+ /** base url */
- baseUrl?: string;
+ baseUrl?: string;
- /** request cancellation token */
+ /** request cancellation token */
- cancelToken?: CancelToken;
+ cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
- baseUrl?: string;
+ baseUrl?: string;
- baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
+ baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
- securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
+ securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
- customFetch?: typeof fetch;
+ customFetch?: typeof fetch;
}
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
- data: D;
+ data: D;
- error: E;
+ error: E;
}
type CancelToken = Symbol | string | number;
export enum ContentType {
- Json = "application/json",
+ Json = "application/json",
- FormData = "multipart/form-data",
+ FormData = "multipart/form-data",
- UrlEncoded = "application/x-www-form-urlencoded",
+ UrlEncoded = "application/x-www-form-urlencoded",
- Text = "text/plain",
+ Text = "text/plain",
}
export class HttpClient<SecurityDataType = unknown> {
- public baseUrl: string = "";
+ public baseUrl: string = "";
- private securityData: SecurityDataType | null = null;
+ private securityData: SecurityDataType | null = null;
- private s
|
tests/extended.test.ts > extended > 'api-with-examples':
tests/extended.test.ts#L45
Error: Snapshot `extended > 'api-with-examples' 1` mismatched
- Expected
+ Received
@@ -12,268 +12,278 @@
export type GetVersionDetailsv2Data = any;
export type ListVersionsv2Data = any;
export namespace V2 {
- /**
+ /**
- * No description
+ * No description
- * @name GetVersionDetailsv2
+ * @name GetVersionDetailsv2
- * @summary Show API version details
+ * @summary Show API version details
- * @request GET:/v2
+ * @request GET:/v2
- */
+ */
- export namespace GetVersionDetailsv2 {
+ export namespace GetVersionDetailsv2 {
- export type RequestParams = {};
+ export type RequestParams = {};
- export type RequestQuery = {};
+ export type RequestQuery = {};
- export type RequestBody = never;
+ export type RequestBody = never;
- export type RequestHeaders = {};
+ export type RequestHeaders = {};
- export type ResponseBody = GetVersionDetailsv2Data;
+ export type ResponseBody = GetVersionDetailsv2Data;
- }
+ }
}
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
- /** set parameter to `true` for call `securityWorker` for this request */
+ /** set parameter to `true` for call `securityWorker` for this request */
- secure?: boolean;
+ secure?: boolean;
- /** request path */
+ /** request path */
- path: string;
+ path: string;
- /** content type of request body */
+ /** content type of request body */
- type?: ContentType;
+ type?: ContentType;
- /** query params */
+ /** query params */
- query?: QueryParamsType;
+ query?: QueryParamsType;
- /** format of response (i.e. response.json() -> format: "json") */
+ /** format of response (i.e. response.json() -> format: "json") */
- format?: ResponseFormat;
+ format?: ResponseFormat;
- /** request body */
+ /** request body */
- body?: unknown;
+ body?: unknown;
- /** base url */
+ /** base url */
- baseUrl?: string;
+ baseUrl?: string;
- /** request cancellation token */
+ /** request cancellation token */
- cancelToken?: CancelToken;
+ cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
- baseUrl?: string;
+ baseUrl?: string;
- baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
+ baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
- securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
+ securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
- customFetch?: typeof fetch;
+ customFetch?: typeof fetch;
}
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
- data: D;
+ data: D;
- error: E;
+ error: E;
}
type CancelToken = Symbol | string | number;
export enum ContentType {
- Json = "application/json",
+ Json = "application/json",
- FormData = "multipart/form-data",
+ FormData = "multipart/form-data",
- UrlEncoded = "application/x-www-form-urlencoded",
+ UrlEncoded = "application/x-www-form-urlencoded",
- Text = "text/plain",
+ Text = "text/plain",
}
export class HttpClient<SecurityDataType = unknown> {
- public baseUrl: string = "";
+ public baseUrl: string = "";
- private securityData: SecurityDataType | null = null;
+ private securityData: SecurityDataType | null = null;
- private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
+ private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
- private abortControllers = new Map<CancelToken, AbortController>();
+ private abortControllers = new Map<CancelToken, AbortController>();
- private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);
+ private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);
- private
|
tests/extended.test.ts > extended > 'callback-example':
tests/extended.test.ts#L45
Error: Snapshot `extended > 'callback-example' 1` mismatched
- Expected
+ Received
@@ -9,278 +9,288 @@
* ---------------------------------------------------------------
*/
/** subscription information */
export interface StreamsCreateData {
- /**
+ /**
- * this unique identifier allows management of the subscription
+ * this unique identifier allows management of the subscription
- * @example "2531329f-fb09-4ef7-887e-84e648214436"
+ * @example "2531329f-fb09-4ef7-887e-84e648214436"
- */
+ */
- subscriptionId: string;
+ subscriptionId: string;
}
export interface StreamsCreateParams {
- /**
+ /**
- * the location where data will be sent. Must be network accessible
+ * the location where data will be sent. Must be network accessible
- * by the source server
+ * by the source server
- * @Format uri
+ * @Format uri
- * @example "https://tonys-server.com"
+ * @example "https://tonys-server.com"
- */
+ */
- callbackUrl: string;
+ callbackUrl: string;
}
export namespace Streams {
- /**
+ /**
- * @description subscribes a client to receive out-of-band data
+ * @description subscribes a client to receive out-of-band data
- * @name StreamsCreate
+ * @name StreamsCreate
- * @request POST:/streams
+ * @request POST:/streams
- */
+ */
- export namespace StreamsCreate {
+ export namespace StreamsCreate {
- export type RequestParams = {};
+ export type RequestParams = {};
- export type RequestQuery = {
+ export type RequestQuery = {
- /**
+ /**
- * the location where data will be sent. Must be network accessible
+ * the location where data will be sent. Must be network accessible
- * by the source server
+ * by the source server
- * @Format uri
+ * @Format uri
- * @example "https://tonys-server.com"
+ * @example "https://tonys-server.com"
- */
+ */
- callbackUrl: string;
+ callbackUrl: string;
- };
+ };
- export type RequestBody = never;
+ export type RequestBody = never;
- export type RequestHeaders = {};
+ export type RequestHeaders = {};
- export type ResponseBody = StreamsCreateData;
+ export type ResponseBody = StreamsCreateData;
- }
+ }
}
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
- /** set parameter to `true` for call `securityWorker` for this request */
+ /** set parameter to `true` for call `securityWorker` for this request */
- secure?: boolean;
+ secure?: boolean;
- /** request path */
+ /** request path */
- path: string;
+ path: string;
- /** content type of request body */
+ /** content type of request body */
- type?: ContentType;
+ type?: ContentType;
- /** query params */
+ /** query params */
- query?: QueryParamsType;
+ query?: QueryParamsType;
- /** format of response (i.e. response.json() -> format: "json") */
+ /** format of response (i.e. response.json() -> format: "json") */
- format?: ResponseFormat;
+ format?: ResponseFormat;
- /** request body */
+ /** request body */
- body?: unknown;
+ body?: unknown;
- /** base url */
+ /** base url */
- baseUrl?: string;
+ baseUrl?: string;
- /** request cancellation token */
+ /** request cancellation token */
- cancelToken?: CancelToken;
+ cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
- baseUrl?: string;
+ baseUrl?: string;
- baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
+ baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
- securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
+ securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
- customFetch?: typeof fetch;
+
|
tests/extended.test.ts > extended > 'components-responses':
tests/extended.test.ts#L45
Error: Snapshot `extended > 'components-responses' 1` mismatched
- Expected
+ Received
@@ -9,263 +9,273 @@
* ---------------------------------------------------------------
*/
/** OK */
export interface Default {
- data?: string;
+ data?: string;
}
export namespace Api {
- /**
+ /**
- * No description
+ * No description
- * @name GetData
+ * @name GetData
- * @request GET:/api
+ * @request GET:/api
- */
+ */
- export namespace GetData {
+ export namespace GetData {
- export type RequestParams = {};
+ export type RequestParams = {};
- export type RequestQuery = {};
+ export type RequestQuery = {};
- export type RequestBody = never;
+ export type RequestBody = never;
- export type RequestHeaders = {};
+ export type RequestHeaders = {};
- export type ResponseBody = {
+ export type ResponseBody = {
- data?: string;
+ data?: string;
- };
+ };
- }
+ }
}
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
- /** set parameter to `true` for call `securityWorker` for this request */
+ /** set parameter to `true` for call `securityWorker` for this request */
- secure?: boolean;
+ secure?: boolean;
- /** request path */
+ /** request path */
- path: string;
+ path: string;
- /** content type of request body */
+ /** content type of request body */
- type?: ContentType;
+ type?: ContentType;
- /** query params */
+ /** query params */
- query?: QueryParamsType;
+ query?: QueryParamsType;
- /** format of response (i.e. response.json() -> format: "json") */
+ /** format of response (i.e. response.json() -> format: "json") */
- format?: ResponseFormat;
+ format?: ResponseFormat;
- /** request body */
+ /** request body */
- body?: unknown;
+ body?: unknown;
- /** base url */
+ /** base url */
- baseUrl?: string;
+ baseUrl?: string;
- /** request cancellation token */
+ /** request cancellation token */
- cancelToken?: CancelToken;
+ cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
- baseUrl?: string;
+ baseUrl?: string;
- baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
+ baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
- securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
+ securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
- customFetch?: typeof fetch;
+ customFetch?: typeof fetch;
}
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
- data: D;
+ data: D;
- error: E;
+ error: E;
}
type CancelToken = Symbol | string | number;
export enum ContentType {
- Json = "application/json",
+ Json = "application/json",
- FormData = "multipart/form-data",
+ FormData = "multipart/form-data",
- UrlEncoded = "application/x-www-form-urlencoded",
+ UrlEncoded = "application/x-www-form-urlencoded",
- Text = "text/plain",
+ Text = "text/plain",
}
export class HttpClient<SecurityDataType = unknown> {
- public baseUrl: string = "";
+ public baseUrl: string = "";
- private securityData: SecurityDataType | null = null;
+ private securityData: SecurityDataType | null = null;
- private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
+ private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
- private abortControllers = new Map<CancelToken, AbortController>();
+ private abortControllers = new Map<CancelToken, AbortController>();
- private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);
+ private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);
- private baseApiParams: RequestParams = {
+ p
|
tests/extended.test.ts > extended > 'explode-param-3':
tests/extended.test.ts#L45
Error: Snapshot `extended > 'explode-param-3' 1` mismatched
- Expected
+ Received
@@ -10,320 +10,330 @@
*/
export type CreateFileData = Floop;
export interface CreateFilePayload {
- /** @default "" */
+ /** @default "" */
- meme: string;
+ meme: string;
- memeType?: string;
+ memeType?: string;
}
export interface Floop {
- info?: string;
+ info?: string;
}
export interface GetsParams {
- params?: QueryParams;
+ params?: QueryParams;
}
export interface QueryParams {
- /**
+ /**
- * Page size
+ * Page size
- * @Format int32
+ * @Format int32
- * @min 0
+ * @min 0
- */
+ */
- "page-size"?: number | null;
+ "page-size"?: number | null;
- /**
+ /**
- * Page number
+ * Page number
- * @Format int32
+ * @Format int32
- * @min 0
+ * @min 0
- */
+ */
- page?: number | null;
+ page?: number | null;
}
export namespace User {
- /**
+ /**
- * No description
+ * No description
- * @name CreateFile
+ * @name CreateFile
- * @summary Some summary
+ * @summary Some summary
- * @request POST:/{user}/foos
+ * @request POST:/{user}/foos
- */
+ */
- export namespace CreateFile {
+ export namespace CreateFile {
- export type RequestParams = {
+ export type RequestParams = {
- user: string;
+ user: string;
- };
+ };
- export type RequestQuery = {};
+ export type RequestQuery = {};
- export type RequestBody = CreateFilePayload;
+ export type RequestBody = CreateFilePayload;
- export type RequestHeaders = {};
+ export type RequestHeaders = {};
- export type ResponseBody = CreateFileData;
+ export type ResponseBody = CreateFileData;
- }
+ }
}
export namespace Something {
- /**
+ /**
- * No description
+ * No description
- * @name Gets
+ * @name Gets
- * @request GET:/something/
+ * @request GET:/something/
- */
+ */
- export namespace Gets {
+ export namespace Gets {
- export type RequestParams = {};
+ export type RequestParams = {};
- export type RequestQuery = {
+ export type RequestQuery = {
- params?: QueryParams;
+ params?: QueryParams;
- };
+ };
- export type RequestBody = never;
+ export type RequestBody = never;
- export type RequestHeaders = {};
+ export type RequestHeaders = {};
- export type ResponseBody = any;
+ export type ResponseBody = any;
- }
+ }
}
export type QueryParamsType = Record<string | number, any>;
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
export interface FullRequestParams extends Omit<RequestInit, "body"> {
- /** set parameter to `true` for call `securityWorker` for this request */
+ /** set parameter to `true` for call `securityWorker` for this request */
- secure?: boolean;
+ secure?: boolean;
- /** request path */
+ /** request path */
- path: string;
+ path: string;
- /** content type of request body */
+ /** content type of request body */
- type?: ContentType;
+ type?: ContentType;
- /** query params */
+ /** query params */
- query?: QueryParamsType;
+ query?: QueryParamsType;
- /** format of response (i.e. response.json() -> format: "json") */
+ /** format of response (i.e. response.json() -> format: "json") */
- format?: ResponseFormat;
+ format?: ResponseFormat;
- /** request body */
+ /** request body */
- body?: unknown;
+ body?: unknown;
- /** base url */
+ /** base url */
- baseUrl?: string;
+ baseUrl?: string;
- /** request cancellation token */
+ /** request cancellation token */
- cancelToken?: CancelToken;
+ cancelToken?: CancelToken;
}
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
export interface ApiConfig<SecurityDataType = unknown> {
- baseUrl?: string;
+ baseUrl?: string;
- baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
+ baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
- securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
+ securityWork
|
tests/extended.test.ts > extended > 'full-swagger-scheme':
tests/extended.test.ts#L45
Error: Snapshot `extended > 'full-swagger-scheme' 1` mismatched
- Expected
+ Received
@@ -14,65 +14,65 @@
export type ActionsAddSelectedRepoToOrgSecretData = any;
export type ActionsAddSelfHostedRunnerToGroupForOrgData = any;
export interface ActionsBillingUsage {
- /** The amount of free GitHub Actions minutes available. */
- included_minutes: number;
- minutes_used_breakdown: {
- /** Total minutes used on macOS runner machines. */
- MACOS?: number;
- /** Total minutes used on Ubuntu runner machines. */
- UBUNTU?: number;
- /** Total minutes used on Windows runner machines. */
- WINDOWS?: number;
- };
- /** The sum of the free and paid GitHub Actions minutes used. */
- total_minutes_used: number;
- /** The total paid GitHub Actions minutes used. */
- total_paid_minutes_used: number;
+ /** The amount of free GitHub Actions minutes available. */
+ included_minutes: number;
+ minutes_used_breakdown: {
+ /** Total minutes used on macOS runner machines. */
+ MACOS?: number;
+ /** Total minutes used on Ubuntu runner machines. */
+ UBUNTU?: number;
+ /** Total minutes used on Windows runner machines. */
+ WINDOWS?: number;
+ };
+ /** The sum of the free and paid GitHub Actions minutes used. */
+ total_minutes_used: number;
+ /** The total paid GitHub Actions minutes used. */
+ total_paid_minutes_used: number;
}
export type ActionsCancelWorkflowRunData = any;
export type ActionsCreateOrUpdateOrgSecretData = any;
export interface ActionsCreateOrUpdateOrgSecretPayload {
- /** Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */
- encrypted_value?: string;
- /** ID of the key you used to encrypt the secret. */
- key_id?: string;
- /** An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */
- selected_repository_ids?: string[];
- /**
- * Configures the access that repositories have to the organization secret. Can be one of:
- * \- `all` - All repositories in an organization can access the secret.
- * \- `private` - Private repositories in an organization can access the secret.
- * \- `selected` - Only specific repositories can access the secret.
- */
- visibility?: ActionsCreateOrUpdateOrgSecretVisibilityEnum;
+ /** Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */
+ encrypted_value?: string;
+ /** ID of the key you used to encrypt the secret. */
+ key_id?: string;
+ /** An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https
|
tests/extended.test.ts > extended > 'link-example':
tests/extended.test.ts#L45
Error: Snapshot `extended > 'link-example' 1` mismatched
- Expected
+ Received
@@ -12,19 +12,19 @@
export type GetPullRequestsByIdData = Pullrequest;
export type GetPullRequestsByRepositoryData = Pullrequest[];
export interface GetPullRequestsByRepositoryParams {
- slug: string;
+ slug: string;
- state?: StateEnum;
+ state?: StateEnum;
- username: string;
+ username: string;
}
export enum GetPullRequestsByRepositoryParams1StateEnum {
- Open = "open",
+ Open = "open",
- Merged = "merged",
+ Merged = "merged",
- Declined = "declined",
+ Declined = "declined",
}
export type GetRepositoriesByOwnerData = Repository[];
export type GetRepositoryData = Repository;
@@ -32,432 +32,442 @@
export type GetUserByNameData = User;
export type MergePullRequestData = any;
export interface Pullrequest {
- author?: User;
+ author?: User;
- id?: number;
+ id?: number;
- repository?: Repository;
+ repository?: Repository;
- title?: string;
+ title?: string;
}
export interface Repository {
- owner?: User;
+ owner?: User;
- slug?: string;
+ slug?: string;
}
export enum StateEnum {
- Open = "open",
+ Open = "open",
- Merged = "merged",
+ Merged = "merged",
- Declined = "declined",
+ Declined = "declined",
}
export interface User {
- username?: string;
+ username?: string;
- uuid?: string;
+ uuid?: string;
}
export namespace V20 {
- /**
+ /**
- * No description
+ * No description
- * @name GetPullRequestsById
+ * @name GetPullRequestsById
- * @request GET:/2.0/repositories/{username}/{slug}/pullrequests/{pid}
+ * @request GET:/2.0/repositories/{username}/{slug}/pullrequests/{pid}
- */
+ */
- export namespace GetPullRequestsById {
+ export namespace GetPullRequestsById {
- export type RequestParams = {
+ export type RequestParams = {
- pid: string;
+ pid: string;
- slug: string;
+ slug: string;
- username: string;
+ username: string;
- };
+ };
- export type RequestQuery = {};
+ export type RequestQuery = {};
- export type RequestBody = never;
+ export type RequestBody = never;
- export type RequestHeaders = {};
+ export type RequestHeaders = {};
- export type ResponseBody = GetPullRequestsByIdData;
+ export type ResponseBody = GetPullRequestsByIdData;
- }
+ }
- /**
+ /**
- * No description
+ * No description
- * @name GetPullRequestsByRepository
+ * @name GetPullRequestsByRepository
- * @request GET:/2.0/repositories/{username}/{slug}/pullrequests
+ * @request GET:/2.0/repositories/{username}/{slug}/pullrequests
- */
+ */
- export namespace GetPullRequestsByRepository {
+ export namespace GetPullRequestsByRepository {
- export type RequestParams = {
+ export type RequestParams = {
- slug: string;
+ slug: string;
- username: string;
+ username: string;
- };
+ };
- export type RequestQuery = {
+ export type RequestQuery = {
- state?: GetPullRequestsByRepositoryParams1StateEnum;
+ state?: GetPullRequestsByRepositoryParams1StateEnum;
- };
+ };
- export type RequestBody = never;
+ export type RequestBody = never;
- export type RequestHeaders = {};
+ export type RequestHeaders = {};
- export type ResponseBody = GetPullRequestsByRepositoryData;
+ export type ResponseBody = GetPullRequestsByRepositoryData;
- }
+ }
- /**
+ /**
- * No description
+ * No description
- * @name GetRepositoriesByOwner
+ * @name GetRepositoriesByOwner
- * @request GET:/2.0/repositories/{username}
+ * @request GET:/2.0/repositories/{username}
- */
+ */
- export namespace GetRepositoriesByOwner {
+ export namespace GetRepositoriesByOwner {
- export type RequestParams = {
+ export type RequestParams = {
- username: string;
+ username: string;
- };
+ };
- export type RequestQuery = {};
+ export type RequestQuery = {};
- export type RequestBody = never;
+ export type RequestBody = never;
- export type RequestHeaders = {};
+ export type RequestHeaders = {};
-
|