Skip to content

Commit be67222

Browse files
committed
Added example for calling the API
1 parent a5774db commit be67222

File tree

6 files changed

+42
-0
lines changed

6 files changed

+42
-0
lines changed

modules/openapi-generator/src/main/resources/typescript/README.mustache

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,11 @@ const config = your_api.createConfiguration(configurationParameters);
6969

7070
// Use configuration with your_api
7171
const api = new your_api.PetApi(config);
72+
your_api.Pet p = new your_api.Pet();
73+
p.name = "My new pet";
74+
p.photoUrls = [];
75+
p.tags = [];
76+
p.status = "available";
77+
Promise<your_api.Pet> createdPet = api.addPet(p);
78+
7279
```

samples/openapi3/client/petstore/typescript/builds/composed-schemas/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,11 @@ const config = your_api.createConfiguration(configurationParameters);
6969

7070
// Use configuration with your_api
7171
const api = new your_api.PetApi(config);
72+
your_api.Pet p = new your_api.Pet();
73+
p.name = "My new pet";
74+
p.photoUrls = [];
75+
p.tags = [];
76+
p.status = "available";
77+
Promise<your_api.Pet> createdPet = api.addPet(p);
78+
7279
```

samples/openapi3/client/petstore/typescript/builds/default/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,11 @@ const config = your_api.createConfiguration(configurationParameters);
6969

7070
// Use configuration with your_api
7171
const api = new your_api.PetApi(config);
72+
your_api.Pet p = new your_api.Pet();
73+
p.name = "My new pet";
74+
p.photoUrls = [];
75+
p.tags = [];
76+
p.status = "available";
77+
Promise<your_api.Pet> createdPet = api.addPet(p);
78+
7279
```

samples/openapi3/client/petstore/typescript/builds/inversify/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,11 @@ const config = your_api.createConfiguration(configurationParameters);
6969

7070
// Use configuration with your_api
7171
const api = new your_api.PetApi(config);
72+
your_api.Pet p = new your_api.Pet();
73+
p.name = "My new pet";
74+
p.photoUrls = [];
75+
p.tags = [];
76+
p.status = "available";
77+
Promise<your_api.Pet> createdPet = api.addPet(p);
78+
7279
```

samples/openapi3/client/petstore/typescript/builds/jquery/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,11 @@ const config = your_api.createConfiguration(configurationParameters);
6969

7070
// Use configuration with your_api
7171
const api = new your_api.PetApi(config);
72+
your_api.Pet p = new your_api.Pet();
73+
p.name = "My new pet";
74+
p.photoUrls = [];
75+
p.tags = [];
76+
p.status = "available";
77+
Promise<your_api.Pet> createdPet = api.addPet(p);
78+
7279
```

samples/openapi3/client/petstore/typescript/builds/object_params/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,11 @@ const config = your_api.createConfiguration(configurationParameters);
6969

7070
// Use configuration with your_api
7171
const api = new your_api.PetApi(config);
72+
your_api.Pet p = new your_api.Pet();
73+
p.name = "My new pet";
74+
p.photoUrls = [];
75+
p.tags = [];
76+
p.status = "available";
77+
Promise<your_api.Pet> createdPet = api.addPet(p);
78+
7279
```

0 commit comments

Comments
 (0)