Skip to content

Commit 3141c5d

Browse files
zoo-github-actions-auth[bot]github-actions[bot]lee-at-zoo-corp
authored
Update api spec (#331)
* YOYO NEW API SPEC! * Add expected failing tests to expectedToFail (5XX) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: lee-at-zoo-corp <[email protected]>
1 parent b29bd11 commit 3141c5d

10 files changed

+268
-132
lines changed

__tests__/gen/ml-create_proprietary_to_kcl.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ async function example() {
88
data: new Blob(['thing = 1'], { type: 'text/plain' }),
99
},
1010
],
11+
code_option: 'execute',
1112
});
1213
if ('error_code' in response) throw response;
1314

__tests__/gen/users-patch_user_crm.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ async function example() {
44
const response = await users.patch_user_crm({
55
body: {
66
cad_industry: 'The industry of the user.',
7-
cad_user_count: 'The user count of the user.',
87
cad_user_type: 'The user type.',
8+
number_of_cad_users: 'The user count of the user.',
99
},
1010
});
1111
if ('error_code' in response) throw response;
@@ -15,6 +15,10 @@ async function example() {
1515

1616
describe('Testing users.patch_user_crm', () => {
1717
it('should be truthy or throw', async () => {
18-
expect(await example()).toBeTruthy();
18+
try {
19+
await example();
20+
} catch (err) {
21+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
22+
}
1923
});
2024
});

__tests__/gen/users-put_public_form.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ async function example() {
2020

2121
describe('Testing users.put_public_form', () => {
2222
it('should be truthy or throw', async () => {
23-
expect(await example()).toBeTruthy();
23+
try {
24+
await example();
25+
} catch (err) {
26+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
27+
}
2428
});
2529
});

__tests__/gen/users-put_public_subscribe.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ async function example() {
1111

1212
describe('Testing users.put_public_subscribe', () => {
1313
it('should be truthy or throw', async () => {
14-
expect(await example()).toBeTruthy();
14+
try {
15+
await example();
16+
} catch (err) {
17+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
18+
}
1519
});
1620
});

__tests__/gen/users-put_user_form_self.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ async function example() {
2020

2121
describe('Testing users.put_user_form_self', () => {
2222
it('should be truthy or throw', async () => {
23-
expect(await example()).toBeTruthy();
23+
try {
24+
await example();
25+
} catch (err) {
26+
expect(err).toBeTruthy(); // eslint-disable-line jest/no-conditional-expect
27+
}
2428
});
2529
});

kittycad.ts.patch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@
315315
"op": "add",
316316
"path": "/paths/~1user~1crm/patch/x-typescript",
317317
"value": {
318-
"example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.patch_user_crm({\n body: {\n cad_industry: 'The industry of the user.',\n cad_user_count: 'The user count of the user.',\n cad_user_type: 'The user type.',\n },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
318+
"example": "import { users } from '@kittycad/lib'\n\nasync function example() {\n const response = await users.patch_user_crm({\n body: {\n cad_industry: 'The industry of the user.',\n cad_user_type: 'The user type.',\n number_of_cad_users: 'The user count of the user.',\n },\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
319319
"libDocsLink": ""
320320
}
321321
},
@@ -931,7 +931,7 @@
931931
"op": "add",
932932
"path": "/paths/~1ml~1convert~1proprietary-to-kcl/post/x-typescript",
933933
"value": {
934-
"example": "import { ml } from '@kittycad/lib'\n\nasync function example() {\n const response = await ml.create_proprietary_to_kcl({\n files: [\n {\n name: 'thing.kcl',\n data: new Blob(['thing = 1'], { type: 'text/plain' }),\n },\n ],\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
934+
"example": "import { ml } from '@kittycad/lib'\n\nasync function example() {\n const response = await ml.create_proprietary_to_kcl({\n files: [\n {\n name: 'thing.kcl',\n data: new Blob(['thing = 1'], { type: 'text/plain' }),\n },\n ],\n code_option: 'execute',\n })\n if ('error_code' in response) throw response\n console.log(JSON.stringify(response, null, 2))\n}\n",
935935
"libDocsLink": ""
936936
}
937937
},

0 commit comments

Comments
 (0)