From befe24dee728be023f98987fda59acbd75739834 Mon Sep 17 00:00:00 2001 From: mkusaka Date: Sat, 9 Apr 2022 21:54:36 +0900 Subject: [PATCH] [typescript-fetch] regenerate withoutRuntimeCheks sample (#12091) --- .../src/models/Category.ts | 65 ---------- .../src/models/ModelApiResponse.ts | 73 ----------- .../src/models/Order.ts | 107 ---------------- .../without-runtime-checks/src/models/Pet.ts | 118 ------------------ .../without-runtime-checks/src/models/Tag.ts | 65 ---------- .../without-runtime-checks/src/models/User.ts | 113 ----------------- 6 files changed, 541 deletions(-) delete mode 100644 samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Category.ts delete mode 100644 samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/ModelApiResponse.ts delete mode 100644 samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Order.ts delete mode 100644 samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Pet.ts delete mode 100644 samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Tag.ts delete mode 100644 samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/User.ts diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Category.ts deleted file mode 100644 index faf9aabb9de1..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Category.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * A category for a pet - * @export - * @interface Category - */ -export interface Category { - /** - * - * @type {number} - * @memberof Category - */ - id?: number; - /** - * - * @type {string} - * @memberof Category - */ - name?: string; -} - -export function CategoryFromJSON(json: any): Category { - return CategoryFromJSONTyped(json, false); -} - -export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): Category { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': !exists(json, 'name') ? undefined : json['name'], - }; -} - -export function CategoryToJSON(value?: Category | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'name': value.name, - }; -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/ModelApiResponse.ts deleted file mode 100644 index 63fa57adc033..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/ModelApiResponse.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Describes the result of uploading an image resource - * @export - * @interface ModelApiResponse - */ -export interface ModelApiResponse { - /** - * - * @type {number} - * @memberof ModelApiResponse - */ - code?: number; - /** - * - * @type {string} - * @memberof ModelApiResponse - */ - type?: string; - /** - * - * @type {string} - * @memberof ModelApiResponse - */ - message?: string; -} - -export function ModelApiResponseFromJSON(json: any): ModelApiResponse { - return ModelApiResponseFromJSONTyped(json, false); -} - -export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelApiResponse { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'code': !exists(json, 'code') ? undefined : json['code'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'message': !exists(json, 'message') ? undefined : json['message'], - }; -} - -export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'code': value.code, - 'type': value.type, - 'message': value.message, - }; -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Order.ts deleted file mode 100644 index 104c3157f61f..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Order.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * An order for a pets from the pet store - * @export - * @interface Order - */ -export interface Order { - /** - * - * @type {number} - * @memberof Order - */ - id?: number; - /** - * - * @type {number} - * @memberof Order - */ - petId?: number; - /** - * - * @type {number} - * @memberof Order - */ - quantity?: number; - /** - * - * @type {Date} - * @memberof Order - */ - shipDate?: Date; - /** - * Order Status - * @type {string} - * @memberof Order - */ - status?: OrderStatusEnum; - /** - * - * @type {boolean} - * @memberof Order - */ - complete?: boolean; -} - -export function OrderFromJSON(json: any): Order { - return OrderFromJSONTyped(json, false); -} - -export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Order { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'petId': !exists(json, 'petId') ? undefined : json['petId'], - 'quantity': !exists(json, 'quantity') ? undefined : json['quantity'], - 'shipDate': !exists(json, 'shipDate') ? undefined : (new Date(json['shipDate'])), - 'status': !exists(json, 'status') ? undefined : json['status'], - 'complete': !exists(json, 'complete') ? undefined : json['complete'], - }; -} - -export function OrderToJSON(value?: Order | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'petId': value.petId, - 'quantity': value.quantity, - 'shipDate': value.shipDate === undefined ? undefined : (value.shipDate.toISOString()), - 'status': value.status, - 'complete': value.complete, - }; -} - -/** -* @export -* @enum {string} -*/ -export enum OrderStatusEnum { - Placed = 'placed', - Approved = 'approved', - Delivered = 'delivered' -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Pet.ts deleted file mode 100644 index 7e084c084a98..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Pet.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import { - Category, - CategoryFromJSON, - CategoryFromJSONTyped, - CategoryToJSON, - Tag, - TagFromJSON, - TagFromJSONTyped, - TagToJSON, -} from './'; - -/** - * A pet for sale in the pet store - * @export - * @interface Pet - */ -export interface Pet { - /** - * - * @type {number} - * @memberof Pet - */ - id?: number; - /** - * - * @type {Category} - * @memberof Pet - */ - category?: Category; - /** - * - * @type {string} - * @memberof Pet - */ - name: string; - /** - * - * @type {Array} - * @memberof Pet - */ - photoUrls: Array; - /** - * - * @type {Array} - * @memberof Pet - */ - tags?: Array; - /** - * pet status in the store - * @type {string} - * @memberof Pet - */ - status?: PetStatusEnum; -} - -export function PetFromJSON(json: any): Pet { - return PetFromJSONTyped(json, false); -} - -export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'category': !exists(json, 'category') ? undefined : CategoryFromJSON(json['category']), - 'name': json['name'], - 'photoUrls': json['photoUrls'], - 'tags': !exists(json, 'tags') ? undefined : ((json['tags'] as Array).map(TagFromJSON)), - 'status': !exists(json, 'status') ? undefined : json['status'], - }; -} - -export function PetToJSON(value?: Pet | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'category': CategoryToJSON(value.category), - 'name': value.name, - 'photoUrls': value.photoUrls, - 'tags': value.tags === undefined ? undefined : ((value.tags as Array).map(TagToJSON)), - 'status': value.status, - }; -} - -/** -* @export -* @enum {string} -*/ -export enum PetStatusEnum { - Available = 'available', - Pending = 'pending', - Sold = 'sold' -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Tag.ts deleted file mode 100644 index 8ea5895e79be..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/Tag.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * A tag for a pet - * @export - * @interface Tag - */ -export interface Tag { - /** - * - * @type {number} - * @memberof Tag - */ - id?: number; - /** - * - * @type {string} - * @memberof Tag - */ - name?: string; -} - -export function TagFromJSON(json: any): Tag { - return TagFromJSONTyped(json, false); -} - -export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'name': !exists(json, 'name') ? undefined : json['name'], - }; -} - -export function TagToJSON(value?: Tag | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'name': value.name, - }; -} - - diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/User.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/User.ts deleted file mode 100644 index 841b50d0fa2e..000000000000 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/models/User.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * OpenAPI Petstore - * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * A User who is purchasing from the pet store - * @export - * @interface User - */ -export interface User { - /** - * - * @type {number} - * @memberof User - */ - id?: number; - /** - * - * @type {string} - * @memberof User - */ - username?: string; - /** - * - * @type {string} - * @memberof User - */ - firstName?: string; - /** - * - * @type {string} - * @memberof User - */ - lastName?: string; - /** - * - * @type {string} - * @memberof User - */ - email?: string; - /** - * - * @type {string} - * @memberof User - */ - password?: string; - /** - * - * @type {string} - * @memberof User - */ - phone?: string; - /** - * User Status - * @type {number} - * @memberof User - */ - userStatus?: number; -} - -export function UserFromJSON(json: any): User { - return UserFromJSONTyped(json, false); -} - -export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'username': !exists(json, 'username') ? undefined : json['username'], - 'firstName': !exists(json, 'firstName') ? undefined : json['firstName'], - 'lastName': !exists(json, 'lastName') ? undefined : json['lastName'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'password': !exists(json, 'password') ? undefined : json['password'], - 'phone': !exists(json, 'phone') ? undefined : json['phone'], - 'userStatus': !exists(json, 'userStatus') ? undefined : json['userStatus'], - }; -} - -export function UserToJSON(value?: User | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'username': value.username, - 'firstName': value.firstName, - 'lastName': value.lastName, - 'email': value.email, - 'password': value.password, - 'phone': value.phone, - 'userStatus': value.userStatus, - }; -} - -