,\n $ref: '#\u002Fcomponents\u002Fschemas\u002FOrder',\n },\n },\n 'application\u002Fxml': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FOrder',\n },\n },\n 'application\u002Fx-www-form-urlencoded': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FOrder',\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FOrder',\n },\n },\n },\n },\n '405': {\n description: 'Invalid input',\n },\n },\n },\n patch: {\n tags: ['store'],\n summary: 'Place an order for a pet with patch',\n description: 'Place a new order in the store with patch',\n operationId: 'placeOrderPatch',\n requestBody: {\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FOrder',\n },\n },\n 'application\u002Fxml': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FOrder',\n },\n },\n 'application\u002Fx-www-form-urlencoded': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FOrder',\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FOrder',\n },\n },\n },\n },\n '405': {\n description: 'Invalid input',\n },\n },\n },\n },\n '\u002Fstore\u002Forder\u002F{orderId}': {\n get: {\n tags: ['store'],\n summary: 'Find purchase order by ID',\n description: 'For valid response try integer IDs with value \u003C= 5 or \u003E 10. Other values will generate exceptions.',\n operationId: 'getOrderById',\n parameters: [\n {\n name: 'orderId',\n in: 'path',\n description: 'ID of order that needs to be fetched',\n required: true,\n schema: {\n type: 'integer',\n format: 'int64',\n },\n },\n ],\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FOrder',\n },\n },\n 'application\u002Fxml': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FOrder',\n },\n },\n },\n },\n '400': {\n description: 'Invalid ID supplied',\n },\n '404': {\n description: 'Order not found',\n },\n },\n },\n delete: {\n tags: ['store'],\n summary: 'Delete purchase order by ID',\n description: 'For valid response try integer IDs with value \u003C 1000. Anything above 1000 or nonintegers will generate API errors',\n operationId: 'deleteOrder',\n parameters: [\n {\n name: 'orderId',\n in: 'path',\n description: 'ID of the order that needs to be deleted',\n required: true,\n schema: {\n type: 'integer',\n format: 'int64',\n },\n },\n ],\n responses: {\n '400': {\n description: 'Invalid ID supplied',\n },\n '404': {\n description: 'Order not found',\n },\n },\n },\n },\n '\u002Fuser': {\n post: {\n tags: ['user'],\n summary: 'Create user',\n description: 'This can only be done by the logged in user.',\n operationId: 'createUser',\n requestBody: {\n description: 'Created user object',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n 'application\u002Fxml': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n 'application\u002Fx-www-form-urlencoded': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n },\n },\n responses: {\n default: {\n description: 'successful operation',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n 'application\u002Fxml': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n },\n },\n },\n },\n },\n '\u002Fuser\u002FcreateWithList': {\n post: {\n tags: ['user'],\n summary: 'Creates list of users with given input array',\n description: 'Creates list of users with given input array',\n operationId: 'createUsersWithListInput',\n requestBody: {\n content: {\n 'application\u002Fjson': {\n schema: {\n type: 'array',\n items: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'Successful operation',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n 'application\u002Fxml': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n },\n },\n default: {\n description: 'successful operation',\n },\n },\n },\n },\n '\u002Fuser\u002Flogin': {\n get: {\n tags: ['user'],\n summary: 'Logs user into the system',\n description: '',\n operationId: 'loginUser',\n parameters: [\n {\n name: 'username',\n in: 'query',\n description: 'The user name for login',\n required: false,\n schema: {\n type: 'string',\n },\n },\n {\n name: 'password',\n in: 'query',\n description: 'The password for login in clear text',\n required: false,\n schema: {\n type: 'string',\n },\n },\n ],\n responses: {\n '200': {\n description: 'successful operation',\n headers: {\n 'X-Rate-Limit': {\n description: 'calls per hour allowed by the user',\n schema: {\n type: 'integer',\n format: 'int32',\n },\n },\n 'X-Expires-After': {\n description: 'date in UTC when token expires',\n schema: {\n type: 'string',\n format: 'date-time',\n },\n },\n },\n content: {\n 'application\u002Fxml': {\n schema: {\n type: 'string',\n },\n },\n 'application\u002Fjson': {\n schema: {\n type: 'string',\n },\n },\n },\n },\n '400': {\n description: 'Invalid username\u002Fpassword supplied',\n },\n },\n },\n },\n '\u002Fuser\u002Flogout': {\n get: {\n tags: ['user'],\n summary: 'Logs out current logged in user session',\n description: '',\n operationId: 'logoutUser',\n parameters: [],\n responses: {\n default: {\n description: 'successful operation',\n },\n },\n },\n },\n '\u002Fuser\u002F{username}': {\n get: {\n tags: ['user'],\n summary: 'Get user by user name',\n description: '',\n operationId: 'getUserByName',\n parameters: [\n {\n name: 'username',\n in: 'path',\n description: 'The name that needs to be fetched. Use user1 for testing. ',\n required: true,\n schema: {\n type: 'string',\n },\n },\n ],\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n 'application\u002Fxml': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n },\n },\n '400': {\n description: 'Invalid username supplied',\n },\n '404': {\n description: 'User not found',\n },\n },\n },\n put: {\n tags: ['user'],\n summary: 'Update user',\n description: 'This can only be done by the logged in user.',\n operationId: 'updateUser',\n parameters: [\n {\n name: 'username',\n in: 'path',\n description: 'name that need to be deleted',\n required: true,\n schema: {\n type: 'string',\n },\n },\n ],\n requestBody: {\n description: 'Update an existent user in the store',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n 'application\u002Fxml': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n 'application\u002Fx-www-form-urlencoded': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n },\n },\n responses: {\n default: {\n description: 'successful operation',\n },\n },\n },\n delete: {\n tags: ['user'],\n summary: 'Delete user',\n description: 'This can only be done by the logged in user.',\n operationId: 'deleteUser',\n parameters: [\n {\n name: 'username',\n in: 'path',\n description: 'The name that needs to be deleted',\n required: true,\n schema: {\n type: 'string',\n nullable: true,\n },\n },\n ],\n responses: {\n '400': {\n description: 'Invalid username supplied',\n },\n '404': {\n description: 'User not found',\n },\n },\n },\n },\n },\n components: {\n schemas: {\n Order: {\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n format: 'int64',\n example: 10,\n },\n petId: {\n type: 'integer',\n format: 'int64',\n example: 198772,\n },\n quantity: {\n type: 'integer',\n format: 'int32',\n example: 7,\n },\n shipDate: {\n type: 'string',\n format: 'date-time',\n },\n status: {\n description: 'Order Status',\n anyOf: [\n {\n type: 'string',\n const: '',\n },\n {\n type: 'string',\n format: 'email',\n },\n ],\n },\n http_status: {\n type: 'number',\n description: 'HTTP Status',\n example: 200,\n enum: [200, 400, 500],\n },\n complete: {\n type: 'boolean',\n },\n },\n xml: {\n name: 'order',\n },\n },\n Customer: {\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n format: 'int64',\n example: 100000,\n },\n username: {\n type: 'string',\n example: 'fehguy',\n },\n address: {\n type: 'array',\n xml: {\n name: 'addresses',\n wrapped: true,\n },\n items: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FAddress',\n },\n },\n },\n xml: {\n name: 'customer',\n },\n },\n HappyCustomer: {\n allOf: [\n {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FCustomer',\n },\n {\n type: 'object',\n properties: {\n isHappy: {\n type: 'boolean',\n const: true,\n },\n },\n },\n ],\n },\n UnhappyCustomer: {\n allOf: [\n {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FCustomer',\n },\n {\n type: 'object',\n properties: {\n reasonToBeUnhappy: {\n type: 'string',\n },\n isHappy: {\n type: 'boolean',\n const: false,\n },\n },\n },\n ],\n },\n Address: {\n type: 'object',\n properties: {\n streetName: {\n type: 'string',\n },\n streetNumber: {\n type: 'string',\n },\n city: {\n type: 'string',\n example: 'Palo Alto',\n },\n state: {\n type: 'string',\n example: 'CA',\n },\n zip: {\n type: 'string',\n example: '94301',\n },\n },\n xml: {\n name: 'address',\n },\n },\n Category: {\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n format: 'int64',\n example: 1,\n },\n name: {\n type: 'string',\n example: 'Dogs',\n },\n },\n xml: {\n name: 'category',\n },\n },\n User: {\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n format: 'int64',\n example: 10,\n },\n username: {\n type: 'string',\n example: 'theUser',\n },\n firstName: {\n type: 'string',\n example: 'John',\n },\n lastName: {\n type: 'string',\n example: 'James',\n },\n email: {\n type: 'string',\n example: 'john@email.com',\n },\n password: {\n type: 'string',\n example: '12345',\n },\n phone: {\n type: 'string',\n example: '12345',\n },\n userStatus: {\n type: 'integer',\n description: 'User Status',\n format: 'int32',\n example: 1,\n },\n },\n xml: {\n name: 'user',\n },\n },\n Tag: {\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n format: 'int64',\n },\n name: {\n type: 'string',\n },\n },\n xml: {\n name: 'tag',\n },\n },\n Pet: {\n required: ['name', 'photoUrls', 'type'],\n type: 'object',\n oneOf: [\n {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FDog',\n },\n {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FCat',\n },\n ],\n discriminator: {\n propertyName: 'type',\n mapping: {\n dog: '#\u002Fcomponents\u002Fschemas\u002FDog',\n cat: '#\u002Fcomponents\u002Fschemas\u002FCat',\n },\n },\n properties: {\n id: {\n type: 'integer',\n format: 'int64',\n example: 10,\n },\n type: {\n minLength: 1,\n enum: ['dog', 'cat'],\n type: 'string',\n readOnly: true,\n },\n name: {\n type: 'string',\n example: 'doggie',\n },\n category: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FCategory',\n },\n photoUrls: {\n type: 'array',\n xml: {\n wrapped: true,\n },\n items: {\n type: 'string',\n xml: {\n name: 'photoUrl',\n },\n },\n },\n tags: {\n type: 'array',\n xml: {\n wrapped: true,\n },\n readOnly: true,\n items: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FTag',\n },\n },\n status: {\n type: 'string',\n description: 'pet status in the store',\n enum: ['available', 'pending', 'sold'],\n },\n },\n xml: {\n name: 'pet',\n },\n },\n Cat: {\n type: 'object',\n properties: {\n type: {\n minLength: 1,\n type: 'string',\n readOnly: true,\n },\n name: {\n type: 'string',\n },\n },\n },\n Dog: {\n type: 'object',\n properties: {\n type: {\n minLength: 1,\n type: 'string',\n readOnly: true,\n },\n bark: {\n type: 'string',\n },\n },\n },\n FullAddress: {\n properties: {\n streetName: {\n type: 'string',\n },\n },\n allOf: [\n {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FAddress',\n },\n ],\n required: ['streetName', 'streetNumber'],\n },\n AddPetRequest: {\n required: ['name', 'photoUrls'],\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n format: 'int64',\n example: 10,\n },\n name: {\n type: 'string',\n example: 'doggie',\n },\n category: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FCategory',\n },\n photoUrls: {\n type: 'array',\n xml: {\n wrapped: true,\n },\n items: {\n type: 'string',\n xml: {\n name: 'photoUrl',\n },\n },\n },\n tags: {\n type: 'array',\n xml: {\n wrapped: true,\n },\n items: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FTag',\n },\n },\n status: {\n type: 'string',\n description: 'pet status in the store',\n enum: ['available', 'pending', 'sold', 'in store'],\n },\n },\n xml: {\n name: 'pet',\n },\n },\n ApiResponse: {\n type: 'object',\n properties: {\n code: {\n type: 'integer',\n format: 'int32',\n },\n type: {\n type: 'string',\n },\n message: {\n type: 'string',\n },\n },\n xml: {\n name: '##default',\n },\n },\n },\n requestBodies: {\n Pet: {\n description: 'Pet object that needs to be added to the store',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FPet',\n },\n },\n 'application\u002Fxml': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FPet',\n },\n },\n },\n },\n UserArray: {\n description: 'List of user object',\n content: {\n 'application\u002Fjson': {\n schema: {\n type: 'array',\n items: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FUser',\n },\n },\n },\n },\n },\n },\n securitySchemes: {\n petstore_auth: {\n type: 'oauth2',\n flows: {\n implicit: {\n authorizationUrl: 'https:\u002F\u002Fpetstore3.swagger.io\u002Foauth\u002Fauthorize',\n scopes: {\n 'write:pets': 'modify pets in your account',\n 'read:pets': 'read your pets',\n },\n },\n },\n },\n api_key: {\n type: 'apiKey',\n name: 'api_key',\n in: 'header',\n },\n },\n parameters: {\n page: {\n description: 'to request with required page number or pagination',\n in: 'query',\n name: 'page',\n required: false,\n schema: {\n type: 'string',\n },\n },\n pageSize: {\n description: 'to request with required page size',\n in: 'query',\n name: 'pageSize',\n required: false,\n schema: {\n type: 'string',\n },\n },\n },\n responses: {\n PetNotFound: {\n content: {\n 'application\u002Fjson': {\n schema: {\n properties: {\n code: {\n format: 'int32',\n type: 'integer',\n },\n message: {\n type: 'string',\n },\n },\n },\n },\n },\n description: 'Pet not found',\n },\n },\n },\n} as const\n\nexport type Oas = Infer\u003Ctypeof oas\u003E\n","id":"mod_QKcrQ1e1muEo3kwL3BgRT","is_binary":false,"title":"oas.ts","sha":null,"inserted_at":"2025-11-25T08:55:49","updated_at":"2025-11-25T08:55:49","upload_id":null,"shortid":"b-bxf4CzV6W","source_id":"src_ACx4ULRgBjwERtcX7Qj4oL","directory_shortid":"H6gyXD5L-R"},{"code":"export * from '.\u002Fgen\u002Fts\u002Fmodels\u002Findex.ts'\nexport * as types from '.\u002Ftypes.ts'\n","id":"mod_E5RzgePJ47S724vXgAeGHN","is_binary":false,"title":"index.ts","sha":null,"inserted_at":"2025-11-25T08:55:49","updated_at":"2025-11-25T08:55:49","upload_id":null,"shortid":"QF5w3BrBivZ","source_id":"src_ACx4ULRgBjwERtcX7Qj4oL","directory_shortid":"yOL99u75g"},{"code":"import type { Infer, Model, RequestParams, Response } from '@kubb\u002Foas'\n\nimport type { Oas as GeneratedOas } from '.\u002Fgen\u002Fts\u002Fmodels\u002Foas'\n\nexport type UserModel = Model\u003CGeneratedOas, 'User'\u003E\n\nconst oas = {\n openapi: '3.0.1',\n info: {\n title: 'Swagger Petstore',\n description: 'A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification',\n termsOfService: 'http:\u002F\u002Fswagger.io\u002Fterms\u002F',\n contact: {\n name: 'Swagger API Team',\n },\n license: {\n name: 'MIT',\n },\n version: '1.0.0',\n },\n servers: [\n {\n url: 'http:\u002F\u002Fpetstore.swagger.io\u002Fapi',\n },\n ],\n paths: {\n '\u002Fpets': {\n get: {\n description: 'Returns all pets from the system that the user has access to',\n operationId: 'findPets',\n parameters: [\n {\n name: 'tags',\n in: 'query',\n description: 'tags to filter by',\n style: 'form',\n explode: false,\n schema: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n {\n name: 'limit',\n in: 'query',\n description: 'maximum number of results to return',\n schema: {\n type: 'integer',\n format: 'int32',\n },\n },\n ],\n responses: {\n '200': {\n description: 'pet response',\n content: {\n 'application\u002Fjson': {\n schema: {\n type: 'array',\n items: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FPet',\n },\n },\n },\n },\n },\n default: {\n description: 'unexpected error',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FErrorModel',\n },\n },\n },\n },\n },\n },\n post: {\n description: 'Creates a new pet in the store. Duplicates are allowed',\n operationId: 'addPet',\n requestBody: {\n description: 'Pet to add to the store',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FNewPet',\n },\n },\n },\n required: true,\n },\n responses: {\n '200': {\n description: 'pet response',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FPet',\n },\n },\n },\n },\n default: {\n description: 'unexpected error',\n content: {\n 'application\u002Fjson': {\n schema: {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FErrorModel',\n },\n },\n },\n },\n },\n 'x-codegen-request-body-name': 'pet',\n },\n },\n },\n components: {\n schemas: {\n Pet: {\n allOf: [\n {\n $ref: '#\u002Fcomponents\u002Fschemas\u002FNewPet',\n },\n {\n required: ['id'],\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n format: 'int64',\n },\n },\n },\n ],\n },\n NewPet: {\n required: ['name'],\n type: 'object',\n properties: {\n name: {\n type: 'string',\n },\n tag: {\n type: 'string',\n },\n },\n },\n ErrorModel: {\n required: ['code', 'message'],\n type: 'object',\n properties: {\n code: {\n type: 'integer',\n format: 'int32',\n },\n message: {\n type: 'string',\n },\n },\n },\n },\n },\n} as const\n\ntype Oas = Infer\u003Ctypeof oas\u003E\n\nexport type Pet = Model\u003COas, 'Pet'\u003E\n\u002F\u002F ^?\n\nexport type AddPet = RequestParams\u003COas, '\u002Fpets', 'post'\u003E\n\u002F\u002F ^?\n\nexport type AddPetResponse = Response\u003COas, '\u002Fpets', 'post'\u003E\n\u002F\u002F ^?\n","id":"mod_LFd6k11naWSQCKK5GWJG8m","is_binary":false,"title":"types.ts","sha":null,"inserted_at":"2025-11-25T08:55:49","updated_at":"2025-11-25T08:55:49","upload_id":null,"shortid":"L01QbsJvU6k","source_id":"src_ACx4ULRgBjwERtcX7Qj4oL","directory_shortid":"yOL99u75g"},{"code":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \u002F* If NOT transpiling with TypeScript: *\u002F\n \"module\": \"ES2020\",\n \"moduleResolution\": \"node\",\n \"sourceMap\": true,\n \"strictNullChecks\": true,\n \"jsx\": \"react-jsx\",\n \"outDir\": \"es\",\n \"experimentalDecorators\": true,\n \"skipLibCheck\": true,\n \"baseUrl\": \".\",\n \"resolveJsonModule\": true,\n \"esModuleInterop\": true,\n \"allowJs\": true,\n \"allowImportingTsExtensions\": true,\n \"noEmit\": true,\n \"alwaysStrict\": true,\n \"strict\": true\n },\n \"include\": [\".\u002Fsrc\u002F**\u002F*\"],\n \"exclude\": [\"**\u002Fnode_modules\", \"**\u002Ftypes\u002F**\", \"**\u002Fmocks\u002F**\"]\n}\n","id":"mod_XkdhtiV96hnfVKRAgE7N9h","is_binary":false,"title":"tsconfig.json","sha":null,"inserted_at":"2025-11-25T08:55:49","updated_at":"2025-11-25T08:55:49","upload_id":null,"shortid":"9ign4mfQdLV","source_id":"src_ACx4ULRgBjwERtcX7Qj4oL","directory_shortid":null}],"is_frozen":false,"permissions":{"prevent_sandbox_export":false,"prevent_sandbox_leaving":false},"v2":false,"title":"typescript-pet-store","version":178,"author":null,"npm_registries":[],"restrictions":{"free_plan_editing_restricted":false,"live_sessions_restricted":true},"id":"jkhmyd","sdk":false,"screenshot_url":"https:\u002F\u002Fscreenshots.codesandbox.io\u002Fjkhmyd\u002F178.png","preview_secret":null,"like_count":0,"inserted_at":"2024-04-14T10:39:51","team":null,"view_count":143942,"forked_template":null,"settings":{"ai_consent":null,"use_pint":false},"forked_template_sandbox":null,"template":"create-react-app","owned":false,"forked_from_sandbox":null,"collection":false,"user_liked":false,"npm_dependencies":{},"original_git":null};