Skip to content

Commit

Permalink
Merge pull request #14 from liblaber/v2.0.1-1711482059044
Browse files Browse the repository at this point in the history
liblab SDK update v2.0.1
  • Loading branch information
david-liblab authored Mar 26, 2024
2 parents 8619dd6 + c400340 commit 753dfad
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .manifest.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -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",
Expand All @@ -25,7 +25,7 @@
"privateRepo": false,
"githubRef": "",
"sdkName": "Petstoresdk",
"sdkVersion": "2.0.0",
"sdkVersion": "2.0.1",
"retry": {
"enabled": true,
"maxAttempts": 3,
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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);
})();
Expand Down Expand Up @@ -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);
})();

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"name": "@dwtestorg/petstorejs",
"description": "Petstoresdk",
"version": "2.0.0",
"version": "2.0.1",
"author": "Petstoresdk",
"dependencies": {
"axios": "^1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/http/HTTPLibrary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
4 changes: 2 additions & 2 deletions src/services/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})();
Expand Down Expand Up @@ -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);
})();

Expand Down
18 changes: 9 additions & 9 deletions test/services/pets/Pets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({}));
});
});

Expand All @@ -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();
});
});
});

0 comments on commit 753dfad

Please sign in to comment.