Skip to content

Commit c328295

Browse files
committed
fix passing payload to POST/PUT/PATCH endpoints
...that require excluding readonly properties from the generated model (made possible by contributions to openapi-typescript-codegen via tiholic/openapi-typescript-codegen)
1 parent d002818 commit c328295

18 files changed

+226
-322
lines changed

DeveloperNotes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Major part of this sdk is generated from
44
OpenAPI Spec obtained from the api docs.
55

6+
#### installing "openapi-typescript-codegen"
7+
8+
If "openapi-typescript-codegen" dependency is pointing to a local path, clone [tiholic/openapi-typescript-codegen](https://github.com/tiholic/openapi-typescript-codegen)
9+
into that location and switch to desired branch
10+
611
#### Generation from Spec
712

813
Whenever there are new changes to APIs, the openapi

examples/basic.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@ import { client } from '../src';
22

33
async function run() {
44
await client.authenticate();
5-
if (await client.isAuthenticated()) {
5+
const is_authenticated = await client.isAuthenticated();
6+
console.log(is_authenticated);
7+
if (is_authenticated) {
68
console.log(await client.FoldersService.listFolders({}));
79
console.log(await client.TemplatesService.listTemplates({}));
10+
console.log(
11+
await client.FoldersService.createFolder({
12+
requestBody: {
13+
name: 'Docupilot SDK Folder',
14+
},
15+
}),
16+
);
817
}
918
}
1019

0 commit comments

Comments
 (0)