From c4003407647e461589f07b2b3a11aa16b20057f6 Mon Sep 17 00:00:00 2001 From: david-liblab <144702126+david-liblab@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:41:00 -0400 Subject: [PATCH] liblab SDK update for version v2.0.1 --- .manifest.json | 6 +++--- README.md | 10 +++++----- package-lock.json | 4 ++-- package.json | 2 +- src/http/HTTPLibrary.ts | 2 +- src/services/README.md | 4 ++-- test/services/pets/Pets.test.ts | 18 +++++++++--------- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.manifest.json b/.manifest.json index f258adc..d6bb796 100644 --- a/.manifest.json +++ b/.manifest.json @@ -1,6 +1,6 @@ { "liblabVersion": "1.1.43", - "date": "2024-03-26T19:32:17.489Z", + "date": "2024-03-26T19:40:45.301Z", "config": { "authentication": { "access": { @@ -12,7 +12,7 @@ "inputFileName": "/tmp/resources/spec/open-api-spec.json", "environmentVariables": [], "fileOutput": "/tmp", - "tempDir": "/tmp/liblab-codegen-1.1.43-QbwPTq", + "tempDir": "/tmp/liblab-codegen-1.1.43-jbQF01", "inferServiceNames": false, "httpLibrary": { "name": "axios", @@ -25,7 +25,7 @@ "privateRepo": false, "githubRef": "", "sdkName": "Petstoresdk", - "sdkVersion": "2.0.0", + "sdkVersion": "2.0.1", "retry": { "enabled": true, "maxAttempts": 3, diff --git a/README.md b/README.md index 1c12eb3..5c8b6cd 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# Petstoresdk Typescript SDK 2.0.0 +# Petstoresdk Typescript SDK 2.0.1 The Typescript SDK for Petstoresdk. -- API version: 2.0.0 -- SDK version: 2.0.0 +- API version: 2.0.1 +- SDK version: 2.0.1 ## Table of Contents @@ -117,7 +117,7 @@ import { Petstoresdk } from '@dwtestorg/petstorejs'; const sdk = new Petstoresdk({ accessToken: process.env.PETSTORESDK_ACCESS_TOKEN }); (async () => { - const input = { id: -44845070, name: 'name', tag: 'tag' }; + const input = { id: 95984534, name: 'name', tag: 'tag' }; const result = await sdk.pets.createPets(input); console.log(result); })(); @@ -151,7 +151,7 @@ import { Petstoresdk } from '@dwtestorg/petstorejs'; const sdk = new Petstoresdk({ accessToken: process.env.PETSTORESDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.pets.listPets({ limit: -36563714 }); + const result = await sdk.pets.listPets({ limit: -51505111 }); console.log(result); })(); diff --git a/package-lock.json b/package-lock.json index 08d83c1..4e77654 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dwtestorg/petstorejs", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dwtestorg/petstorejs", - "version": "2.0.0", + "version": "2.0.1", "license": "MIT", "dependencies": { "axios": "^1.0.0" diff --git a/package.json b/package.json index fa6cd4c..e6cee03 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "name": "@dwtestorg/petstorejs", "description": "Petstoresdk", - "version": "2.0.0", + "version": "2.0.1", "author": "Petstoresdk", "dependencies": { "axios": "^1.0.0" diff --git a/src/http/HTTPLibrary.ts b/src/http/HTTPLibrary.ts index 9e2ba1d..56a4bd1 100644 --- a/src/http/HTTPLibrary.ts +++ b/src/http/HTTPLibrary.ts @@ -111,7 +111,7 @@ export default class HTTPLibrary implements HTTPClient { } private getUserAgentHeader(): Headers { - const userAgentBase = 'Petstoresdk/2.0.0'; + const userAgentBase = 'Petstoresdk/2.0.1'; let userAgent = ''; if (typeof window !== 'undefined') { diff --git a/src/services/README.md b/src/services/README.md index c5ade10..031d2b7 100644 --- a/src/services/README.md +++ b/src/services/README.md @@ -41,7 +41,7 @@ import { Petstoresdk } from '@dwtestorg/petstorejs'; const sdk = new Petstoresdk({ accessToken: process.env.PETSTORESDK_ACCESS_TOKEN }); (async () => { - const input = { id: -44845070, name: 'name', tag: 'tag' }; + const input = { id: 95984534, name: 'name', tag: 'tag' }; const result = await sdk.pets.createPets(input); console.log(result); })(); @@ -75,7 +75,7 @@ import { Petstoresdk } from '@dwtestorg/petstorejs'; const sdk = new Petstoresdk({ accessToken: process.env.PETSTORESDK_ACCESS_TOKEN }); (async () => { - const result = await sdk.pets.listPets({ limit: -36563714 }); + const result = await sdk.pets.listPets({ limit: -51505111 }); console.log(result); })(); diff --git a/test/services/pets/Pets.test.ts b/test/services/pets/Pets.test.ts index c8c877f..8230c47 100644 --- a/test/services/pets/Pets.test.ts +++ b/test/services/pets/Pets.test.ts @@ -22,9 +22,9 @@ describe('test Pets', () => { describe('test listPets', () => { test('test api call', () => { const scope = nock('http://petstore.swagger.io/v1') - .get('/pets?limit=3') + .get('/pets?limit=2') .reply(200, { data: {} }); - return sdk.pets.listPets({ limit: 3 }).then((r: any) => expect(r.data).toEqual({})); + return sdk.pets.listPets({ limit: 2 }).then((r: any) => expect(r.data).toEqual({})); }); }); @@ -37,22 +37,22 @@ describe('test Pets', () => { describe('test showPetById', () => { test('test api call', () => { - const scope = nock('http://petstore.swagger.io/v1').get('/pets/ab').reply(200, { data: {} }); - return sdk.pets.showPetById('ab').then((r: any) => expect(r.data).toEqual({})); + const scope = nock('http://petstore.swagger.io/v1') + .get('/pets/vero') + .reply(200, { data: {} }); + return sdk.pets.showPetById('vero').then((r: any) => expect(r.data).toEqual({})); }); test('test will throw error if required fields missing', () => { - const scope = nock('http://petstore.swagger.io/v1') - .get('/pets/dolores') - .reply(200, { data: {} }); + const scope = nock('http://petstore.swagger.io/v1').get('/pets/hic').reply(200, { data: {} }); return expect(async () => await sdk.pets.showPetById()).rejects.toThrow(); }); test('test will throw error on a non-200 response', () => { const scope = nock('http://petstore.swagger.io/v1') - .get('/pets/repudiandae') + .get('/pets/assumenda') .reply(404, { data: {} }); - return expect(async () => await sdk.pets.showPetById('repudiandae')).rejects.toThrow(); + return expect(async () => await sdk.pets.showPetById('assumenda')).rejects.toThrow(); }); }); });