1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "specUrls": [
12 "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/e77481c73e1c703c7de2e4249047b42b8e9b56f4/examples/v3.0/petstore.json",
13 "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/e77481c73e1c703c7de2e4249047b42b8e9b56f4/examples/v3.0/api-with-examples.json"
14 ],
15 "profile": "partner-publication",
16 "checkServerReachability": true,
17 "maxOperationsPerSpec": 1000,
18 "maxDefectsPerSpec": 500,
19 "timeoutSecs": 30,
20 "maxRedirects": 5,
21 "maxResponseBytes": 20000000
22};
23
24
25const run = await client.actor("kingii98/openapi-publish-readiness-and-example-conformance-gate").call(input);
26
27
28console.log('Results from dataset');
29console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
30const { items } = await client.dataset(run.defaultDatasetId).listItems();
31items.forEach((item) => {
32 console.dir(item);
33});
34
35