From 326e953c895df58f2a58a558b06bc6517c19525d Mon Sep 17 00:00:00 2001 From: Marc Cuva Date: Tue, 6 Feb 2024 11:14:09 -0500 Subject: [PATCH] feat(node): new unified code snippet for both the webhook and metrics (#879) Redo the node code snippet for the webhook/metrics! We now have one code snippet that handles both cases super easily. ```javascript import { ReadMe } from 'readmeio' const readme = ReadMe('API_KEY') router.use( readme(async (req, getUser) => { // We pass in getUser which will call the correct function to fetch a // user depending on what we have in the request const user = getUser({ byEmail: getUserByEmail, // Function defined by them that returns a user given an email address byAPIKey: getUserByAPIKey, // Function defined by them that returns a user given an API key manualAPIKey: getAPIKey(req.headers.authorization), // Optional way to explicitly tell us the api key if we can't guess it }); return { name: user.name, email: user.email, keys: user.apiKeys, }; }, { development: process.env.NODE_ENV === 'development', // require development: true to show local testing page }) ); ``` Other things: * Added a /readme-setup page that walks users through making sure everything is configured properly. This page is only enabled if `development: true` to make sure that it won't be enabled in prod on accident. * Handles all of the metrics config in additional options parameter (which is optional) * Exported everything that was already there, so this is purely additive * User provided function should return all of the information about the user, even if it's not relevant for the specific API call that is happening. This means we can have one set of config for the webhook and metrics and the sdk will just figure out what is relevant for the call to metrics. * Makes a call to the ReadMe API to get the JWT Secret & stable version (for linking to the dash) ### Update 1/31 * I renamed some of the exports to clean it up a bit. Now we just have a `ReadMe` export that you call to pass in the API Key. Before we had a separate `auth` export that was required to be called before the middelware, which was confusing. This also cleans up how you call it (no more readmeio.readme stuff). This matches Sentry's sdks closer which makes me feel better about it. ## Testing * Install `readmeio@next` to test the new snippet * Docs on setup here: https://docs.readme.com/main/docs/unified-snippet-docs * PR for readme's api here: https://github.com/readmeio/readme/pull/10819 Things to look out for: * Do the docs make sense? * Issues with copy in the local setup page? * Testing various APIs (with various auth types) --------- Co-authored-by: Tony Li Co-authored-by: Kanad Gupta Co-authored-by: Kanad Gupta <8854718+kanadgupta@users.noreply.github.com> Co-authored-by: Jon Ursenbach Co-authored-by: Bill Mill Co-authored-by: Aaron Hedges <218751+Dashron@users.noreply.github.com> Co-authored-by: James Clark Co-authored-by: James Clark --- .prettierignore | 1 + package-lock.json | 1238 +- package.json | 4 +- packages/node/package.json | 5 +- packages/node/src/.api/api.json | 11 + .../node/src/.api/apis/developers/index.ts | 487 + .../src/.api/apis/developers/openapi.json | 13624 ++++++++++++++++ .../node/src/.api/apis/developers/schemas.ts | 73 + .../node/src/.api/apis/developers/types.ts | 131 + packages/node/src/index.ts | 3 +- packages/node/src/lib/ReadMe.ts | 219 + packages/node/src/lib/find-api-key.ts | 37 + packages/node/src/lib/get-group-id.ts | 203 + packages/node/src/lib/log.ts | 2 + packages/node/src/lib/setup-readme-view.ts | 587 + packages/node/src/lib/test-verify-webhook.ts | 91 + packages/node/test/index.test.ts | 125 +- packages/node/test/lib/find-api-key.test.ts | 62 + packages/node/test/lib/get-group-id.test.ts | 290 + packages/node/tsconfig.json | 1 + 20 files changed, 16984 insertions(+), 210 deletions(-) create mode 100644 packages/node/src/.api/api.json create mode 100644 packages/node/src/.api/apis/developers/index.ts create mode 100644 packages/node/src/.api/apis/developers/openapi.json create mode 100644 packages/node/src/.api/apis/developers/schemas.ts create mode 100644 packages/node/src/.api/apis/developers/types.ts create mode 100644 packages/node/src/lib/ReadMe.ts create mode 100644 packages/node/src/lib/find-api-key.ts create mode 100644 packages/node/src/lib/get-group-id.ts create mode 100644 packages/node/src/lib/setup-readme-view.ts create mode 100644 packages/node/src/lib/test-verify-webhook.ts create mode 100644 packages/node/test/lib/find-api-key.test.ts create mode 100644 packages/node/test/lib/get-group-id.test.ts diff --git a/.prettierignore b/.prettierignore index d37e1775d0..c603d4501c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,6 @@ packages/cloudflare-worker/coverage/ packages/cloudflare-worker/dist/ +packages/node/src/.api/ packages/node/coverage/ packages/node/dist/ packages/php/examples/ diff --git a/package-lock.json b/package-lock.json index 02862f1b94..b0a300cc97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,11 +50,23 @@ "node": ">=6.0.0" } }, + "node_modules/@apidevtools/openapi-schemas": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz", + "integrity": "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/@apidevtools/swagger-methods": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz", + "integrity": "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==" + }, "node_modules/@babel/code-frame": { "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", - "dev": true, "dependencies": { "@babel/highlight": "^7.22.10", "chalk": "^2.4.2" @@ -67,7 +79,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -79,7 +90,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -93,7 +103,6 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "dependencies": { "color-name": "1.1.3" } @@ -101,14 +110,12 @@ "node_modules/@babel/code-frame/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/@babel/code-frame/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, "engines": { "node": ">=4" } @@ -117,7 +124,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -129,7 +135,6 @@ "version": "7.22.5", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -138,7 +143,6 @@ "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", - "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.5", "chalk": "^2.4.2", @@ -152,7 +156,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -164,7 +167,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -178,7 +180,6 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "dependencies": { "color-name": "1.1.3" } @@ -186,14 +187,12 @@ "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, "engines": { "node": ">=4" } @@ -202,7 +201,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -211,12 +209,11 @@ } }, "node_modules/@babel/runtime": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz", - "integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==", - "dev": true, + "version": "7.23.8", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.8.tgz", + "integrity": "sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==", "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" @@ -977,12 +974,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -993,18 +984,6 @@ "concat-map": "0.0.1" } }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1026,6 +1005,11 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@exodus/schemasafe": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@exodus/schemasafe/-/schemasafe-1.3.0.tgz", + "integrity": "sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==" + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", @@ -1075,6 +1059,14 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@humanwhocodes/momoa": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-2.0.4.tgz", + "integrity": "sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==", + "engines": { + "node": ">=10.10.0" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -1160,6 +1152,11 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" + }, "node_modules/@mswjs/cookies": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@mswjs/cookies/-/cookies-0.2.2.tgz", @@ -1205,7 +1202,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1218,7 +1214,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, "engines": { "node": ">= 8" } @@ -1227,7 +1222,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1367,10 +1361,38 @@ "node": ">=12" } }, + "node_modules/@readme/better-ajv-errors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@readme/better-ajv-errors/-/better-ajv-errors-1.6.0.tgz", + "integrity": "sha512-9gO9rld84Jgu13kcbKRU+WHseNhaVt76wYMeRDGsUGYxwJtI3RmEJ9LY9dZCYQGI8eUZLuxb5qDja0nqklpFjQ==", + "dependencies": { + "@babel/code-frame": "^7.16.0", + "@babel/runtime": "^7.21.0", + "@humanwhocodes/momoa": "^2.0.3", + "chalk": "^4.1.2", + "json-to-ast": "^2.0.3", + "jsonpointer": "^5.0.0", + "leven": "^3.1.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "ajv": "4.11.8 - 8" + } + }, "node_modules/@readme/cloudflare-worker": { "resolved": "packages/cloudflare-worker", "link": true }, + "node_modules/@readme/data-urls": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@readme/data-urls/-/data-urls-1.0.1.tgz", + "integrity": "sha512-FNP4ntG5rCgmrvQGoNH/Ljivc6jSWaaVeMuXneOyQ6oLuhm/NkysXJN3DnBrIsJUJbSae7qIs2QfPYnaropoHw==", + "engines": { + "node": ">=14" + } + }, "node_modules/@readme/eslint-config": { "version": "12.1.0", "resolved": "https://registry.npmjs.org/@readme/eslint-config/-/eslint-config-12.1.0.tgz", @@ -1610,6 +1632,11 @@ "node": ">=10" } }, + "node_modules/@readme/http-status-codes": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@readme/http-status-codes/-/http-status-codes-7.2.0.tgz", + "integrity": "sha512-/dBh9qw3QhJYqlGwt2I+KUP/lQ6nytdCx3aq+GpMUhibLHF3O7fwoowNcTwlbnwtyJ+TJYTIIrp3oVUlRNx3fA==" + }, "node_modules/@readme/httpsnippet": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/@readme/httpsnippet/-/httpsnippet-6.2.1.tgz", @@ -1690,10 +1717,118 @@ "through": "~2.3.4" } }, + "node_modules/@readme/json-schema-ref-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@readme/json-schema-ref-parser/-/json-schema-ref-parser-1.2.0.tgz", + "integrity": "sha512-Bt3QVovFSua4QmHa65EHUmh2xS0XJ3rgTEUPH998f4OW4VVJke3BuS16f+kM0ZLOGdvIrzrPRqwihuv5BAjtrA==", + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, "node_modules/@readme/metrics-sdk-snippets": { "resolved": "packages/sdk-snippets", "link": true }, + "node_modules/@readme/oas-extensions": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@readme/oas-extensions/-/oas-extensions-17.0.1.tgz", + "integrity": "sha512-PCU7WLz8TkbdxsiE4eQGvJYDYZQPiyLhXme3SvLboSmH+8G6AJPJ5OymzSAdlf5sXpSSoD2q3dTIou3Cb2DirQ==", + "deprecated": "The functionality for this library has been moved into `oas`.", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "oas": "^20.0.0" + } + }, + "node_modules/@readme/oas-to-har": { + "version": "20.1.1", + "resolved": "https://registry.npmjs.org/@readme/oas-to-har/-/oas-to-har-20.1.1.tgz", + "integrity": "sha512-rz8YpdZw+Jqrd8VQhQaYrzctkCAYdBldoQ5qDQyF9vGvq2lpA1yMvQPgKCJXfPGXH8Cm+NjLbunxnYabKQeKeA==", + "dependencies": { + "@readme/data-urls": "^1.0.1", + "@readme/oas-extensions": "^17.0.1", + "oas": "^20.5.0", + "qs": "^6.10.5", + "remove-undefined-objects": "^2.0.2" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@readme/openapi-parser": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@readme/openapi-parser/-/openapi-parser-2.5.0.tgz", + "integrity": "sha512-IbymbOqRuUzoIgxfAAR7XJt2FWl6n2yqN09fF5adacGm7W03siA3bj1Emql0X9D2T+RpBYz3x9zDsMhuoMP62A==", + "dependencies": { + "@apidevtools/openapi-schemas": "^2.1.0", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "@readme/better-ajv-errors": "^1.6.0", + "@readme/json-schema-ref-parser": "^1.2.0", + "ajv": "^8.12.0", + "ajv-draft-04": "^1.0.0", + "call-me-maybe": "^1.0.1" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "openapi-types": ">=7" + } + }, + "node_modules/@readme/openapi-parser/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@readme/openapi-parser/node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/@readme/openapi-parser/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/@readme/postman-to-openapi": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@readme/postman-to-openapi/-/postman-to-openapi-4.1.0.tgz", + "integrity": "sha512-VvV2Hzjskz01m8doSn7Ypt6cSZzgjnypVqXy1ipThbyYD6SGiM74VSePXykOODj/43Y2m6zeYedPk/ZLts/HvQ==", + "dependencies": { + "@readme/http-status-codes": "^7.2.0", + "js-yaml": "^4.1.0", + "jsonc-parser": "3.2.0", + "lodash.camelcase": "^4.3.0", + "marked": "^4.3.0", + "mustache": "^4.2.0" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -1744,6 +1879,39 @@ "node": ">=14" } }, + "node_modules/@ts-morph/common": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.18.1.tgz", + "integrity": "sha512-RVE+zSRICWRsfrkAw5qCAK+4ZH9kwEFv5h0+/YeHTLieWP7F4wWq4JsKFuNWG+fYh/KF+8rAtgdj5zb2mm+DVA==", + "dependencies": { + "fast-glob": "^3.2.12", + "minimatch": "^5.1.0", + "mkdirp": "^1.0.4", + "path-browserify": "^1.0.1" + } + }, + "node_modules/@ts-morph/common/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@ts-morph/common/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", @@ -1818,8 +1986,7 @@ "node_modules/@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" }, "node_modules/@types/concat-stream": { "version": "2.0.0", @@ -1977,8 +2144,7 @@ "node_modules/@types/json-schema": { "version": "7.0.12", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", - "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", - "dev": true + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==" }, "node_modules/@types/json5": { "version": "0.0.29", @@ -2824,7 +2990,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -3292,7 +3457,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -3301,7 +3465,6 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, "dependencies": { "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" @@ -3323,6 +3486,81 @@ "node": ">= 8" } }, + "node_modules/api": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/api/-/api-6.1.1.tgz", + "integrity": "sha512-we3fnLinpYWlKOHdX4S/Ky9gZvColCnht/qhtv04K2jQbrC/z4SxvZVAT8W8PCC5NLLU4H35r3u4Lt77ZaiY9w==", + "dependencies": { + "@readme/oas-to-har": "^20.0.2", + "@readme/openapi-parser": "^2.4.0", + "caseless": "^0.12.0", + "chalk": "^4.1.2", + "commander": "^10.0.0", + "datauri": "^4.1.0", + "execa": "^5.1.1", + "fetch-har": "^8.1.5", + "figures": "^3.2.0", + "find-cache-dir": "^3.3.1", + "form-data-encoder": "^1.7.2", + "formdata-node": "^4.3.2", + "get-stream": "^6.0.1", + "isomorphic-fetch": "^3.0.0", + "js-yaml": "^4.1.0", + "json-schema-to-ts": "^2.6.2-beta.0", + "json-schema-traverse": "^1.0.0", + "lodash.camelcase": "^4.3.0", + "lodash.deburr": "^4.1.0", + "lodash.merge": "^4.6.2", + "lodash.setwith": "^4.3.2", + "lodash.startcase": "^4.4.0", + "make-dir": "^3.1.0", + "node-abort-controller": "^3.1.1", + "oas": "^20.4.0", + "ora": "^5.4.1", + "prompts": "^2.4.2", + "remove-undefined-objects": "^2.0.2", + "semver": "^7.3.8", + "ssri": "^10.0.1", + "ts-morph": "^17.0.1", + "validate-npm-package-name": "^5.0.0" + }, + "bin": { + "api": "bin/api" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/api/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "engines": { + "node": ">=14" + } + }, + "node_modules/api/node_modules/form-data-encoder": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.9.0.tgz", + "integrity": "sha512-rahaRMkN8P8d/tgK/BLPX+WBVM27NbvdXBxqQujBtkDAIFspaRqN7Od7lfdGQA6KAD+f82fYCLBq1ipvcu8qLw==" + }, + "node_modules/api/node_modules/formdata-node": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", + "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", + "dependencies": { + "node-domexception": "1.0.0", + "web-streams-polyfill": "4.0.0-beta.3" + }, + "engines": { + "node": ">= 12.20" + } + }, + "node_modules/api/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, "node_modules/append-field": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", @@ -3335,6 +3573,11 @@ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, "node_modules/aria-query": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", @@ -3588,7 +3831,6 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, "funding": [ { "type": "github", @@ -3626,7 +3868,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -3833,7 +4074,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -3890,7 +4130,6 @@ "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, "funding": [ { "type": "github", @@ -3928,6 +4167,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dependencies": { + "semver": "^7.0.0" + } + }, "node_modules/bundle-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", @@ -4012,6 +4259,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-me-maybe": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.2.tgz", + "integrity": "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==" + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -4070,8 +4322,7 @@ "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "node_modules/ccount": { "version": "2.0.1", @@ -4105,7 +4356,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -4260,7 +4510,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, "dependencies": { "restore-cursor": "^3.1.0" }, @@ -4272,7 +4521,6 @@ "version": "2.9.0", "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", - "dev": true, "engines": { "node": ">=6" }, @@ -4293,7 +4541,6 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -4304,7 +4551,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, "engines": { "node": ">=0.8" } @@ -4323,11 +4569,23 @@ "node": ">=6" } }, + "node_modules/code-block-writer": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-11.0.3.tgz", + "integrity": "sha512-NiujjUFB4SwScJq2bwbYUtXbZhBSlY6vYzm++3Q6oC+U+injTqfPYFK8wS9COOmb2lueqp0ZRB4nK1VYeHgNyw==" + }, + "node_modules/code-error-fragment": { + "version": "0.0.230", + "resolved": "https://registry.npmjs.org/code-error-fragment/-/code-error-fragment-0.0.230.tgz", + "integrity": "sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==", + "engines": { + "node": ">= 4" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -4338,8 +4596,7 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/combined-stream": { "version": "1.0.8", @@ -4389,6 +4646,27 @@ "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", "dev": true }, + "node_modules/compute-gcd": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", + "integrity": "sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg==", + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "node_modules/compute-lcm": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.2.tgz", + "integrity": "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ==", + "dependencies": { + "compute-gcd": "^1.2.1", + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -4631,24 +4909,6 @@ "typescript": ">=3" } }, - "node_modules/cosmiconfig/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -4659,7 +4919,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -4706,6 +4965,15 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, "node_modules/damerau-levenshtein": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", @@ -4721,6 +4989,18 @@ "node": ">=8" } }, + "node_modules/datauri": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/datauri/-/datauri-4.1.0.tgz", + "integrity": "sha512-y17kh32+I82G+ED9MNWFkZiP/Cq/vO1hN9+tSZsT9C9qn3NrvcBnh7crSepg0AQPge1hXx2Ca44s1FRdv0gFWA==", + "dependencies": { + "image-size": "1.0.0", + "mimer": "^2.0.2" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -5018,7 +5298,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, "dependencies": { "clone": "^1.0.2" }, @@ -5196,8 +5475,7 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/encodeurl": { "version": "1.0.2", @@ -5398,6 +5676,55 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-promise": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==" + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, "node_modules/esbuild": { "version": "0.18.20", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", @@ -5439,7 +5766,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, "engines": { "node": ">=6" } @@ -5466,7 +5792,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, "engines": { "node": ">=0.8.0" } @@ -6403,12 +6728,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -6475,18 +6794,6 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/eslint/node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -6636,6 +6943,15 @@ "node": ">= 0.6" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, "node_modules/event-stream": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.1.7.tgz", @@ -6672,7 +6988,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", @@ -6768,6 +7083,19 @@ } ] }, + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dependencies": { + "type": "^2.7.2" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -6791,8 +7119,7 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-diff": { "version": "1.3.0", @@ -6804,7 +7131,6 @@ "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -6819,8 +7145,7 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -6831,8 +7156,7 @@ "node_modules/fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", - "dev": true + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, "node_modules/fastest-levenshtein": { "version": "1.0.16", @@ -6847,7 +7171,6 @@ "version": "1.13.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, "dependencies": { "reusify": "^1.0.4" } @@ -6865,11 +7188,39 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/fetch-har": { + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/fetch-har/-/fetch-har-8.1.5.tgz", + "integrity": "sha512-c9WDro4RWC+suOVRJFNW21cgqTOELRZpvFJgfENvOM7Yt/VA4QeFtRax795SyOpTisdpcl5XNQlQZdAE6HERDA==", + "dependencies": { + "@readme/data-urls": "^1.0.1", + "@types/har-format": "^1.2.8", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=14" + }, + "optionalDependencies": { + "formdata-node": "^4.3.2" + } + }, + "node_modules/fetch-har/node_modules/formdata-node": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", + "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", + "optional": true, + "dependencies": { + "node-domexception": "1.0.0", + "web-streams-polyfill": "4.0.0-beta.3" + }, + "engines": { + "node": ">= 12.20" + } + }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -6896,7 +7247,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -7143,7 +7493,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -7180,7 +7529,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, "engines": { "node": ">=10" }, @@ -7316,7 +7664,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -7470,10 +7817,7 @@ "node_modules/grapheme-splitter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true, - "optional": true, - "peer": true + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" }, "node_modules/graphemer": { "version": "1.4.0", @@ -7546,7 +7890,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, "engines": { "node": ">=8" } @@ -7826,6 +8169,11 @@ "node": ">= 0.8" } }, + "node_modules/http2-client": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/http2-client/-/http2-client-1.3.5.tgz", + "integrity": "sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==" + }, "node_modules/http2-wrapper": { "version": "2.1.11", "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.1.11.tgz", @@ -7855,7 +8203,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, "engines": { "node": ">=10.17.0" } @@ -7876,7 +8223,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, "funding": [ { "type": "github", @@ -7901,6 +8247,20 @@ "node": ">= 4" } }, + "node_modules/image-size": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.0.tgz", + "integrity": "sha512-JLJ6OwBfO1KcA+TvJT+v8gbE6iWbj24LyDNFgFEN0lzegn6cC6a/p3NIDaepMsJjQjlUWqIC7wJv8lBFxPNjcw==", + "dependencies": { + "queue": "6.0.2" + }, + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/import-fresh": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", @@ -8316,7 +8676,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -8337,7 +8696,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "engines": { "node": ">=8" } @@ -8361,7 +8719,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -8441,7 +8798,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true, "engines": { "node": ">=8" } @@ -8489,7 +8845,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, "engines": { "node": ">=0.12.0" } @@ -8548,6 +8903,11 @@ "node": ">=0.10.0" } }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -8597,7 +8957,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true, "engines": { "node": ">=8" } @@ -8673,7 +9032,6 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, "engines": { "node": ">=10" }, @@ -8766,8 +9124,7 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "node_modules/isobject": { "version": "3.0.1", @@ -8782,7 +9139,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", - "dev": true, "dependencies": { "node-fetch": "^2.6.1", "whatwg-fetch": "^3.4.1" @@ -8931,8 +9287,18 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } }, "node_modules/jsesc": { "version": "3.0.2", @@ -8957,11 +9323,44 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "node_modules/json-schema-compare": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", + "integrity": "sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==", + "dependencies": { + "lodash": "^4.17.4" + } + }, + "node_modules/json-schema-merge-allof": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/json-schema-merge-allof/-/json-schema-merge-allof-0.8.1.tgz", + "integrity": "sha512-CTUKmIlPJbsWfzRRnOXz+0MjIqvnleIXwFTzz+t9T86HnYX/Rozria6ZVGLktAU9e+NygNljveP+yxqtQp/Q4w==", + "dependencies": { + "compute-lcm": "^1.1.2", + "json-schema-compare": "^0.2.2", + "lodash": "^4.17.20" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/json-schema-to-ts": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-2.12.0.tgz", + "integrity": "sha512-uTde38yBm5lzJSRPWRaasxZo72pb+JGE4iUksNdNfAkFaLhV4N9akeBxPPUpZy5onINt9Zo0oTLrAoEXyZESiQ==", + "dependencies": { + "@babel/runtime": "^7.18.3", + "@types/json-schema": "^7.0.9", + "ts-algebra": "^1.2.2" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -8975,11 +9374,22 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "node_modules/json-to-ast": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json-to-ast/-/json-to-ast-2.1.0.tgz", + "integrity": "sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==", + "dependencies": { + "code-error-fragment": "0.0.230", + "grapheme-splitter": "^1.0.4" + }, + "engines": { + "node": ">= 4" + } + }, "node_modules/jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", - "dev": true + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" }, "node_modules/jsonfile": { "version": "6.1.0", @@ -9002,6 +9412,22 @@ "node >= 0.2.0" ] }, + "node_modules/jsonpath-plus": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz", + "integrity": "sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA==", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -9054,6 +9480,14 @@ "node": ">=0.10.0" } }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "engines": { + "node": ">=6" + } + }, "node_modules/language-subtag-registry": { "version": "0.3.22", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", @@ -9084,6 +9518,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "engines": { + "node": ">=6" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -9166,8 +9608,12 @@ "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "dev": true + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, + "node_modules/lodash.deburr": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-4.1.0.tgz", + "integrity": "sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==" }, "node_modules/lodash.isfunction": { "version": "3.0.9", @@ -9190,8 +9636,7 @@ "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, "node_modules/lodash.mergewith": { "version": "4.6.2", @@ -9199,6 +9644,11 @@ "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", "dev": true }, + "node_modules/lodash.setwith": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.setwith/-/lodash.setwith-4.3.2.tgz", + "integrity": "sha512-Cv2pndcuNDaqDMJ0gbLm5qNG5jyfsL6f8+f5PfZVVNhQCv+y+P5gAKkCdZbtiQlux7nsnWF7UmZd8JEFIo/4tg==" + }, "node_modules/lodash.snakecase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", @@ -9208,8 +9658,7 @@ "node_modules/lodash.startcase": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", - "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", - "dev": true + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==" }, "node_modules/lodash.uniq": { "version": "4.5.0", @@ -9227,7 +9676,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" @@ -9286,7 +9734,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -9294,6 +9741,14 @@ "node": ">=10" } }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dependencies": { + "es5-ext": "~0.10.2" + } + }, "node_modules/lz-string": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", @@ -9378,6 +9833,17 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/mdast-comment-marker": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mdast-comment-marker/-/mdast-comment-marker-2.1.0.tgz", @@ -9675,6 +10141,21 @@ "node": ">= 0.6" } }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, "node_modules/meow": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", @@ -9748,14 +10229,12 @@ "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, "engines": { "node": ">= 8" } @@ -10503,7 +10982,6 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, "dependencies": { "braces": "^3.0.1", "picomatch": "^2.2.3" @@ -10543,11 +11021,21 @@ "node": ">= 0.6" } }, + "node_modules/mimer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/mimer/-/mimer-2.0.2.tgz", + "integrity": "sha512-izxvjsB7Ur5HrTbPu6VKTrzxSMBFBqyZQc6dWlZNQ4/wAvf886fD4lrjtFd8IQ8/WmZKdxKjUtqFFNaj3hQ52g==", + "bin": { + "mimer": "bin/mimer" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, "engines": { "node": ">=6" } @@ -10793,6 +11281,14 @@ "node": ">= 6.0.0" } }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "bin": { + "mustache": "bin/mustache" + } + }, "node_modules/mute-stream": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", @@ -10828,6 +11324,11 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, "node_modules/nlcst-is-literal": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/nlcst-is-literal/-/nlcst-is-literal-2.1.0.tgz", @@ -10902,11 +11403,15 @@ "node": ">= 10.13" } }, + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" + }, "node_modules/node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "dev": true, "funding": [ { "type": "github", @@ -10940,6 +11445,17 @@ } } }, + "node_modules/node-fetch-h2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz", + "integrity": "sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==", + "dependencies": { + "http2-client": "^1.2.5" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -10959,6 +11475,14 @@ "webidl-conversions": "^3.0.0" } }, + "node_modules/node-readfiles": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/node-readfiles/-/node-readfiles-0.2.0.tgz", + "integrity": "sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==", + "dependencies": { + "es6-promise": "^3.2.1" + } + }, "node_modules/node-releases": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", @@ -11032,7 +11556,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, "dependencies": { "path-key": "^3.0.0" }, @@ -11040,6 +11563,144 @@ "node": ">=8" } }, + "node_modules/oas": { + "version": "20.10.3", + "resolved": "https://registry.npmjs.org/oas/-/oas-20.10.3.tgz", + "integrity": "sha512-dBxDuwn2ssggPMOqEKEzT4sjCqbkol8JozuWrpwD7chcmbKbverj5vpk2kmsczeyguFkLcKUOMcqUUimf9h+IQ==", + "dependencies": { + "@readme/json-schema-ref-parser": "^1.2.0", + "@types/json-schema": "^7.0.11", + "json-schema-merge-allof": "^0.8.1", + "jsonpath-plus": "^7.2.0", + "jsonpointer": "^5.0.0", + "memoizee": "^0.4.14", + "oas-normalize": "^8.4.0", + "openapi-types": "^12.1.1", + "path-to-regexp": "^6.2.0", + "remove-undefined-objects": "^3.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/oas-kit-common": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/oas-kit-common/-/oas-kit-common-1.0.8.tgz", + "integrity": "sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==", + "dependencies": { + "fast-safe-stringify": "^2.0.7" + } + }, + "node_modules/oas-linter": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/oas-linter/-/oas-linter-3.2.2.tgz", + "integrity": "sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==", + "dependencies": { + "@exodus/schemasafe": "^1.0.0-rc.2", + "should": "^13.2.1", + "yaml": "^1.10.0" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-linter/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/oas-normalize": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/oas-normalize/-/oas-normalize-8.4.1.tgz", + "integrity": "sha512-cGODg+AntZteJRHBiYDWKtcO2svWGMXuFWYu2I8b4hOrNiwB3hgDs/ScX3O9mYm6RpLsUIftt6rDHGc8eYG8aA==", + "dependencies": { + "@readme/openapi-parser": "^2.5.0", + "@readme/postman-to-openapi": "^4.1.0", + "js-yaml": "^4.1.0", + "node-fetch": "^2.6.1", + "openapi-types": "^12.1.0", + "swagger2openapi": "^7.0.8" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/oas-resolver": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.6.tgz", + "integrity": "sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==", + "dependencies": { + "node-fetch-h2": "^2.3.0", + "oas-kit-common": "^1.0.8", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" + }, + "bin": { + "resolve": "resolve.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-resolver/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/oas-schema-walker": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz", + "integrity": "sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-validator": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/oas-validator/-/oas-validator-5.0.8.tgz", + "integrity": "sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==", + "dependencies": { + "call-me-maybe": "^1.0.1", + "oas-kit-common": "^1.0.8", + "oas-linter": "^3.2.2", + "oas-resolver": "^2.5.6", + "oas-schema-walker": "^1.1.5", + "reftools": "^1.1.9", + "should": "^13.2.1", + "yaml": "^1.10.0" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/oas-validator/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/oas/node_modules/path-to-regexp": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", + "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==" + }, + "node_modules/oas/node_modules/remove-undefined-objects": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-undefined-objects/-/remove-undefined-objects-3.0.0.tgz", + "integrity": "sha512-nxG1yYfc/Jxi+bNCBiqKhxVJPE+QvziIOKbD+Dxc93Uisz92v/ZYpo4WR0TJuf+dk2xE8lW2WPJsA3mDFzXy8w==", + "engines": { + "node": ">=16" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -11197,7 +11858,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, "dependencies": { "mimic-fn": "^2.1.0" }, @@ -11226,6 +11886,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==" + }, "node_modules/optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -11247,7 +11912,6 @@ "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "dev": true, "dependencies": { "bl": "^4.1.0", "chalk": "^4.1.0", @@ -11454,6 +12118,11 @@ "node": ">= 0.8" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -11474,7 +12143,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, "engines": { "node": ">=8" } @@ -11533,7 +12201,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, "engines": { "node": ">=8.6" }, @@ -11697,6 +12364,18 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -11777,7 +12456,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, "engines": { "node": ">=6" } @@ -11811,7 +12489,6 @@ "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, "dependencies": { "side-channel": "^1.0.4" }, @@ -11822,11 +12499,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/queue": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", + "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", + "dependencies": { + "inherits": "~2.0.3" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, "funding": [ { "type": "github", @@ -11989,7 +12673,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -12060,11 +12743,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/reftools": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.9.tgz", + "integrity": "sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==", + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, "node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "dev": true + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" }, "node_modules/regexp-tree": { "version": "0.1.27", @@ -12278,11 +12968,18 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remove-undefined-objects": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/remove-undefined-objects/-/remove-undefined-objects-2.0.2.tgz", + "integrity": "sha512-b6x4MUtR4YBW1aCoGx3tE4mA2PFjiXSmtSdNmLexQzUdZa4ybnJAItXLKpkcVgCUJIzJtk2DFG402sMSEMlonQ==", + "engines": { + "node": ">=14" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -12291,7 +12988,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -12389,7 +13085,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" @@ -12460,7 +13155,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -12524,7 +13218,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, "funding": [ { "type": "github", @@ -12591,8 +13284,7 @@ "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safe-regex-test": { "version": "1.0.0", @@ -12636,7 +13328,6 @@ "version": "7.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", - "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -12750,7 +13441,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -12762,11 +13452,58 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, "engines": { "node": ">=8" } }, + "node_modules/should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "dependencies": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "node_modules/should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dependencies": { + "should-type": "^1.4.0" + } + }, + "node_modules/should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==", + "dependencies": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "node_modules/should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==" + }, + "node_modules/should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "dependencies": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "node_modules/should-util": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz", + "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==" + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -12789,8 +13526,12 @@ "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==" }, "node_modules/slash": { "version": "3.0.0", @@ -13107,7 +13848,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, "dependencies": { "safe-buffer": "~5.1.0" } @@ -13116,7 +13856,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -13229,7 +13968,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -13241,7 +13979,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, "engines": { "node": ">=6" } @@ -13346,7 +14083,6 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -13366,6 +14102,40 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/swagger2openapi": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/swagger2openapi/-/swagger2openapi-7.0.8.tgz", + "integrity": "sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==", + "dependencies": { + "call-me-maybe": "^1.0.1", + "node-fetch": "^2.6.1", + "node-fetch-h2": "^2.3.0", + "node-readfiles": "^0.2.0", + "oas-kit-common": "^1.0.8", + "oas-resolver": "^2.5.6", + "oas-schema-walker": "^1.1.5", + "oas-validator": "^5.0.8", + "reftools": "^1.1.9", + "yaml": "^1.10.0", + "yargs": "^17.0.1" + }, + "bin": { + "boast": "boast.js", + "oas-validate": "oas-validate.js", + "swagger2openapi": "swagger2openapi.js" + }, + "funding": { + "url": "https://github.com/Mermade/oas-kit?sponsor=1" + } + }, + "node_modules/swagger2openapi/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, "node_modules/synckit": { "version": "0.8.5", "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", @@ -13538,6 +14308,15 @@ "node": ">=10" } }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, "node_modules/tinybench": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.0.tgz", @@ -13590,7 +14369,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -13640,6 +14418,11 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/ts-algebra": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-1.2.2.tgz", + "integrity": "sha512-kloPhf1hq3JbCPOTYoOWDKxebWjNb2o/LKnNfkWhxVVisFFmMJPPdJeGoGmM+iRLyoXAR61e08Pb+vUXINg8aA==" + }, "node_modules/ts-api-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.2.tgz", @@ -13652,6 +14435,15 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-morph": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-17.0.1.tgz", + "integrity": "sha512-10PkHyXmrtsTvZSL+cqtJLTgFXkU43Gd0JCc0Rw6GchWbqKe0Rwgt1v3ouobTZwQzF1mGhDeAlWYBMGRV7y+3g==", + "dependencies": { + "@ts-morph/common": "~0.18.0", + "code-block-writer": "^11.0.3" + } + }, "node_modules/ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -13755,6 +14547,11 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -14379,7 +15176,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -14400,8 +15196,7 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "node_modules/utils-merge": { "version": "1.0.1", @@ -14496,6 +15291,49 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/validate.io-array": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", + "integrity": "sha512-DeOy7CnPEziggrOO5CZhVKJw6S3Yi7e9e65R1Nl/RTN1vTQKnzjfvks0/8kQ40FP/dsjRAOd4hxmJ7uLa6vxkg==" + }, + "node_modules/validate.io-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz", + "integrity": "sha512-LlFybRJEriSuBnUhQyG5bwglhh50EpTL2ul23MPIuR1odjO7XaMLFV8vHGwp7AZciFxtYOeiSCT5st+XSPONiQ==" + }, + "node_modules/validate.io-integer": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/validate.io-integer/-/validate.io-integer-1.0.5.tgz", + "integrity": "sha512-22izsYSLojN/P6bppBqhgUDjCkr5RY2jd+N2a3DCAUey8ydvrZ/OkGvFPR7qfOpwR2LC5p4Ngzxz36g5Vgr/hQ==", + "dependencies": { + "validate.io-number": "^1.0.3" + } + }, + "node_modules/validate.io-integer-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/validate.io-integer-array/-/validate.io-integer-array-1.0.0.tgz", + "integrity": "sha512-mTrMk/1ytQHtCY0oNO3dztafHYyGU88KL+jRxWuzfOmQb+4qqnWmI+gykvGp8usKZOM0H7keJHEbRaFiYA0VrA==", + "dependencies": { + "validate.io-array": "^1.0.3", + "validate.io-integer": "^1.0.4" + } + }, + "node_modules/validate.io-number": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/validate.io-number/-/validate.io-number-1.0.3.tgz", + "integrity": "sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg==" + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -14847,7 +15685,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, "dependencies": { "defaults": "^1.0.3" } @@ -14878,7 +15715,6 @@ "version": "4.0.0-beta.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", - "dev": true, "engines": { "node": ">= 14" } @@ -15015,14 +15851,12 @@ "node_modules/whatwg-fetch": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", - "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==", - "dev": true + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==" }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -15206,7 +16040,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -15261,7 +16094,6 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, "engines": { "node": ">=10" } @@ -15269,8 +16101,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yaml": { "version": "2.2.2", @@ -15285,7 +16116,6 @@ "version": "17.5.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz", "integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==", - "dev": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -15312,7 +16142,6 @@ "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, "engines": { "node": ">=12" } @@ -15372,16 +16201,19 @@ }, "packages/node": { "name": "readmeio", - "version": "6.2.0", + "version": "7.0.0-alpha.1", "license": "ISC", "dependencies": { "@types/har-format": "^1.2.10", "@types/node-fetch": "^2.6.2", + "api": "^6.1.1", "content-type": "^1.0.5", "find-cache-dir": "^3.3.2", "flat-cache": "^3.0.4", + "json-schema-to-ts": "^2.9.2", "lodash": "^4.17.15", "node-fetch": "^2.6.7", + "oas": "^20.10.2", "ssri": "^10.0.1", "timeout-signal": "^1.1.0", "type-is": "^1.6.18", diff --git a/package.json b/package.json index c7e71506cb..9d80eb71e7 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,12 @@ "name": "metrics-sdks-monorepo", "private": true, "scripts": { - "clean": "npx lerna clean", + "clean": "npx lerna@6 clean", "lint": "eslint test/ && npm run lint --workspaces", "lint:docs": "alex .", "prettier": "prettier --list-different \"./**/**.{js,ts,md}\"", "prettier:write": "prettier --list-different --write \"./**/**.{js,ts,md}\"", - "publish": "npx lerna publish", + "publish": "npx lerna@6 publish", "test": "npm test --workspaces", "test:integration-metrics": "vitest test/integration-metrics.test.js", "test:integration-metrics-watch": "vitest run test/integration-metrics.test.js", diff --git a/packages/node/package.json b/packages/node/package.json index ae311dfdf3..06f331560a 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -1,7 +1,7 @@ { "name": "readmeio", "description": "Track your API metrics within ReadMe.", - "version": "6.2.0", + "version": "7.0.0-alpha.5", "license": "ISC", "homepage": "https://readme.com/metrics", "bugs": { @@ -27,11 +27,14 @@ "dependencies": { "@types/har-format": "^1.2.10", "@types/node-fetch": "^2.6.2", + "api": "^6.1.1", "content-type": "^1.0.5", "find-cache-dir": "^3.3.2", "flat-cache": "^3.0.4", + "json-schema-to-ts": "^2.9.2", "lodash": "^4.17.15", "node-fetch": "^2.6.7", + "oas": "^20.10.2", "ssri": "^10.0.1", "timeout-signal": "^1.1.0", "type-is": "^1.6.18", diff --git a/packages/node/src/.api/api.json b/packages/node/src/.api/api.json new file mode 100644 index 0000000000..f7cbc79bb0 --- /dev/null +++ b/packages/node/src/.api/api.json @@ -0,0 +1,11 @@ +{ + "version": "1.0", + "apis": [ + { + "identifier": "developers", + "source": "@developers/v2.0#5a1mg1plldzmnq5", + "integrity": "sha512-pA1uoUA9nuzjAXOzYpXzBxL8P9YgJbthrDnufYNJS6YJnK0j0Rz5wNA3JlwJrA69vJpDTu22MB4JnSlifeE0oA==", + "installerVersion": "6.1.1" + } + ] +} diff --git a/packages/node/src/.api/apis/developers/index.ts b/packages/node/src/.api/apis/developers/index.ts new file mode 100644 index 0000000000..083a63dd4c --- /dev/null +++ b/packages/node/src/.api/apis/developers/index.ts @@ -0,0 +1,487 @@ +import type * as types from './types'; +import type { ConfigOptions, FetchResponse } from 'api/dist/core'; +import Oas from 'oas'; +import APICore from 'api/dist/core'; +import definition from './openapi.json'; + +class SDK { + spec: Oas; + core: APICore; + + constructor() { + this.spec = Oas.init(definition); + this.core = new APICore(this.spec, 'developers/4.465.0 (api/6.1.1)'); + } + + /** + * Optionally configure various options that the SDK allows. + * + * @param config Object of supported SDK options and toggles. + * @param config.timeout Override the default `fetch` request timeout of 30 seconds. This number + * should be represented in milliseconds. + */ + config(config: ConfigOptions) { + this.core.setConfig(config); + } + + /** + * If the API you're using requires authentication you can supply the required credentials + * through this method and the library will magically determine how they should be used + * within your API request. + * + * With the exception of OpenID and MutualTLS, it supports all forms of authentication + * supported by the OpenAPI specification. + * + * @example HTTP Basic auth + * sdk.auth('username', 'password'); + * + * @example Bearer tokens (HTTP or OAuth 2) + * sdk.auth('myBearerToken'); + * + * @example API Keys + * sdk.auth('myApiKey'); + * + * @see {@link https://spec.openapis.org/oas/v3.0.3#fixed-fields-22} + * @see {@link https://spec.openapis.org/oas/v3.1.0#fixed-fields-22} + * @param values Your auth credentials for the API; can specify up to two strings or numbers. + */ + auth(...values: string[] | number[]) { + this.core.setAuth(...values); + return this; + } + + /** + * If the API you're using offers alternate server URLs, and server variables, you can tell + * the SDK which one to use with this method. To use it you can supply either one of the + * server URLs that are contained within the OpenAPI definition (along with any server + * variables), or you can pass it a fully qualified URL to use (that may or may not exist + * within the OpenAPI definition). + * + * @example Server URL with server variables + * sdk.server('https://{region}.api.example.com/{basePath}', { + * name: 'eu', + * basePath: 'v14', + * }); + * + * @example Fully qualified server URL + * sdk.server('https://eu.api.example.com/v14'); + * + * @param url Server URL + * @param variables An object of variables to replace into the server URL. + */ + server(url: string, variables = {}) { + this.core.setServer(url, variables); + } + + /** + * Get an API definition file that's been uploaded to ReadMe. + * + * @summary Retrieve an entry from the API Registry + * @throws FetchError<404, types.GetApiRegistryResponse404> The registry entry couldn't be found. + */ + getAPIRegistry(metadata: types.GetApiRegistryMetadataParam): Promise> { + return this.core.fetch('/api-registry/{uuid}', 'get', metadata); + } + + /** + * Get API specification metadata. + * + * @summary Get metadata + * @throws FetchError<400, types.GetApiSpecificationResponse400> No version was supplied. + * @throws FetchError<401, types.GetApiSpecificationResponse401> Unauthorized + * @throws FetchError<403, types.GetApiSpecificationResponse403> Unauthorized + * @throws FetchError<404, types.GetApiSpecificationResponse404> The version couldn't be found. + */ + getAPISpecification(metadata?: types.GetApiSpecificationMetadataParam): Promise> { + return this.core.fetch('/api-specification', 'get', metadata); + } + + /** + * Upload an API specification to ReadMe. Or, to use a newer solution see + * https://docs.readme.com/main/docs/rdme. + * + * @summary Upload specification + * @throws FetchError<400, types.UploadApiSpecificationResponse400> There was a validation error during upload. + * @throws FetchError<401, types.UploadApiSpecificationResponse401> Unauthorized + * @throws FetchError<403, types.UploadApiSpecificationResponse403> Unauthorized + * @throws FetchError<408, types.UploadApiSpecificationResponse408> The spec upload timed out. + */ + uploadAPISpecification(body: types.UploadApiSpecificationBodyParam, metadata?: types.UploadApiSpecificationMetadataParam): Promise> { + return this.core.fetch('/api-specification', 'post', body, metadata); + } + + /** + * Update an API specification in ReadMe. + * + * @summary Update specification + * @throws FetchError<400, types.UpdateApiSpecificationResponse400> There was a validation error during upload. + * @throws FetchError<401, types.UpdateApiSpecificationResponse401> Unauthorized + * @throws FetchError<403, types.UpdateApiSpecificationResponse403> Unauthorized + * @throws FetchError<408, types.UpdateApiSpecificationResponse408> The spec upload timed out. + */ + updateAPISpecification(body: types.UpdateApiSpecificationBodyParam, metadata: types.UpdateApiSpecificationMetadataParam): Promise> { + return this.core.fetch('/api-specification/{id}', 'put', body, metadata); + } + + /** + * Delete an API specification in ReadMe. + * + * @summary Delete specification + * @throws FetchError<400, types.DeleteApiSpecificationResponse400> The spec ID isn't valid. + * @throws FetchError<401, types.DeleteApiSpecificationResponse401> Unauthorized + * @throws FetchError<403, types.DeleteApiSpecificationResponse403> Unauthorized + * @throws FetchError<404, types.DeleteApiSpecificationResponse404> The spec couldn't be found. + */ + deleteAPISpecification(metadata: types.DeleteApiSpecificationMetadataParam): Promise> { + return this.core.fetch('/api-specification/{id}', 'delete', metadata); + } + + /** + * Returns all the roles we're hiring for at ReadMe! + * + * @summary Get open roles + */ + getOpenRoles(): Promise> { + return this.core.fetch('/apply', 'get'); + } + + /** + * This endpoint will let you apply to a job at ReadMe programatically, without having to + * go through our UI! + * + * @summary Submit your application! + */ + applyToReadMe(body: types.ApplyToReadMeBodyParam): Promise> { + return this.core.fetch('/apply', 'post', body); + } + + /** + * Returns all the categories for a specified version. + * + * @summary Get all categories + */ + getCategories(metadata?: types.GetCategoriesMetadataParam): Promise> { + return this.core.fetch('/categories', 'get', metadata); + } + + /** + * Create a new category inside of this project. + * + * @summary Create category + * @throws FetchError<400, types.CreateCategoryResponse400> The category couldn't be saved. + */ + createCategory(body: types.CreateCategoryBodyParam, metadata?: types.CreateCategoryMetadataParam): Promise> { + return this.core.fetch('/categories', 'post', body, metadata); + } + + /** + * Returns the category with this slug. + * + * @summary Get category + * @throws FetchError<404, types.GetCategoryResponse404> The category couldn't be found. + */ + getCategory(metadata: types.GetCategoryMetadataParam): Promise> { + return this.core.fetch('/categories/{slug}', 'get', metadata); + } + + /** + * Change the properties of a category. + * + * @summary Update category + * @throws FetchError<400, types.UpdateCategoryResponse400> The category couldn't be saved. + * @throws FetchError<404, types.UpdateCategoryResponse404> The category couldn't be found. + */ + updateCategory(body: types.UpdateCategoryBodyParam, metadata: types.UpdateCategoryMetadataParam): Promise> { + return this.core.fetch('/categories/{slug}', 'put', body, metadata); + } + + /** + * Delete the category with this slug. + * >⚠️Heads Up! + * > This will also delete all of the docs within this category. + * + * @summary Delete category + * @throws FetchError<404, types.DeleteCategoryResponse404> The category couldn't be found. + */ + deleteCategory(metadata: types.DeleteCategoryMetadataParam): Promise> { + return this.core.fetch('/categories/{slug}', 'delete', metadata); + } + + /** + * Returns the docs and children docs within this category. + * + * @summary Get docs for category + * @throws FetchError<404, types.GetCategoryDocsResponse404> The category couldn't be found. + */ + getCategoryDocs(metadata: types.GetCategoryDocsMetadataParam): Promise> { + return this.core.fetch('/categories/{slug}/docs', 'get', metadata); + } + + /** + * Returns a list of changelogs. + * + * @summary Get changelogs + */ + getChangelogs(metadata?: types.GetChangelogsMetadataParam): Promise> { + return this.core.fetch('/changelogs', 'get', metadata); + } + + /** + * Create a new changelog entry. + * + * @summary Create changelog + */ + createChangelog(body: types.CreateChangelogBodyParam): Promise> { + return this.core.fetch('/changelogs', 'post', body); + } + + /** + * Returns the changelog with this slug. + * + * @summary Get changelog + */ + getChangelog(metadata: types.GetChangelogMetadataParam): Promise> { + return this.core.fetch('/changelogs/{slug}', 'get', metadata); + } + + /** + * Update a changelog with this slug. + * + * @summary Update changelog + */ + updateChangelog(body: types.UpdateChangelogBodyParam, metadata: types.UpdateChangelogMetadataParam): Promise> { + return this.core.fetch('/changelogs/{slug}', 'put', body, metadata); + } + + /** + * Delete the changelog with this slug. + * + * @summary Delete changelog + */ + deleteChangelog(metadata: types.DeleteChangelogMetadataParam): Promise> { + return this.core.fetch('/changelogs/{slug}', 'delete', metadata); + } + + /** + * Returns a list of custom pages. + * + * @summary Get custom pages + * @throws FetchError<401, types.GetCustomPagesResponse401> Unauthorized + * @throws FetchError<403, types.GetCustomPagesResponse403> Unauthorized + */ + getCustomPages(metadata?: types.GetCustomPagesMetadataParam): Promise> { + return this.core.fetch('/custompages', 'get', metadata); + } + + /** + * Create a new custom page inside of this project. + * + * @summary Create custom page + * @throws FetchError<400, types.CreateCustomPageResponse400> The page couldn't be saved. + * @throws FetchError<401, types.CreateCustomPageResponse401> Unauthorized + * @throws FetchError<403, types.CreateCustomPageResponse403> Unauthorized + */ + createCustomPage(body: types.CreateCustomPageBodyParam): Promise> { + return this.core.fetch('/custompages', 'post', body); + } + + /** + * Returns the custom page with this slug. + * + * @summary Get custom page + * @throws FetchError<401, types.GetCustomPageResponse401> Unauthorized + * @throws FetchError<403, types.GetCustomPageResponse403> Unauthorized + * @throws FetchError<404, types.GetCustomPageResponse404> The custom page couldn't be found. + */ + getCustomPage(metadata: types.GetCustomPageMetadataParam): Promise> { + return this.core.fetch('/custompages/{slug}', 'get', metadata); + } + + /** + * Update a custom page with this slug. + * + * @summary Update custom page + * @throws FetchError<400, types.UpdateCustomPageResponse400> The page couldn't be saved. + * @throws FetchError<401, types.UpdateCustomPageResponse401> Unauthorized + * @throws FetchError<403, types.UpdateCustomPageResponse403> Unauthorized + * @throws FetchError<404, types.UpdateCustomPageResponse404> The custom page couldn't be found. + */ + updateCustomPage(body: types.UpdateCustomPageBodyParam, metadata: types.UpdateCustomPageMetadataParam): Promise> { + return this.core.fetch('/custompages/{slug}', 'put', body, metadata); + } + + /** + * Delete the custom page with this slug. + * + * @summary Delete custom page + * @throws FetchError<401, types.DeleteCustomPageResponse401> Unauthorized + * @throws FetchError<403, types.DeleteCustomPageResponse403> Unauthorized + * @throws FetchError<404, types.DeleteCustomPageResponse404> The custom page couldn't be found. + */ + deleteCustomPage(metadata: types.DeleteCustomPageMetadataParam): Promise> { + return this.core.fetch('/custompages/{slug}', 'delete', metadata); + } + + /** + * Returns the doc with this slug. + * + * @summary Get doc + * @throws FetchError<401, types.GetDocResponse401> Unauthorized + * @throws FetchError<403, types.GetDocResponse403> Unauthorized + * @throws FetchError<404, types.GetDocResponse404> The doc couldn't be found. + */ + getDoc(metadata: types.GetDocMetadataParam): Promise> { + return this.core.fetch('/docs/{slug}', 'get', metadata); + } + + /** + * Update a doc with this slug. + * + * @summary Update doc + * @throws FetchError<400, types.UpdateDocResponse400> The doc couldn't be saved. + * @throws FetchError<401, types.UpdateDocResponse401> Unauthorized + * @throws FetchError<403, types.UpdateDocResponse403> Unauthorized + * @throws FetchError<404, types.UpdateDocResponse404> The doc couldn't be found. + */ + updateDoc(body: types.UpdateDocBodyParam, metadata: types.UpdateDocMetadataParam): Promise> { + return this.core.fetch('/docs/{slug}', 'put', body, metadata); + } + + /** + * Delete the doc with this slug. + * + * @summary Delete doc + * @throws FetchError<401, types.DeleteDocResponse401> Unauthorized + * @throws FetchError<403, types.DeleteDocResponse403> Unauthorized + * @throws FetchError<404, types.DeleteDocResponse404> The doc couldn't be found. + */ + deleteDoc(metadata: types.DeleteDocMetadataParam): Promise> { + return this.core.fetch('/docs/{slug}', 'delete', metadata); + } + + /** + * This is intended for use by enterprise users with staging enabled. This endpoint will + * return the live version of your document, whereas the standard endpoint will always + * return staging. + * + * @summary Get production doc + * @throws FetchError<401, types.GetProductionDocResponse401> Unauthorized + * @throws FetchError<403, types.GetProductionDocResponse403> Unauthorized + * @throws FetchError<404, types.GetProductionDocResponse404> The doc couldn't be found. + */ + getProductionDoc(metadata: types.GetProductionDocMetadataParam): Promise> { + return this.core.fetch('/docs/{slug}/production', 'get', metadata); + } + + /** + * Create a new doc inside of this project. + * + * @summary Create doc + * @throws FetchError<400, types.CreateDocResponse400> The doc couldn't be saved. + * @throws FetchError<401, types.CreateDocResponse401> Unauthorized + * @throws FetchError<403, types.CreateDocResponse403> Unauthorized + */ + createDoc(body: types.CreateDocBodyParam, metadata?: types.CreateDocMetadataParam): Promise> { + return this.core.fetch('/docs', 'post', body, metadata); + } + + /** + * Returns all docs that match the search. + * + * @summary Search docs + * @throws FetchError<401, types.SearchDocsResponse401> Unauthorized + * @throws FetchError<403, types.SearchDocsResponse403> Unauthorized + */ + searchDocs(metadata: types.SearchDocsMetadataParam): Promise> { + return this.core.fetch('/docs/search', 'post', metadata); + } + + /** + * Returns project data for the API key. + * + * @summary Get metadata about the current project + * @throws FetchError<401, types.GetProjectResponse401> Unauthorized + * @throws FetchError<403, types.GetProjectResponse403> Unauthorized + */ + getProject(): Promise> { + return this.core.fetch('/', 'get'); + } + + /** + * Returns a copy of our OpenAPI Definition. + * + * @summary Get our OpenAPI Definition + */ + getAPISchema(): Promise> { + return this.core.fetch('/schema', 'get'); + } + + /** + * Retrieve a list of versions associated with a project API key. + * + * @summary Get versions + * @throws FetchError<401, types.GetVersionsResponse401> Unauthorized + * @throws FetchError<403, types.GetVersionsResponse403> Unauthorized + */ + getVersions(): Promise> { + return this.core.fetch('/version', 'get'); + } + + /** + * Create a new version. + * + * @summary Create version + * @throws FetchError<400, types.CreateVersionResponse400> There was a validation error during creation. + * @throws FetchError<401, types.CreateVersionResponse401> Unauthorized + * @throws FetchError<403, types.CreateVersionResponse403> Unauthorized + * @throws FetchError<404, types.CreateVersionResponse404> The version couldn't be found. + */ + createVersion(body: types.CreateVersionBodyParam): Promise> { + return this.core.fetch('/version', 'post', body); + } + + /** + * Returns the version with this version ID. + * + * @summary Get version + * @throws FetchError<401, types.GetVersionResponse401> Unauthorized + * @throws FetchError<403, types.GetVersionResponse403> Unauthorized + * @throws FetchError<404, types.GetVersionResponse404> The version couldn't be found. + */ + getVersion(metadata: types.GetVersionMetadataParam): Promise> { + return this.core.fetch('/version/{versionId}', 'get', metadata); + } + + /** + * Update an existing version. + * + * @summary Update version + * @throws FetchError<400, types.UpdateVersionResponse400> A stable version can't be demoted. + * @throws FetchError<401, types.UpdateVersionResponse401> Unauthorized + * @throws FetchError<403, types.UpdateVersionResponse403> Unauthorized + * @throws FetchError<404, types.UpdateVersionResponse404> The version couldn't be found. + */ + updateVersion(body: types.UpdateVersionBodyParam, metadata: types.UpdateVersionMetadataParam): Promise> { + return this.core.fetch('/version/{versionId}', 'put', body, metadata); + } + + /** + * Delete a version + * + * @summary Delete version + * @throws FetchError<400, types.DeleteVersionResponse400> A stable version can't be removed. + * @throws FetchError<401, types.DeleteVersionResponse401> Unauthorized + * @throws FetchError<403, types.DeleteVersionResponse403> Unauthorized + * @throws FetchError<404, types.DeleteVersionResponse404> The version couldn't be found. + */ + deleteVersion(metadata: types.DeleteVersionMetadataParam): Promise> { + return this.core.fetch('/version/{versionId}', 'delete', metadata); + } +} + +const createSDK = (() => { return new SDK(); })() +; + +export default createSDK; + +export type { ApplyToReadMeBodyParam, CreateCategoryBodyParam, CreateCategoryMetadataParam, CreateCategoryResponse400, CreateChangelogBodyParam, CreateCustomPageBodyParam, CreateCustomPageResponse400, CreateCustomPageResponse401, CreateCustomPageResponse403, CreateDocBodyParam, CreateDocMetadataParam, CreateDocResponse201, CreateDocResponse400, CreateDocResponse401, CreateDocResponse403, CreateVersionBodyParam, CreateVersionResponse400, CreateVersionResponse401, CreateVersionResponse403, CreateVersionResponse404, DeleteApiSpecificationMetadataParam, DeleteApiSpecificationResponse400, DeleteApiSpecificationResponse401, DeleteApiSpecificationResponse403, DeleteApiSpecificationResponse404, DeleteCategoryMetadataParam, DeleteCategoryResponse404, DeleteChangelogMetadataParam, DeleteCustomPageMetadataParam, DeleteCustomPageResponse401, DeleteCustomPageResponse403, DeleteCustomPageResponse404, DeleteDocMetadataParam, DeleteDocResponse401, DeleteDocResponse403, DeleteDocResponse404, DeleteVersionMetadataParam, DeleteVersionResponse400, DeleteVersionResponse401, DeleteVersionResponse403, DeleteVersionResponse404, GetApiRegistryMetadataParam, GetApiRegistryResponse200, GetApiRegistryResponse404, GetApiSchemaResponse200, GetApiSpecificationMetadataParam, GetApiSpecificationResponse200, GetApiSpecificationResponse400, GetApiSpecificationResponse401, GetApiSpecificationResponse403, GetApiSpecificationResponse404, GetCategoriesMetadataParam, GetCategoriesResponse200, GetCategoryDocsMetadataParam, GetCategoryDocsResponse404, GetCategoryMetadataParam, GetCategoryResponse404, GetChangelogMetadataParam, GetChangelogsMetadataParam, GetChangelogsResponse200, GetCustomPageMetadataParam, GetCustomPageResponse401, GetCustomPageResponse403, GetCustomPageResponse404, GetCustomPagesMetadataParam, GetCustomPagesResponse200, GetCustomPagesResponse401, GetCustomPagesResponse403, GetDocMetadataParam, GetDocResponse200, GetDocResponse401, GetDocResponse403, GetDocResponse404, GetOpenRolesResponse200, GetProductionDocMetadataParam, GetProductionDocResponse200, GetProductionDocResponse401, GetProductionDocResponse403, GetProductionDocResponse404, GetProjectResponse200, GetProjectResponse401, GetProjectResponse403, GetVersionMetadataParam, GetVersionResponse401, GetVersionResponse403, GetVersionResponse404, GetVersionsResponse401, GetVersionsResponse403, SearchDocsMetadataParam, SearchDocsResponse401, SearchDocsResponse403, UpdateApiSpecificationBodyParam, UpdateApiSpecificationMetadataParam, UpdateApiSpecificationResponse400, UpdateApiSpecificationResponse401, UpdateApiSpecificationResponse403, UpdateApiSpecificationResponse408, UpdateCategoryBodyParam, UpdateCategoryMetadataParam, UpdateCategoryResponse400, UpdateCategoryResponse404, UpdateChangelogBodyParam, UpdateChangelogMetadataParam, UpdateCustomPageBodyParam, UpdateCustomPageMetadataParam, UpdateCustomPageResponse400, UpdateCustomPageResponse401, UpdateCustomPageResponse403, UpdateCustomPageResponse404, UpdateDocBodyParam, UpdateDocMetadataParam, UpdateDocResponse200, UpdateDocResponse400, UpdateDocResponse401, UpdateDocResponse403, UpdateDocResponse404, UpdateVersionBodyParam, UpdateVersionMetadataParam, UpdateVersionResponse400, UpdateVersionResponse401, UpdateVersionResponse403, UpdateVersionResponse404, UploadApiSpecificationBodyParam, UploadApiSpecificationMetadataParam, UploadApiSpecificationResponse400, UploadApiSpecificationResponse401, UploadApiSpecificationResponse403, UploadApiSpecificationResponse408 } from './types'; diff --git a/packages/node/src/.api/apis/developers/openapi.json b/packages/node/src/.api/apis/developers/openapi.json new file mode 100644 index 0000000000..3931d1e93e --- /dev/null +++ b/packages/node/src/.api/apis/developers/openapi.json @@ -0,0 +1,13624 @@ +{ + "openapi": "3.0.2", + "info": { + "description": "Create beautiful product and API documentation with our developer friendly platform.", + "version": "4.465.0", + "title": "ReadMe API 🦉", + "contact": { + "name": "API Support", + "url": "https://docs.readme.com/main/docs/need-more-support", + "email": "support@readme.io" + } + }, + "servers": [ + { + "url": "https://dash.readme.com/api/v1" + } + ], + "tags": [ + { + "name": "API Registry" + }, + { + "name": "API Specification" + }, + { + "name": "Apply to ReadMe" + }, + { + "name": "Categories" + }, + { + "name": "Changelog" + }, + { + "name": "Custom Pages" + }, + { + "name": "Docs" + }, + { + "name": "Errors" + }, + { + "name": "Projects" + }, + { + "name": "Version" + } + ], + "paths": { + "/api-registry/{uuid}": { + "get": { + "operationId": "getAPIRegistry", + "summary": "Retrieve an entry from the API Registry", + "description": "Get an API definition file that's been uploaded to ReadMe.", + "tags": [ + "API Registry" + ], + "parameters": [ + { + "name": "uuid", + "in": "path", + "description": "An API Registry UUID. This can be found by navigating to your API Reference page and viewing code snippets for Node with the `api` library.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successfully retrieved API registry entry.", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "404": { + "description": "The registry entry couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "REGISTRY_NOTFOUND" + } + } + } + ] + } + } + } + } + } + } + }, + "/api-specification": { + "get": { + "operationId": "getAPISpecification", + "summary": "Get metadata", + "description": "Get API specification metadata.", + "tags": [ + "API Specification" + ], + "parameters": [ + { + "name": "perPage", + "in": "query", + "description": "Number of items to include in pagination (up to 100, defaults to 10).", + "schema": { + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "page", + "in": "query", + "description": "Used to specify further pages (starts at 1).", + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + }, + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successfully retrieved API specification metadata.", + "headers": { + "Link": { + "description": "Pagination information. See https://docs.readme.com/main/reference/pagination for more information.", + "schema": { + "type": "string" + } + }, + "x-total-count": { + "description": "The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination.", + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "No version was supplied.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_EMPTY" + } + } + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The version couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "post": { + "operationId": "uploadAPISpecification", + "summary": "Upload specification", + "description": "Upload an API specification to ReadMe. Or, to use a newer solution see https://docs.readme.com/main/docs/rdme.", + "tags": [ + "API Specification" + ], + "parameters": [ + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "spec": { + "description": "OpenAPI/Swagger file. We accept JSON or YAML.", + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "The API specification was successfully uploaded." + }, + "400": { + "description": "There was a validation error during upload.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_FILE_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_INVALID" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_INVALID_SCHEMA" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_VERSION_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "408": { + "description": "The spec upload timed out.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_TIMEOUT" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/api-specification/{id}": { + "put": { + "operationId": "updateAPISpecification", + "summary": "Update specification", + "description": "Update an API specification in ReadMe.", + "tags": [ + "API Specification" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the API specification. The unique ID for each API can be found by navigating to your **API Definitions** page.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "spec": { + "description": "OpenAPI/Swagger file. We accept JSON or YAML.", + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The API specification was updated." + }, + "400": { + "description": "There was a validation error during upload.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_FILE_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_ID_DUPLICATE" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_ID_INVALID" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_INVALID" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_INVALID_SCHEMA" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_VERSION_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "There is no API specification with that ID." + }, + "408": { + "description": "The spec upload timed out.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_TIMEOUT" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteAPISpecification", + "summary": "Delete specification", + "description": "Delete an API specification in ReadMe.", + "tags": [ + "API Specification" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of the API specification. The unique ID for each API can be found by navigating to your **API Definitions** page.", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "204": { + "description": "The API specification was deleted." + }, + "400": { + "description": "The spec ID isn't valid.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_ID_INVALID" + } + } + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The spec couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/apply": { + "get": { + "operationId": "getOpenRoles", + "summary": "Get open roles", + "description": "Returns all the roles we're hiring for at ReadMe!", + "tags": [ + "Apply to ReadMe" + ], + "responses": { + "200": { + "description": "All the roles that we're hiring for.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "A slugified version of the job opening title.", + "example": "api-engineer" + }, + "title": { + "type": "string", + "description": "The job opening position.", + "example": "API Engineer" + }, + "description": { + "type": "string", + "description": "The description for this open position. This content is formatted as HTML." + }, + "pullquote": { + "type": "string", + "description": "A short pullquote for the open position.", + "example": "Deeply knowledgeable of the web, HTTP, and the API space." + }, + "location": { + "type": "string", + "description": "Where this position is located at.", + "example": "Remote" + }, + "department": { + "type": "string", + "description": "The internal organization you'll be working in.", + "example": "Engineering" + }, + "url": { + "type": "string", + "format": "url", + "description": "The place where you can apply for the position!" + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "applyToReadMe", + "summary": "Submit your application!", + "description": "This endpoint will let you apply to a job at ReadMe programatically, without having to go through our UI!", + "tags": [ + "Apply to ReadMe" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "description": "Your full name", + "default": "Your Name" + }, + "email": { + "type": "string", + "format": "email", + "description": "A valid email we can reach you at.", + "default": "you@example.com" + }, + "job": { + "type": "string", + "description": "The job you're looking to apply for (https://readme.com/careers).", + "enum": [ + "Product Designer" + ], + "default": "Product Designer" + }, + "pronouns": { + "type": "string", + "description": "Learn more at https://lgbtlifecenter.org/pronouns/" + }, + "linkedin": { + "type": "string", + "format": "url", + "description": "What have you been up to the past few years?" + }, + "github": { + "type": "string", + "description": "Or Bitbucket, Gitlab or anywhere else your code is hosted!", + "format": "url" + }, + "coverLetter": { + "type": "string", + "format": "blob", + "description": "What should we know about you?" + }, + "dontReallyApply": { + "type": "boolean", + "description": "Want to play with the API but not actually apply? Set this to true.", + "default": false + } + }, + "required": [ + "name", + "email", + "job" + ] + } + } + } + }, + "responses": { + "200": { + "description": "You did it!" + } + } + } + }, + "/categories": { + "get": { + "operationId": "getCategories", + "summary": "Get all categories", + "description": "Returns all the categories for a specified version.", + "tags": [ + "Categories" + ], + "parameters": [ + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "perPage", + "in": "query", + "description": "Number of items to include in pagination (up to 100, defaults to 10).", + "schema": { + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "page", + "in": "query", + "description": "Used to specify further pages (starts at 1).", + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "The list of categories.", + "headers": { + "Link": { + "description": "Pagination information. See https://docs.readme.com/main/reference/pagination for more information.", + "schema": { + "type": "string" + } + }, + "x-total-count": { + "description": "The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination.", + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "post": { + "operationId": "createCategory", + "summary": "Create category", + "description": "Create a new category inside of this project.", + "tags": [ + "Categories" + ], + "parameters": [ + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A short title for the category. This is what will show in the sidebar." + }, + "type": { + "type": "string", + "enum": [ + "reference", + "guide" + ], + "default": "guide", + "description": "A category can be part of your reference or guide documentation, which is determined by this field." + } + } + }, + { + "required": [ + "title" + ] + } + ] + } + } + } + }, + "responses": { + "201": { + "description": "The category has successfully been created." + }, + "400": { + "description": "The category couldn't be saved.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_INVALID" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/categories/{slug}": { + "get": { + "operationId": "getCategory", + "summary": "Get category", + "description": "Returns the category with this slug.", + "tags": [ + "Categories" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\".", + "example": "getting-started", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The category exists and has been returned." + }, + "404": { + "description": "The category couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "put": { + "operationId": "updateCategory", + "summary": "Update category", + "description": "Change the properties of a category.", + "tags": [ + "Categories" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\".", + "example": "getting-started", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A short title for the category. This is what will show in the sidebar." + }, + "type": { + "type": "string", + "enum": [ + "reference", + "guide" + ], + "default": "guide", + "description": "A category can be part of your reference or guide documentation, which is determined by this field." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The category was successfully updated." + }, + "400": { + "description": "The category couldn't be saved.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_INVALID" + } + } + } + ] + } + } + } + }, + "404": { + "description": "The category couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteCategory", + "summary": "Delete category", + "description": "Delete the category with this slug.\n>⚠️Heads Up!\n> This will also delete all of the docs within this category.", + "tags": [ + "Categories" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\".", + "example": "getting-started", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The category was deleted." + }, + "404": { + "description": "The category couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/categories/{slug}/docs": { + "get": { + "operationId": "getCategoryDocs", + "summary": "Get docs for category", + "description": "Returns the docs and children docs within this category.", + "tags": [ + "Categories" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\".", + "example": "getting-started", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The category exists and all of the docs have been returned." + }, + "404": { + "description": "The category couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/changelogs": { + "get": { + "operationId": "getChangelogs", + "summary": "Get changelogs", + "description": "Returns a list of changelogs.", + "tags": [ + "Changelog" + ], + "parameters": [ + { + "name": "perPage", + "in": "query", + "description": "Number of items to include in pagination (up to 100, defaults to 10).", + "schema": { + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "page", + "in": "query", + "description": "Used to specify further pages (starts at 1).", + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "The list of changelogs.", + "headers": { + "Link": { + "description": "Pagination information. See https://docs.readme.com/main/reference/pagination for more information.", + "schema": { + "type": "string" + } + }, + "x-total-count": { + "description": "The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination.", + "schema": { + "type": "string" + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "post": { + "operationId": "createChangelog", + "summary": "Create changelog", + "description": "Create a new changelog entry.", + "tags": [ + "Changelog" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the changelog." + }, + "type": { + "type": "string", + "default": "", + "enum": [ + "", + "added", + "fixed", + "improved", + "deprecated", + "removed" + ] + }, + "body": { + "type": "string", + "description": "Body content of the changelog." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the changelog.", + "default": true + } + }, + "required": [ + "title", + "body" + ] + } + } + } + }, + "responses": { + "201": { + "description": "The changelog was successfully created." + }, + "400": { + "description": "There was a validation error during creation." + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/changelogs/{slug}": { + "get": { + "operationId": "getChangelog", + "summary": "Get changelog", + "description": "Returns the changelog with this slug.", + "tags": [ + "Changelog" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Update\", enter the slug \"owlet-update\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The changelog exists and has been returned." + }, + "404": { + "description": "There is no changelog with that slug." + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "put": { + "operationId": "updateChangelog", + "summary": "Update changelog", + "description": "Update a changelog with this slug.", + "tags": [ + "Changelog" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Weekly Update\", enter the slug \"owlet-weekly-update\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the changelog." + }, + "type": { + "type": "string", + "default": "", + "enum": [ + "", + "added", + "fixed", + "improved", + "deprecated", + "removed" + ] + }, + "body": { + "type": "string", + "description": "Body content of the changelog." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the changelog.", + "default": true + } + }, + "required": [ + "title", + "body" + ] + } + } + } + }, + "responses": { + "200": { + "description": "The changelog was successfully updated." + }, + "400": { + "description": "There was a validation error during update." + }, + "404": { + "description": "There is no changelog with that slug." + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteChangelog", + "summary": "Delete changelog", + "description": "Delete the changelog with this slug.", + "tags": [ + "Changelog" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Weekly Update\", enter the slug \"owlet-weekly-update\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The changelog was successfully updated." + }, + "404": { + "description": "There is no changelog with that slug." + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/custompages": { + "get": { + "operationId": "getCustomPages", + "summary": "Get custom pages", + "description": "Returns a list of custom pages.", + "tags": [ + "Custom Pages" + ], + "parameters": [ + { + "name": "perPage", + "in": "query", + "description": "Number of items to include in pagination (up to 100, defaults to 10).", + "schema": { + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100 + } + }, + { + "name": "page", + "in": "query", + "description": "Used to specify further pages (starts at 1).", + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "The list of custom pages.", + "headers": { + "Link": { + "description": "Pagination information. See https://docs.readme.com/main/reference/pagination for more information.", + "schema": { + "type": "string" + } + }, + "x-total-count": { + "description": "The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination.", + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "post": { + "operationId": "createCustomPage", + "summary": "Create custom page", + "description": "Create a new custom page inside of this project.", + "tags": [ + "Custom Pages" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the custom page." + }, + "body": { + "type": "string", + "description": "Body formatted in Markdown (displayed by default)." + }, + "html": { + "type": "string", + "description": "Body formatted in HTML (sanitized, only displayed if `htmlmode` is **true**)." + }, + "htmlmode": { + "type": "boolean", + "description": "**true** if `html` should be displayed, **false** if `body` should be displayed.", + "default": false + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the custom page.", + "default": true + } + }, + "required": [ + "title" + ] + } + } + } + }, + "responses": { + "201": { + "description": "The custom page was successfully created." + }, + "400": { + "description": "The page couldn't be saved.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_INVALID" + } + } + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/custompages/{slug}": { + "get": { + "operationId": "getCustomPage", + "summary": "Get custom page", + "description": "Returns the custom page with this slug.", + "tags": [ + "Custom Pages" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The custom page exists and has been returned." + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The custom page couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "put": { + "operationId": "updateCustomPage", + "summary": "Update custom page", + "description": "Update a custom page with this slug.", + "tags": [ + "Custom Pages" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the custom page." + }, + "body": { + "type": "string", + "description": "Body formatted in Markdown (displayed by default)." + }, + "html": { + "type": "string", + "description": "Body formatted in HTML (sanitized, only displayed if `htmlmode` is **true**)." + }, + "htmlmode": { + "type": "boolean", + "description": "**true** if `html` should be displayed, **false** if `body` should be displayed.", + "default": false + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the custom page.", + "default": true + } + }, + "required": [ + "title" + ] + } + } + } + }, + "responses": { + "200": { + "description": "The custom page was successfully updated." + }, + "400": { + "description": "The page couldn't be saved.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_INVALID" + } + } + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The custom page couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteCustomPage", + "summary": "Delete custom page", + "description": "Delete the custom page with this slug.", + "tags": [ + "Custom Pages" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The custom page was successfully updated." + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The custom page couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/docs/{slug}": { + "get": { + "operationId": "getDoc", + "summary": "Get doc", + "description": "Returns the doc with this slug.", + "tags": [ + "Docs" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\".", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The doc exists and has been returned.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": [ + "basic", + "error", + "link" + ] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + } + }, + "additionalProperties": true + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The doc couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "put": { + "operationId": "updateDoc", + "summary": "Update doc", + "description": "Update a doc with this slug.", + "tags": [ + "Docs" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\".", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": [ + "basic", + "error", + "link" + ] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + }, + "categorySlug": { + "type": "string", + "description": "The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field." + }, + "parentDocSlug": { + "type": "string", + "description": "If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field." + } + }, + "additionalProperties": true + } + } + } + }, + "responses": { + "200": { + "description": "The doc was successfully updated.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": [ + "basic", + "error", + "link" + ] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + } + }, + "additionalProperties": true + } + } + } + }, + "400": { + "description": "The doc couldn't be saved.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_INVALID" + } + } + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The doc couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteDoc", + "summary": "Delete doc", + "description": "Delete the doc with this slug.", + "tags": [ + "Docs" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\".", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The doc was successfully updated." + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The doc couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/docs/{slug}/production": { + "get": { + "operationId": "getProductionDoc", + "summary": "Get production doc", + "description": "This is intended for use by enterprise users with staging enabled. This endpoint will return the live version of your document, whereas the standard endpoint will always return staging.", + "tags": [ + "Docs" + ], + "parameters": [ + { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\".", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The doc exists and has been returned.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": [ + "basic", + "error", + "link" + ] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + } + }, + "additionalProperties": true + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The doc couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/docs": { + "post": { + "operationId": "createDoc", + "summary": "Create doc", + "description": "Create a new doc inside of this project.", + "tags": [ + "Docs" + ], + "parameters": [ + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": [ + "basic", + "error", + "link" + ] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + }, + "categorySlug": { + "type": "string", + "description": "The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field." + }, + "parentDocSlug": { + "type": "string", + "description": "If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field." + } + }, + "oneOf": [ + { + "required": [ + "title", + "category" + ], + "title": "`category` Parameter" + }, + { + "required": [ + "title", + "categorySlug" + ], + "title": "`categorySlug` Parameter" + } + ], + "additionalProperties": true + } + } + } + }, + "responses": { + "201": { + "description": "The doc was successfully created.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": [ + "basic", + "error", + "link" + ] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + } + }, + "additionalProperties": true + } + } + } + }, + "400": { + "description": "The doc couldn't be saved.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_INVALID" + } + } + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/docs/search": { + "post": { + "operationId": "searchDocs", + "summary": "Search docs", + "description": "Returns all docs that match the search.", + "tags": [ + "Docs" + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Search string to look for.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The search was successful and results were returned." + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/": { + "get": { + "operationId": "getProject", + "summary": "Get metadata about the current project", + "description": "Returns project data for the API key.", + "tags": [ + "Projects" + ], + "responses": { + "200": { + "description": "Project data", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "subdomain": { + "type": "string" + }, + "jwtSecret": { + "type": "string" + }, + "baseUrl": { + "type": "string", + "format": "url", + "description": "The base URL for the project. If the project is not running under a custom domain, it will be `https://projectSubdomain.readme.io`, otherwise it can either be or `https://example.com` or, in the case of an enterprise child project `https://example.com/projectSubdomain`." + }, + "plan": { + "type": "string" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/schema": { + "get": { + "operationId": "getAPISchema", + "summary": "Get our OpenAPI Definition", + "description": "Returns a copy of our OpenAPI Definition.", + "tags": [ + "API Specification" + ], + "responses": { + "200": { + "description": "OpenAPI Definition data", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + } + } + }, + "/version": { + "get": { + "operationId": "getVersions", + "summary": "Get versions", + "description": "Retrieve a list of versions associated with a project API key.", + "tags": [ + "Version" + ], + "responses": { + "200": { + "description": "A list of versions." + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "post": { + "operationId": "createVersion", + "summary": "Create version", + "description": "Create a new version.", + "tags": [ + "Version" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Semantic Version" + }, + "codename": { + "type": "string", + "description": "Dubbed name of version." + }, + "from": { + "type": "string", + "description": "Semantic Version to use as the base fork." + }, + "is_stable": { + "type": "boolean", + "description": "Should this be the **main** version?" + }, + "is_beta": { + "type": "boolean", + "default": true + }, + "is_hidden": { + "type": "boolean", + "description": "Should this be publically accessible?" + }, + "is_deprecated": { + "type": "boolean", + "description": "Should this be deprecated? Only allowed in PUT operations." + } + }, + "required": [ + "version", + "from" + ] + } + } + } + }, + "responses": { + "200": { + "description": "The version was successfully created." + }, + "400": { + "description": "There was a validation error during creation.", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_DUPLICATE" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_FORK_EMPTY" + } + } + } + ] + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The version couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_FORK_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/version/{versionId}": { + "get": { + "operationId": "getVersion", + "summary": "Get version", + "description": "Returns the version with this version ID.", + "tags": [ + "Version" + ], + "parameters": [ + { + "name": "versionId", + "in": "path", + "description": "Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions).", + "example": "v1.0.0", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The version exists and has been returned." + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The version couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "put": { + "operationId": "updateVersion", + "summary": "Update version", + "description": "Update an existing version.", + "tags": [ + "Version" + ], + "parameters": [ + { + "name": "versionId", + "in": "path", + "description": "Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions).", + "example": "v1.0.0", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Semantic Version" + }, + "codename": { + "type": "string", + "description": "Dubbed name of version." + }, + "from": { + "type": "string", + "description": "Semantic Version to use as the base fork." + }, + "is_stable": { + "type": "boolean", + "description": "Should this be the **main** version?" + }, + "is_beta": { + "type": "boolean", + "default": true + }, + "is_hidden": { + "type": "boolean", + "description": "Should this be publically accessible?" + }, + "is_deprecated": { + "type": "boolean", + "description": "Should this be deprecated? Only allowed in PUT operations." + } + }, + "required": [ + "version", + "from" + ] + } + } + } + }, + "responses": { + "200": { + "description": "The version was successfully updated." + }, + "400": { + "description": "A stable version can't be demoted.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_CANT_DEMOTE_STABLE" + } + } + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The version couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "deleteVersion", + "summary": "Delete version", + "description": "Delete a version", + "tags": [ + "Version" + ], + "parameters": [ + { + "name": "versionId", + "in": "path", + "description": "Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions).", + "example": "v1.0.0", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The version was successfully deleted." + }, + "400": { + "description": "A stable version can't be removed.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_CANT_REMOVE_STABLE" + } + } + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "403": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "404": { + "description": "The version couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + } + }, + "components": { + "securitySchemes": { + "apiKey": { + "type": "http", + "scheme": "basic" + } + }, + "headers": { + "link": { + "description": "Pagination information. See https://docs.readme.com/main/reference/pagination for more information.", + "schema": { + "type": "string" + } + }, + "x-total-count": { + "description": "The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination.", + "schema": { + "type": "string" + } + } + }, + "parameters": { + "slug": { + "name": "slug", + "in": "path", + "description": "A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\".", + "required": true, + "schema": { + "type": "string" + } + }, + "page": { + "name": "page", + "in": "query", + "description": "Used to specify further pages (starts at 1).", + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + }, + "perPage": { + "name": "perPage", + "in": "query", + "description": "Number of items to include in pagination (up to 100, defaults to 10).", + "schema": { + "type": "integer", + "default": 10, + "minimum": 1, + "maximum": 100 + } + }, + "x-readme-version": { + "in": "header", + "name": "x-readme-version", + "description": "Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions.", + "example": "v3.0", + "required": false, + "schema": { + "type": "string" + } + }, + "versionId": { + "name": "versionId", + "in": "path", + "description": "Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions).", + "example": "v1.0.0", + "required": true, + "schema": { + "type": "string" + } + } + }, + "responses": { + "authForbidden": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + ] + } + } + } + }, + "authUnauthorized": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + ] + } + } + } + }, + "error_APIKEY_EMPTY": { + "description": "An API key was not supplied.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + } + } + } + }, + "error_APIKEY_MISMATCH": { + "description": "The API key doesn't match the project.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + } + } + } + }, + "error_APIKEY_NOTFOUND": { + "description": "The API key couldn't be located.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_APPLY_INVALID_EMAIL": { + "description": "You need to provide a valid email.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APPLY_INVALID_EMAIL" + } + } + } + ] + } + } + } + }, + "error_APPLY_INVALID_JOB": { + "description": "You need to provide a job.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APPLY_INVALID_JOB" + } + } + } + ] + } + } + } + }, + "error_APPLY_INVALID_NAME": { + "description": "You need to provide a name.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APPLY_INVALID_NAME" + } + } + } + ] + } + } + } + }, + "error_CATEGORY_INVALID": { + "description": "The category couldn't be saved.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_INVALID" + } + } + } + ] + } + } + } + }, + "error_CATEGORY_NOTFOUND": { + "description": "The category couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_CHANGELOG_INVALID": { + "description": "The changelog couldn't be saved.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CHANGELOG_INVALID" + } + } + } + ] + } + } + } + }, + "error_CHANGELOG_NOTFOUND": { + "description": "The changelog couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CHANGELOG_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_CUSTOMPAGE_INVALID": { + "description": "The page couldn't be saved.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_INVALID" + } + } + } + ] + } + } + } + }, + "error_CUSTOMPAGE_NOTFOUND": { + "description": "The custom page couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_DOC_INVALID": { + "description": "The doc couldn't be saved.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_INVALID" + } + } + } + ] + } + } + } + }, + "error_DOC_NOTFOUND": { + "description": "The doc couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_ENDPOINT_NOTFOUND": { + "description": "The endpoint doesn't exist.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "ENDPOINT_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_INTERNAL_ERROR": { + "description": "An unknown error has occurred.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "INTERNAL_ERROR" + } + } + } + ] + } + } + } + }, + "error_PROJECT_NEEDSSTAGING": { + "description": "The project does not have staging enabled.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "PROJECT_NEEDSSTAGING" + } + } + } + ] + } + } + } + }, + "error_PROJECT_NOTFOUND": { + "description": "The project couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "PROJECT_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_RATE_LIMITED": { + "description": "The request has been rate limited.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "RATE_LIMITED" + } + } + } + ] + } + } + } + }, + "error_REGISTRY_INVALID": { + "description": "The registry entry couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "REGISTRY_INVALID" + } + } + } + ] + } + } + } + }, + "error_REGISTRY_NOTFOUND": { + "description": "The registry entry couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "REGISTRY_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_SPEC_FILE_EMPTY": { + "description": "A spec file wasn't included.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_FILE_EMPTY" + } + } + } + ] + } + } + } + }, + "error_SPEC_ID_DUPLICATE": { + "description": "The spec ID already tied to another version.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_ID_DUPLICATE" + } + } + } + ] + } + } + } + }, + "error_SPEC_ID_INVALID": { + "description": "The spec ID isn't valid.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_ID_INVALID" + } + } + } + ] + } + } + } + }, + "error_SPEC_INVALID": { + "description": "The uploaded spec isn't valid JSON or YAML.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_INVALID" + } + } + } + ] + } + } + } + }, + "error_SPEC_INVALID_SCHEMA": { + "description": "The uploaded spec has OpenAPI validation errors.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_INVALID_SCHEMA" + } + } + } + ] + } + } + } + }, + "error_SPEC_NOTFOUND": { + "description": "The spec couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_SPEC_TIMEOUT": { + "description": "The spec upload timed out.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_TIMEOUT" + } + } + } + ] + } + } + } + }, + "error_SPEC_VERSION_NOTFOUND": { + "description": "The spec version couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_VERSION_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_UNEXPECTED_ERROR": { + "description": "An unknown error has occurred.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "UNEXPECTED_ERROR" + } + } + } + ] + } + } + } + }, + "error_VERSION_CANT_DEMOTE_STABLE": { + "description": "A stable version can't be demoted.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_CANT_DEMOTE_STABLE" + } + } + } + ] + } + } + } + }, + "error_VERSION_CANT_REMOVE_STABLE": { + "description": "A stable version can't be removed.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_CANT_REMOVE_STABLE" + } + } + } + ] + } + } + } + }, + "error_VERSION_DUPLICATE": { + "description": "The version already exists.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_DUPLICATE" + } + } + } + ] + } + } + } + }, + "error_VERSION_EMPTY": { + "description": "No version was supplied.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_EMPTY" + } + } + } + ] + } + } + } + }, + "error_VERSION_FORK_EMPTY": { + "description": "New versions need to be forked from an existing version.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_FORK_EMPTY" + } + } + } + ] + } + } + } + }, + "error_VERSION_FORK_NOTFOUND": { + "description": "The version couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_FORK_NOTFOUND" + } + } + } + ] + } + } + } + }, + "error_VERSION_INVALID": { + "description": "The version is invalid.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_INVALID" + } + } + } + ] + } + } + } + }, + "error_VERSION_NOTFOUND": { + "description": "The version couldn't be found.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_NOTFOUND" + } + } + } + ] + } + } + } + } + }, + "schemas": { + "baseError": { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + "apply": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1, + "description": "Your full name", + "default": "Your Name" + }, + "email": { + "type": "string", + "format": "email", + "description": "A valid email we can reach you at.", + "default": "you@example.com" + }, + "job": { + "type": "string", + "description": "The job you're looking to apply for (https://readme.com/careers).", + "enum": [ + "Product Designer" + ], + "default": "Product Designer" + }, + "pronouns": { + "type": "string", + "description": "Learn more at https://lgbtlifecenter.org/pronouns/" + }, + "linkedin": { + "type": "string", + "format": "url", + "description": "What have you been up to the past few years?" + }, + "github": { + "type": "string", + "description": "Or Bitbucket, Gitlab or anywhere else your code is hosted!", + "format": "url" + }, + "coverLetter": { + "type": "string", + "format": "blob", + "description": "What should we know about you?" + }, + "dontReallyApply": { + "type": "boolean", + "description": "Want to play with the API but not actually apply? Set this to true.", + "default": false + } + }, + "required": [ + "name", + "email", + "job" + ] + }, + "category": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A short title for the category. This is what will show in the sidebar." + }, + "type": { + "type": "string", + "enum": [ + "reference", + "guide" + ], + "default": "guide", + "description": "A category can be part of your reference or guide documentation, which is determined by this field." + } + } + }, + "changelog": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the changelog." + }, + "type": { + "type": "string", + "default": "", + "enum": [ + "", + "added", + "fixed", + "improved", + "deprecated", + "removed" + ] + }, + "body": { + "type": "string", + "description": "Body content of the changelog." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the changelog.", + "default": true + } + }, + "required": [ + "title", + "body" + ] + }, + "condensedProjectData": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "subdomain": { + "type": "string" + }, + "jwtSecret": { + "type": "string" + }, + "baseUrl": { + "type": "string", + "format": "url", + "description": "The base URL for the project. If the project is not running under a custom domain, it will be `https://projectSubdomain.readme.io`, otherwise it can either be or `https://example.com` or, in the case of an enterprise child project `https://example.com/projectSubdomain`." + }, + "plan": { + "type": "string" + } + } + }, + "customPage": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the custom page." + }, + "body": { + "type": "string", + "description": "Body formatted in Markdown (displayed by default)." + }, + "html": { + "type": "string", + "description": "Body formatted in HTML (sanitized, only displayed if `htmlmode` is **true**)." + }, + "htmlmode": { + "type": "boolean", + "description": "**true** if `html` should be displayed, **false** if `body` should be displayed.", + "default": false + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the custom page.", + "default": true + } + }, + "required": [ + "title" + ] + }, + "docSchemaPost": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": [ + "basic", + "error", + "link" + ] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + }, + "categorySlug": { + "type": "string", + "description": "The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field." + }, + "parentDocSlug": { + "type": "string", + "description": "If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field." + } + }, + "oneOf": [ + { + "required": [ + "title", + "category" + ], + "title": "`category` Parameter" + }, + { + "required": [ + "title", + "categorySlug" + ], + "title": "`categorySlug` Parameter" + } + ], + "additionalProperties": true + }, + "docSchemaPut": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": [ + "basic", + "error", + "link" + ] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + }, + "categorySlug": { + "type": "string", + "description": "The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field." + }, + "parentDocSlug": { + "type": "string", + "description": "If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field." + } + }, + "additionalProperties": true + }, + "docSchemaResponse": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Title of the page." + }, + "type": { + "type": "string", + "description": "Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).", + "enum": [ + "basic", + "error", + "link" + ] + }, + "body": { + "type": "string", + "description": "Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)." + }, + "category": { + "type": "string", + "description": "Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)." + }, + "hidden": { + "type": "boolean", + "description": "Visibility of the page." + }, + "order": { + "type": "integer", + "description": "The position of the page in your project sidebar.", + "example": 999 + }, + "parentDoc": { + "type": "string", + "description": "The parent doc's ID, if the page is a subpage." + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code for docs with the \"error\" type." + } + } + } + }, + "additionalProperties": true + }, + "version": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "Semantic Version" + }, + "codename": { + "type": "string", + "description": "Dubbed name of version." + }, + "from": { + "type": "string", + "description": "Semantic Version to use as the base fork." + }, + "is_stable": { + "type": "boolean", + "description": "Should this be the **main** version?" + }, + "is_beta": { + "type": "boolean", + "default": true + }, + "is_hidden": { + "type": "boolean", + "description": "Should this be publically accessible?" + }, + "is_deprecated": { + "type": "boolean", + "description": "Should this be deprecated? Only allowed in PUT operations." + } + }, + "required": [ + "version", + "from" + ] + }, + "jobOpening": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "A slugified version of the job opening title.", + "example": "api-engineer" + }, + "title": { + "type": "string", + "description": "The job opening position.", + "example": "API Engineer" + }, + "description": { + "type": "string", + "description": "The description for this open position. This content is formatted as HTML." + }, + "pullquote": { + "type": "string", + "description": "A short pullquote for the open position.", + "example": "Deeply knowledgeable of the web, HTTP, and the API space." + }, + "location": { + "type": "string", + "description": "Where this position is located at.", + "example": "Remote" + }, + "department": { + "type": "string", + "description": "The internal organization you'll be working in.", + "example": "Engineering" + }, + "url": { + "type": "string", + "format": "url", + "description": "The place where you can apply for the position!" + } + } + }, + "error_APIKEY_EMPTY": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_EMPTY" + } + } + } + ] + }, + "error_APIKEY_MISMATCH": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_MISMATCH" + } + } + } + ] + }, + "error_APIKEY_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APIKEY_NOTFOUND" + } + } + } + ] + }, + "error_APPLY_INVALID_EMAIL": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APPLY_INVALID_EMAIL" + } + } + } + ] + }, + "error_APPLY_INVALID_JOB": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APPLY_INVALID_JOB" + } + } + } + ] + }, + "error_APPLY_INVALID_NAME": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "APPLY_INVALID_NAME" + } + } + } + ] + }, + "error_CATEGORY_INVALID": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_INVALID" + } + } + } + ] + }, + "error_CATEGORY_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CATEGORY_NOTFOUND" + } + } + } + ] + }, + "error_CHANGELOG_INVALID": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CHANGELOG_INVALID" + } + } + } + ] + }, + "error_CHANGELOG_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CHANGELOG_NOTFOUND" + } + } + } + ] + }, + "error_CUSTOMPAGE_INVALID": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_INVALID" + } + } + } + ] + }, + "error_CUSTOMPAGE_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "CUSTOMPAGE_NOTFOUND" + } + } + } + ] + }, + "error_DOC_INVALID": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_INVALID" + } + } + } + ] + }, + "error_DOC_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "DOC_NOTFOUND" + } + } + } + ] + }, + "error_ENDPOINT_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "ENDPOINT_NOTFOUND" + } + } + } + ] + }, + "error_INTERNAL_ERROR": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "INTERNAL_ERROR" + } + } + } + ] + }, + "error_PROJECT_NEEDSSTAGING": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "PROJECT_NEEDSSTAGING" + } + } + } + ] + }, + "error_PROJECT_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "PROJECT_NOTFOUND" + } + } + } + ] + }, + "error_RATE_LIMITED": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "RATE_LIMITED" + } + } + } + ] + }, + "error_REGISTRY_INVALID": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "REGISTRY_INVALID" + } + } + } + ] + }, + "error_REGISTRY_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "REGISTRY_NOTFOUND" + } + } + } + ] + }, + "error_SPEC_FILE_EMPTY": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_FILE_EMPTY" + } + } + } + ] + }, + "error_SPEC_ID_DUPLICATE": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_ID_DUPLICATE" + } + } + } + ] + }, + "error_SPEC_ID_INVALID": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_ID_INVALID" + } + } + } + ] + }, + "error_SPEC_INVALID": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_INVALID" + } + } + } + ] + }, + "error_SPEC_INVALID_SCHEMA": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_INVALID_SCHEMA" + } + } + } + ] + }, + "error_SPEC_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_NOTFOUND" + } + } + } + ] + }, + "error_SPEC_TIMEOUT": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_TIMEOUT" + } + } + } + ] + }, + "error_SPEC_VERSION_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "SPEC_VERSION_NOTFOUND" + } + } + } + ] + }, + "error_UNEXPECTED_ERROR": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "UNEXPECTED_ERROR" + } + } + } + ] + }, + "error_VERSION_CANT_DEMOTE_STABLE": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_CANT_DEMOTE_STABLE" + } + } + } + ] + }, + "error_VERSION_CANT_REMOVE_STABLE": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_CANT_REMOVE_STABLE" + } + } + } + ] + }, + "error_VERSION_DUPLICATE": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_DUPLICATE" + } + } + } + ] + }, + "error_VERSION_EMPTY": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_EMPTY" + } + } + } + ] + }, + "error_VERSION_FORK_EMPTY": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_FORK_EMPTY" + } + } + } + ] + }, + "error_VERSION_FORK_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_FORK_NOTFOUND" + } + } + } + ] + }, + "error_VERSION_INVALID": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_INVALID" + } + } + } + ] + }, + "error_VERSION_NOTFOUND": { + "allOf": [ + { + "type": "object", + "properties": { + "error": { + "type": "string", + "description": "An error code unique to the error received." + }, + "message": { + "type": "string", + "description": "The reason why the error occured." + }, + "suggestion": { + "type": "string", + "description": "A helpful suggestion for how to alleviate the error." + }, + "docs": { + "type": "string", + "format": "url", + "description": "A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.", + "example": "https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f" + }, + "help": { + "type": "string", + "description": "Information on where you can receive additional assistance from our wonderful support team.", + "example": "If you need help, email support@readme.io" + }, + "poem": { + "type": "array", + "description": "A short poem we wrote you about your error.", + "items": { + "type": "string" + }, + "example": [ + "If you're seeing this error,", + "Things didn't quite go the way we hoped.", + "When we tried to process your request,", + "Maybe trying again it'll work—who knows!" + ] + } + } + }, + { + "type": "object", + "properties": { + "error": { + "type": "string", + "default": "VERSION_NOTFOUND" + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/node/src/.api/apis/developers/schemas.ts b/packages/node/src/.api/apis/developers/schemas.ts new file mode 100644 index 0000000000..b8a53852aa --- /dev/null +++ b/packages/node/src/.api/apis/developers/schemas.ts @@ -0,0 +1,73 @@ +const ApplyToReadMe = {"body":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Your full name","default":"Your Name"},"email":{"type":"string","format":"email","description":"A valid email we can reach you at.","default":"you@example.com"},"job":{"type":"string","description":"The job you're looking to apply for (https://readme.com/careers).\n\nDefault: `Product Designer`","enum":["Product Designer"],"default":"Product Designer"},"pronouns":{"type":"string","description":"Learn more at https://lgbtlifecenter.org/pronouns/"},"linkedin":{"type":"string","format":"url","description":"What have you been up to the past few years?"},"github":{"type":"string","description":"Or Bitbucket, Gitlab or anywhere else your code is hosted!","format":"url"},"coverLetter":{"type":"string","format":"blob","description":"What should we know about you?"},"dontReallyApply":{"type":"boolean","description":"Want to play with the API but not actually apply? Set this to true.","default":false}},"required":["name","email","job"],"$schema":"http://json-schema.org/draft-04/schema#"}} as const +; +const CreateCategory = {"body":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"A short title for the category. This is what will show in the sidebar."},"type":{"type":"string","enum":["reference","guide"],"default":"guide","description":"A category can be part of your reference or guide documentation, which is determined by this field.\n\nDefault: `guide`"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"400":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CATEGORY_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const CreateChangelog = {"body":{"type":"object","properties":{"title":{"type":"string","description":"Title of the changelog."},"type":{"type":"string","enum":["","added","fixed","improved","deprecated","removed"],"description":"Default: "},"body":{"type":"string","description":"Body content of the changelog."},"hidden":{"type":"boolean","description":"Visibility of the changelog.","default":true}},"required":["title","body"],"$schema":"http://json-schema.org/draft-04/schema#"}} as const +; +const CreateCustomPage = {"body":{"type":"object","properties":{"title":{"type":"string","description":"Title of the custom page."},"body":{"type":"string","description":"Body formatted in Markdown (displayed by default)."},"html":{"type":"string","description":"Body formatted in HTML (sanitized, only displayed if `htmlmode` is **true**)."},"htmlmode":{"type":"boolean","description":"**true** if `html` should be displayed, **false** if `body` should be displayed.","default":false},"hidden":{"type":"boolean","description":"Visibility of the custom page.","default":true}},"required":["title"],"$schema":"http://json-schema.org/draft-04/schema#"},"response":{"400":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CUSTOMPAGE_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const CreateDoc = {"body":{"type":"object","oneOf":[{"required":["title","category"],"title":"`category` Parameter","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}},"categorySlug":{"type":"string","description":"The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field."},"parentDocSlug":{"type":"string","description":"If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field."}},"type":"object"},{"required":["title","categorySlug"],"title":"`categorySlug` Parameter","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}},"categorySlug":{"type":"string","description":"The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field."},"parentDocSlug":{"type":"string","description":"If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field."}},"type":"object"}],"additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"201":{"type":"object","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).\n\n`basic` `error` `link`","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}}},"additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"},"400":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"DOC_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const CreateVersion = {"body":{"type":"object","properties":{"version":{"type":"string","description":"Semantic Version"},"codename":{"type":"string","description":"Dubbed name of version."},"from":{"type":"string","description":"Semantic Version to use as the base fork."},"is_stable":{"type":"boolean","description":"Should this be the **main** version?"},"is_beta":{"type":"boolean","default":true},"is_hidden":{"type":"boolean","description":"Should this be publically accessible?"},"is_deprecated":{"type":"boolean","description":"Should this be deprecated? Only allowed in PUT operations."}},"required":["version","from"],"$schema":"http://json-schema.org/draft-04/schema#"},"response":{"400":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_DUPLICATE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_FORK_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_FORK_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const DeleteApiSpecification = {"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the API specification. The unique ID for each API can be found by navigating to your **API Definitions** page."}},"required":["id"]}]},"response":{"400":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_ID_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const DeleteCategory = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CATEGORY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const DeleteChangelog = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Weekly Update\", enter the slug \"owlet-weekly-update\"."}},"required":["slug"]}]}} as const +; +const DeleteCustomPage = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]}]},"response":{"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CUSTOMPAGE_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const DeleteDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"DOC_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const DeleteVersion = {"metadata":{"allOf":[{"type":"object","properties":{"versionId":{"type":"string","examples":["v1.0.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions)."}},"required":["versionId"]}]},"response":{"400":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_CANT_REMOVE_STABLE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetApiRegistry = {"metadata":{"allOf":[{"type":"object","properties":{"uuid":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"An API Registry UUID. This can be found by navigating to your API Reference page and viewing code snippets for Node with the `api` library."}},"required":["uuid"]}]},"response":{"200":{"type":"object","additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"REGISTRY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetApiSchema = {"response":{"200":{"type":"object","additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetApiSpecification = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}},"400":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetCategories = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}}}} as const +; +const GetCategory = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CATEGORY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetCategoryDocs = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CATEGORY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetChangelog = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Update\", enter the slug \"owlet-update\"."}},"required":["slug"]}]}} as const +; +const GetChangelogs = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}}}} as const +; +const GetCustomPage = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]}]},"response":{"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CUSTOMPAGE_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetCustomPages = {"metadata":{"allOf":[{"type":"object","properties":{"perPage":{"type":"integer","default":10,"minimum":1,"maximum":100,"$schema":"http://json-schema.org/draft-04/schema#","description":"Number of items to include in pagination (up to 100, defaults to 10)."},"page":{"type":"integer","default":1,"minimum":1,"$schema":"http://json-schema.org/draft-04/schema#","description":"Used to specify further pages (starts at 1)."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"Link":{"type":"string","description":"Pagination information. See https://docs.readme.com/main/reference/pagination for more information."},"x-total-count":{"type":"string","description":"The total amount of results, ignoring pagination. See https://docs.readme.com/main/reference/pagination for more information about pagination."}}},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).\n\n`basic` `error` `link`","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}}},"additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"DOC_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetOpenRoles = {"response":{"200":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"A slugified version of the job opening title.","examples":["api-engineer"]},"title":{"type":"string","description":"The job opening position.","examples":["API Engineer"]},"description":{"type":"string","description":"The description for this open position. This content is formatted as HTML."},"pullquote":{"type":"string","description":"A short pullquote for the open position.","examples":["Deeply knowledgeable of the web, HTTP, and the API space."]},"location":{"type":"string","description":"Where this position is located at.","examples":["Remote"]},"department":{"type":"string","description":"The internal organization you'll be working in.","examples":["Engineering"]},"url":{"type":"string","format":"url","description":"The place where you can apply for the position!"}}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetProductionDoc = {"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).\n\n`basic` `error` `link`","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}}},"additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"DOC_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetProject = {"response":{"200":{"type":"object","properties":{"name":{"type":"string"},"subdomain":{"type":"string"},"jwtSecret":{"type":"string"},"baseUrl":{"type":"string","format":"url","description":"The base URL for the project. If the project is not running under a custom domain, it will be `https://projectSubdomain.readme.io`, otherwise it can either be or `https://example.com` or, in the case of an enterprise child project `https://example.com/projectSubdomain`."},"plan":{"type":"string"}},"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetVersion = {"metadata":{"allOf":[{"type":"object","properties":{"versionId":{"type":"string","examples":["v1.0.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions)."}},"required":["versionId"]}]},"response":{"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const GetVersions = {"response":{"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const SearchDocs = {"metadata":{"allOf":[{"type":"object","properties":{"search":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"Search string to look for."}},"required":["search"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const UpdateApiSpecification = {"body":{"type":"object","properties":{"spec":{"description":"OpenAPI/Swagger file. We accept JSON or YAML.","type":"string","format":"binary"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"id":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"ID of the API specification. The unique ID for each API can be found by navigating to your **API Definitions** page."}},"required":["id"]}]},"response":{"400":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_FILE_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_ID_DUPLICATE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_ID_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_INVALID_SCHEMA"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_VERSION_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"408":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_TIMEOUT"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const UpdateCategory = {"body":{"type":"object","properties":{"title":{"type":"string","description":"A short title for the category. This is what will show in the sidebar."},"type":{"type":"string","enum":["reference","guide"],"default":"guide","description":"A category can be part of your reference or guide documentation, which is determined by this field.\n\nDefault: `guide`"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","examples":["getting-started"],"$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the category title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the category \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"400":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CATEGORY_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CATEGORY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const UpdateChangelog = {"body":{"type":"object","properties":{"title":{"type":"string","description":"Title of the changelog."},"type":{"type":"string","enum":["","added","fixed","improved","deprecated","removed"],"description":"Default: "},"body":{"type":"string","description":"Body content of the changelog."},"hidden":{"type":"boolean","description":"Visibility of the changelog.","default":true}},"required":["title","body"],"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the changelog title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the changelog \"Owlet Weekly Update\", enter the slug \"owlet-weekly-update\"."}},"required":["slug"]}]}} as const +; +const UpdateCustomPage = {"body":{"type":"object","properties":{"title":{"type":"string","description":"Title of the custom page."},"body":{"type":"string","description":"Body formatted in Markdown (displayed by default)."},"html":{"type":"string","description":"Body formatted in HTML (sanitized, only displayed if `htmlmode` is **true**)."},"htmlmode":{"type":"boolean","description":"**true** if `html` should be displayed, **false** if `body` should be displayed.","default":false},"hidden":{"type":"boolean","description":"Visibility of the custom page.","default":true}},"required":["title"],"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]}]},"response":{"400":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CUSTOMPAGE_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"CUSTOMPAGE_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const UpdateDoc = {"body":{"type":"object","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}},"categorySlug":{"type":"string","description":"The slug of the category this page is associated with. You can get this through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories). This field is an alternative to the `category` field."},"parentDocSlug":{"type":"string","description":"If this page is a subpage, this field will be the slug of the parent document. You can get this through https://docs.readme.com/main/reference/docs#getdoc. This field is an alternative to the `parentDoc` field."}},"additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"slug":{"type":"string","$schema":"http://json-schema.org/draft-04/schema#","description":"A URL-safe representation of the page title. Slugs must be all lowercase, and replace spaces with hyphens. For example, for the title \"Getting Started\", enter the slug \"getting-started\"."}},"required":["slug"]},{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"200":{"type":"object","properties":{"title":{"type":"string","description":"Title of the page."},"type":{"type":"string","description":"Type of the page. The available types all show up under the /docs/ URL path of your docs project (also known as the \"guides\" section). Can be \"basic\" (most common), \"error\" (page desribing an API error), or \"link\" (page that redirects to an external link).\n\n`basic` `error` `link`","enum":["basic","error","link"]},"body":{"type":"string","description":"Body content of the page, formatted in [ReadMe-flavored Markdown](https://docs.readme.com/rdmd/docs)."},"category":{"type":"string","description":"Category ID of the page, which you can get through [the **Get all categories** endpoint](https://docs.readme.com/main/reference/getcategories)."},"hidden":{"type":"boolean","description":"Visibility of the page."},"order":{"type":"integer","description":"The position of the page in your project sidebar.","examples":[999]},"parentDoc":{"type":"string","description":"The parent doc's ID, if the page is a subpage."},"error":{"type":"object","properties":{"code":{"type":"string","description":"The error code for docs with the \"error\" type."}}}},"additionalProperties":true,"$schema":"http://json-schema.org/draft-04/schema#"},"400":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"DOC_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"DOC_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const UpdateVersion = {"body":{"type":"object","properties":{"version":{"type":"string","description":"Semantic Version"},"codename":{"type":"string","description":"Dubbed name of version."},"from":{"type":"string","description":"Semantic Version to use as the base fork."},"is_stable":{"type":"boolean","description":"Should this be the **main** version?"},"is_beta":{"type":"boolean","default":true},"is_hidden":{"type":"boolean","description":"Should this be publically accessible?"},"is_deprecated":{"type":"boolean","description":"Should this be deprecated? Only allowed in PUT operations."}},"required":["version","from"],"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"versionId":{"type":"string","examples":["v1.0.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Semver identifier for the project version. For best results, use the formatted `version_clean` value listed in the response from the [Get Versions endpoint](/reference/getversions)."}},"required":["versionId"]}]},"response":{"400":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_CANT_DEMOTE_STABLE"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"404":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"VERSION_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +const UploadApiSpecification = {"body":{"type":"object","properties":{"spec":{"description":"OpenAPI/Swagger file. We accept JSON or YAML.","type":"string","format":"binary"}},"$schema":"http://json-schema.org/draft-04/schema#"},"metadata":{"allOf":[{"type":"object","properties":{"x-readme-version":{"type":"string","examples":["v3.0"],"$schema":"http://json-schema.org/draft-04/schema#","description":"Version number of your docs project, for example, v3.0. By default the main project version is used. To see all valid versions for your docs project call https://docs.readme.com/main/reference/version#getversions."}},"required":[]}]},"response":{"400":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_FILE_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_INVALID"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_INVALID_SCHEMA"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_VERSION_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"401":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_EMPTY"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}},{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_NOTFOUND"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"403":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"APIKEY_MISMATCH"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}}}],"$schema":"http://json-schema.org/draft-04/schema#"},"408":{"type":"object","properties":{"error":{"type":"string","description":"An error code unique to the error received.","default":"SPEC_TIMEOUT"},"message":{"type":"string","description":"The reason why the error occured."},"suggestion":{"type":"string","description":"A helpful suggestion for how to alleviate the error."},"docs":{"type":"string","format":"url","description":"A [ReadMe Metrics](https://readme.com/metrics/) log URL where you can see more information the request that you made. If we have metrics URLs unavailable for your request, this URL will be a URL to our API Reference.","examples":["https://docs.readme.com/logs/6883d0ee-cf79-447a-826f-a48f7d5bdf5f"]},"help":{"type":"string","description":"Information on where you can receive additional assistance from our wonderful support team.","examples":["If you need help, email support@readme.io"]},"poem":{"type":"array","description":"A short poem we wrote you about your error.","items":{"type":"string"},"examples":["If you're seeing this error,","Things didn't quite go the way we hoped.","When we tried to process your request,","Maybe trying again it'll work—who knows!"]}},"$schema":"http://json-schema.org/draft-04/schema#"}}} as const +; +export { ApplyToReadMe, CreateCategory, CreateChangelog, CreateCustomPage, CreateDoc, CreateVersion, DeleteApiSpecification, DeleteCategory, DeleteChangelog, DeleteCustomPage, DeleteDoc, DeleteVersion, GetApiRegistry, GetApiSchema, GetApiSpecification, GetCategories, GetCategory, GetCategoryDocs, GetChangelog, GetChangelogs, GetCustomPage, GetCustomPages, GetDoc, GetOpenRoles, GetProductionDoc, GetProject, GetVersion, GetVersions, SearchDocs, UpdateApiSpecification, UpdateCategory, UpdateChangelog, UpdateCustomPage, UpdateDoc, UpdateVersion, UploadApiSpecification } diff --git a/packages/node/src/.api/apis/developers/types.ts b/packages/node/src/.api/apis/developers/types.ts new file mode 100644 index 0000000000..cd1c29655b --- /dev/null +++ b/packages/node/src/.api/apis/developers/types.ts @@ -0,0 +1,131 @@ +import type { FromSchema } from 'json-schema-to-ts'; +import * as schemas from './schemas'; + +export type ApplyToReadMeBodyParam = FromSchema; +export type CreateCategoryBodyParam = FromSchema; +export type CreateCategoryMetadataParam = FromSchema; +export type CreateCategoryResponse400 = FromSchema; +export type CreateChangelogBodyParam = FromSchema; +export type CreateCustomPageBodyParam = FromSchema; +export type CreateCustomPageResponse400 = FromSchema; +export type CreateCustomPageResponse401 = FromSchema; +export type CreateCustomPageResponse403 = FromSchema; +export type CreateDocBodyParam = FromSchema; +export type CreateDocMetadataParam = FromSchema; +export type CreateDocResponse201 = FromSchema; +export type CreateDocResponse400 = FromSchema; +export type CreateDocResponse401 = FromSchema; +export type CreateDocResponse403 = FromSchema; +export type CreateVersionBodyParam = FromSchema; +export type CreateVersionResponse400 = FromSchema; +export type CreateVersionResponse401 = FromSchema; +export type CreateVersionResponse403 = FromSchema; +export type CreateVersionResponse404 = FromSchema; +export type DeleteApiSpecificationMetadataParam = FromSchema; +export type DeleteApiSpecificationResponse400 = FromSchema; +export type DeleteApiSpecificationResponse401 = FromSchema; +export type DeleteApiSpecificationResponse403 = FromSchema; +export type DeleteApiSpecificationResponse404 = FromSchema; +export type DeleteCategoryMetadataParam = FromSchema; +export type DeleteCategoryResponse404 = FromSchema; +export type DeleteChangelogMetadataParam = FromSchema; +export type DeleteCustomPageMetadataParam = FromSchema; +export type DeleteCustomPageResponse401 = FromSchema; +export type DeleteCustomPageResponse403 = FromSchema; +export type DeleteCustomPageResponse404 = FromSchema; +export type DeleteDocMetadataParam = FromSchema; +export type DeleteDocResponse401 = FromSchema; +export type DeleteDocResponse403 = FromSchema; +export type DeleteDocResponse404 = FromSchema; +export type DeleteVersionMetadataParam = FromSchema; +export type DeleteVersionResponse400 = FromSchema; +export type DeleteVersionResponse401 = FromSchema; +export type DeleteVersionResponse403 = FromSchema; +export type DeleteVersionResponse404 = FromSchema; +export type GetApiRegistryMetadataParam = FromSchema; +export type GetApiRegistryResponse200 = FromSchema; +export type GetApiRegistryResponse404 = FromSchema; +export type GetApiSchemaResponse200 = FromSchema; +export type GetApiSpecificationMetadataParam = FromSchema; +export type GetApiSpecificationResponse200 = FromSchema; +export type GetApiSpecificationResponse400 = FromSchema; +export type GetApiSpecificationResponse401 = FromSchema; +export type GetApiSpecificationResponse403 = FromSchema; +export type GetApiSpecificationResponse404 = FromSchema; +export type GetCategoriesMetadataParam = FromSchema; +export type GetCategoriesResponse200 = FromSchema; +export type GetCategoryDocsMetadataParam = FromSchema; +export type GetCategoryDocsResponse404 = FromSchema; +export type GetCategoryMetadataParam = FromSchema; +export type GetCategoryResponse404 = FromSchema; +export type GetChangelogMetadataParam = FromSchema; +export type GetChangelogsMetadataParam = FromSchema; +export type GetChangelogsResponse200 = FromSchema; +export type GetCustomPageMetadataParam = FromSchema; +export type GetCustomPageResponse401 = FromSchema; +export type GetCustomPageResponse403 = FromSchema; +export type GetCustomPageResponse404 = FromSchema; +export type GetCustomPagesMetadataParam = FromSchema; +export type GetCustomPagesResponse200 = FromSchema; +export type GetCustomPagesResponse401 = FromSchema; +export type GetCustomPagesResponse403 = FromSchema; +export type GetDocMetadataParam = FromSchema; +export type GetDocResponse200 = FromSchema; +export type GetDocResponse401 = FromSchema; +export type GetDocResponse403 = FromSchema; +export type GetDocResponse404 = FromSchema; +export type GetOpenRolesResponse200 = FromSchema; +export type GetProductionDocMetadataParam = FromSchema; +export type GetProductionDocResponse200 = FromSchema; +export type GetProductionDocResponse401 = FromSchema; +export type GetProductionDocResponse403 = FromSchema; +export type GetProductionDocResponse404 = FromSchema; +export type GetProjectResponse200 = FromSchema; +export type GetProjectResponse401 = FromSchema; +export type GetProjectResponse403 = FromSchema; +export type GetVersionMetadataParam = FromSchema; +export type GetVersionResponse401 = FromSchema; +export type GetVersionResponse403 = FromSchema; +export type GetVersionResponse404 = FromSchema; +export type GetVersionsResponse401 = FromSchema; +export type GetVersionsResponse403 = FromSchema; +export type SearchDocsMetadataParam = FromSchema; +export type SearchDocsResponse401 = FromSchema; +export type SearchDocsResponse403 = FromSchema; +export type UpdateApiSpecificationBodyParam = FromSchema; +export type UpdateApiSpecificationMetadataParam = FromSchema; +export type UpdateApiSpecificationResponse400 = FromSchema; +export type UpdateApiSpecificationResponse401 = FromSchema; +export type UpdateApiSpecificationResponse403 = FromSchema; +export type UpdateApiSpecificationResponse408 = FromSchema; +export type UpdateCategoryBodyParam = FromSchema; +export type UpdateCategoryMetadataParam = FromSchema; +export type UpdateCategoryResponse400 = FromSchema; +export type UpdateCategoryResponse404 = FromSchema; +export type UpdateChangelogBodyParam = FromSchema; +export type UpdateChangelogMetadataParam = FromSchema; +export type UpdateCustomPageBodyParam = FromSchema; +export type UpdateCustomPageMetadataParam = FromSchema; +export type UpdateCustomPageResponse400 = FromSchema; +export type UpdateCustomPageResponse401 = FromSchema; +export type UpdateCustomPageResponse403 = FromSchema; +export type UpdateCustomPageResponse404 = FromSchema; +export type UpdateDocBodyParam = FromSchema; +export type UpdateDocMetadataParam = FromSchema; +export type UpdateDocResponse200 = FromSchema; +export type UpdateDocResponse400 = FromSchema; +export type UpdateDocResponse401 = FromSchema; +export type UpdateDocResponse403 = FromSchema; +export type UpdateDocResponse404 = FromSchema; +export type UpdateVersionBodyParam = FromSchema; +export type UpdateVersionMetadataParam = FromSchema; +export type UpdateVersionResponse400 = FromSchema; +export type UpdateVersionResponse401 = FromSchema; +export type UpdateVersionResponse403 = FromSchema; +export type UpdateVersionResponse404 = FromSchema; +export type UploadApiSpecificationBodyParam = FromSchema; +export type UploadApiSpecificationMetadataParam = FromSchema; +export type UploadApiSpecificationResponse400 = FromSchema; +export type UploadApiSpecificationResponse401 = FromSchema; +export type UploadApiSpecificationResponse403 = FromSchema; +export type UploadApiSpecificationResponse408 = FromSchema; diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index 0daa3ff1e6..554ddbdd64 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -1,5 +1,6 @@ import { getProjectBaseUrl } from './lib/get-project-base-url'; import { log } from './lib/log'; +import ReadMe from './lib/ReadMe'; import verifyWebhook from './lib/verify-webhook'; -export { log, verifyWebhook, getProjectBaseUrl }; +export { verifyWebhook, log, ReadMe, getProjectBaseUrl }; diff --git a/packages/node/src/lib/ReadMe.ts b/packages/node/src/lib/ReadMe.ts new file mode 100644 index 0000000000..d173593992 --- /dev/null +++ b/packages/node/src/lib/ReadMe.ts @@ -0,0 +1,219 @@ +import type { Options } from './log'; +import type { GetProjectResponse200 } from '../.api/apis/developers'; +import type { NextFunction, Request, Response } from 'express'; + +import readmeSdk from '../.api/apis/developers'; + +import findAPIKey from './find-api-key'; +import { getGroupIdByApiKey } from './get-group-id'; +import { log } from './log'; +import { buildSetupView } from './setup-readme-view'; +import { testVerifyWebhook } from './test-verify-webhook'; +import verifyWebhook from './verify-webhook'; + +interface BasicAuthObject { + pass: string; + user: string; +} + +export interface ApiKey { + [x: string]: unknown; + + apiKey?: string | BasicAuthObject; + id?: string; + name?: string; + label?: string; +} + +export type KeyValue = string | Record; + +export interface GroupingObject { + [x: string]: KeyValue | string | undefined | ApiKey[]; + + email: string; + keys: ApiKey[]; + name: string; + label?: string; + id?: string; + apiKey?: string; +} + +// Typing the return as unknown to make it easier to format the user to our format in the middleware +// This way these functions can just return from their database +interface GetUserParams { + byAPIKey: (apiKey: string) => Promise; + byEmail: (email: string) => Promise; + manualAPIKey?: string; +} + +interface GetUserFunction { + (params: GetUserParams): Promise; +} + +interface ReadMeVersion { + is_stable: boolean; + version: string; +} + +/** + * Initialize this class with the API Key for your ReadMe project and use the `express` method + * to return middleware that will send supplied API requests to ReadMe Metrics and configure the ReadMe webhook. + * + * @see {@link https://readme.com/metrics} + * @see {@link https://docs.readme.com/main/docs/unified-snippet-docs} + */ +export default class ReadMe { + private readmeAPIKey: string; + + private readmeProjectData!: GetProjectResponse200; + + private readmeVersionData!: ReadMeVersion[]; + + /** + * @param key The API key for your ReadMe project. This ensures your requests end up in + * your dashboard. You can read more about the API key in + * [our docs](https://docs.readme.com/reference/authentication). + */ + constructor(key: string) { + this.readmeAPIKey = key; + } + + /** + * Express middleware that will send supplied API requests to ReadMe Metrics and will create a new endpoint for the ReadMe webhook. + */ + express( + userFunction: (req: Request, getUser: GetUserFunction) => Promise, + options: Options = { + disableWebhook: false, + disableMetrics: false, + development: false, + }, + ) { + return async (req: Request, res: Response, next: NextFunction) => { + let requestAPIKey = ''; + let usingManualAPIKey = false; + + const getUser: GetUserFunction = async ({ byAPIKey, byEmail, manualAPIKey }) => { + if (!byAPIKey && !options.disableMetrics) { + console.error( + 'Missing required definition for `byAPIKey`. Learn more here: https://docs.readme.com/main/docs/unified-snippet-docs#getuserbyapikey', + ); + return next(); + } + if (!byEmail && !options.disableWebhook) { + console.error( + 'Missing required definition for `byEmail`. Learn more here: https://docs.readme.com/main/docs/unified-snippet-docs#getuserbyapikey', + ); + return next(); + } + + if (req.path === '/readme-webhook' && req.method === 'POST' && !options.disableWebhook) { + const user = await byEmail(req.body.email); + if (!user) { + throw new Error(`User with email ${req.body.email} not found`); + } + return user; + } + if (manualAPIKey) { + // we should remember this for later + requestAPIKey = manualAPIKey; + usingManualAPIKey = true; + return byAPIKey(manualAPIKey); + } + // Try to figure out where the api key is + try { + requestAPIKey = findAPIKey(req); + } catch (e) { + console.error( + 'Could not automatically find an API key in the request. You should pass the API key via `manualAPIKey` in the `getUser` function. Learn more here: https://docs.readme.com/main/docs/unified-snippet-docs#getuserbyapikey', + ); + } + return byAPIKey(requestAPIKey); + }; + + const baseUrl = `${req.protocol}://${req.get('host')}${req.baseUrl}`; + + if (!this.readmeProjectData) { + readmeSdk.auth(this.readmeAPIKey); + try { + this.readmeProjectData = (await readmeSdk.getProject()).data; + this.readmeVersionData = (await readmeSdk.getVersions()).data as ReadMeVersion[]; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (e: any) { + // TODO: Maybe send this to sentry? + if (e.status === 401) { + console.error('Invalid ReadMe API key. Contact support@readme.io for help!'); + console.error(e.data); + } else { + console.error('Error calling ReadMe API. Contact support@readme.io for help!'); + console.error(e.data); + } + // Don't want to cause an error in their API + return next(); + } + } + + if (req.path === '/readme-webhook' && req.method === 'POST' && !options.disableWebhook) { + try { + verifyWebhook( + req.body, + req.headers['readme-signature'] as string, + this.readmeProjectData.jwtSecret as string, + ); + const user = await userFunction(req, getUser); + return res.send(user); + } catch (e) { + return res.status(400).json({ error: (e as Error).message }); + } + } else if (req.path === '/readme-setup' && options.development) { + const setupHtml = buildSetupView({ + baseUrl, + subdomain: this.readmeProjectData.subdomain as string, + stableVersion: this.readmeVersionData?.find(version => version.is_stable)?.version || '1.0', + readmeAPIKey: this.readmeAPIKey, + disableMetrics: options.disableMetrics, + disableWebhook: options.disableWebhook, + }); + return res.send(setupHtml); + } else if (req.path === '/webhook-test' && options.development) { + const email = req.query.email as string; + try { + const webhookData = await testVerifyWebhook(baseUrl, email, this.readmeProjectData.jwtSecret as string); + return res.json({ ...webhookData }); + } catch (e) { + return res.status(400).json({ error: (e as Error).message }); + } + } + + try { + const user = await userFunction(req, getUser); + if (!user || !Object.keys(user).length || options.disableMetrics) return next(); + + const groupId = getGroupIdByApiKey(user, requestAPIKey); + if (!groupId) { + console.error( + usingManualAPIKey + ? 'The API key you passed in via `manualAPIKey` could not be found in the user object you provided.' + : 'Could not automatically find an API key in the request. You should pass the API key via `manualAPIKey` in the `getUser` function. Learn more here: https://docs.readme.com/main/docs/unified-snippet-docs#/getuserbyapikey', + ); + return next(); + } + + log( + this.readmeAPIKey, + req, + res, + { + apiKey: groupId, + label: user.label ? user.label : user.name, + email: user.email, + }, + options, + ); + } catch (e) { + return next(); + } + return next(); + }; + } +} diff --git a/packages/node/src/lib/find-api-key.ts b/packages/node/src/lib/find-api-key.ts new file mode 100644 index 0000000000..471b682949 --- /dev/null +++ b/packages/node/src/lib/find-api-key.ts @@ -0,0 +1,37 @@ +import type { Request } from 'express'; + +export default function findAPIKey(req: Request): string { + // Authorization header + if (req.headers.authorization && req.headers.authorization.includes('Bearer')) { + return req.headers.authorization.split(' ')[1]; + } else if (req.headers.authorization && req.headers.authorization.includes('Basic')) { + const basicAuth = Buffer.from(req.headers.authorization.split(' ')[1], 'base64').toString().split(':'); + return basicAuth[0]; + } + + // Check other headers + // iterate over req.headers and see if api_key is in the name + const apiKeyHeader = Object.keys(req.headers).find( + headerName => + headerName.toLowerCase().includes('api-key') || + headerName.toLowerCase().includes('api_key') || + headerName.toLowerCase().includes('apikey'), + ); + + if (apiKeyHeader) { + return req.headers[apiKeyHeader] as string; + } + + // Is it a cookie? + // Ok idk what to do for this case yet + + // Is it a query param? + if (req.query.api_key) { + return req.query.api_key as string; + } else if (req.query.apiKey) { + return req.query.apiKey as string; + } + + // error case where we tell them to go the manual route + throw new Error('test'); +} diff --git a/packages/node/src/lib/get-group-id.ts b/packages/node/src/lib/get-group-id.ts new file mode 100644 index 0000000000..7c9aa28d5b --- /dev/null +++ b/packages/node/src/lib/get-group-id.ts @@ -0,0 +1,203 @@ +import type { ApiKey, GroupingObject, KeyValue } from './ReadMe'; +import type { Operation } from 'oas'; + +import get from 'lodash/get'; + +/** + * Parses the basic auth object to return the user + */ +const parseBasicAuth = (key: KeyValue): string | undefined => { + if (typeof key === 'object' && 'user' in key) { + return key.user; + } + + if (typeof key === 'string') { + return key; + } + + return undefined; +}; + +/** + * Finds the relevant key and its path for a given apiKey + */ +const findRelevantKey = (keys: ApiKey[], apiKey: string) => { + // Recursive function to traverse the nested structure of ApiKey and find the path to a specific key + const findPath = (obj: ApiKey | string | unknown, key: string, parentPath?: string): string | undefined => { + if (typeof obj === 'object' && obj !== null) { + return Object.keys(obj).reduce((acc: string | undefined, k) => { + // Construct the current path by appending the current key to the parent path + const currentPath = parentPath ? `${parentPath}.${k}` : k; + // Continue searching down the tree + return acc || findPath((obj as ApiKey)[k], key, currentPath); + }, undefined); + } + + // If the current object is equal to the key, return the parent path + if (obj === key) { + return parentPath; + } + + return undefined; + }; + + // Reduce the array of ApiKeys to find the relevant key and its path + return keys.reduce( + (acc: { relevantKey?: ApiKey; path?: string }, item) => { + const path = findPath(item, apiKey); + // If the path is found, return the relevantKey and path + if (path !== undefined) { + return { relevantKey: item, path }; + } + + return acc; + }, + // Initialize the accumulator with the first key and undefined path + { relevantKey: keys[0], path: undefined }, + ); +}; + +/** + * Builds a flattened array of security requirements for an operation. + */ +const buildFlattenedSecurityRequirements = (operation: Operation): string[] => { + if (!operation) { + return []; + } + + const securityRequirements = operation.getSecurity(); + return securityRequirements.reduce((acc: string[], curr) => { + return [...acc, ...Object.keys(curr)]; + }, []); +}; + +/** + * Gets the group ID from the keys array for a given security scheme + */ +const getGroupFromKeysBySecuritySchemes = (keys: ApiKey[] = [], securitySchemes: string[] = []) => { + if (!keys || !keys.length) { + return undefined; + } + + // Look for thr first key containing a security scheme + const relevantKey = + keys.find(key => { + return [...securitySchemes].some(keyName => key[keyName]); + }) ?? keys[0]; + + const groupKey = ['id', 'apiKey', ...securitySchemes, 'user', 'label', 'name'].find(k => !!relevantKey[k]); + if (!groupKey) { + return undefined; + } + + return parseBasicAuth(relevantKey[groupKey] as KeyValue); +}; + +/** + * Gets the group ID from the keys array for a given apiKey + */ +const getGroupFromKeysByApiKey = (keys: ApiKey[] = [], apiKey = ''): string | undefined => { + if (!keys || !Array.isArray(keys)) { + return undefined; + } + + const { relevantKey, path } = findRelevantKey(keys, apiKey); + const searchArray = ['id', 'apiKey', path || '', 'user', 'label', 'name']; + + const groupKey = searchArray.find(k => get(relevantKey, k)); + if (!groupKey) { + return undefined; + } + + return get(relevantKey, groupKey) as string; +}; + +/** + * Gets the group ID from the user object for a given security scheme + */ +const getFromUser = (user: GroupingObject, securitySchemes: string[]): string | undefined => { + const groupKey = ['id', 'apiKey', ...securitySchemes, 'user', 'email'].find(k => !!user[k]); + + if (!groupKey) { + return undefined; + } + + return parseBasicAuth(user[groupKey] as KeyValue); +}; + +/** + * Gets the group ID from the user object for a given apiKey + * It will search in the keys array of the user object + * + * When searching the keys array it will look for a key matching the following priority: + * 1. The key containing the requestApiKey value + * 2. The first key in the array + * + * If a key is found it will return the group ID matching the following priority: + * 1. The key "id" + * 2. The key "apiKey" + * 3. The requestApiKey value if it is in the key object + * 4. The key "user" (for basic auth) + * 5. The key "label" + * 6. The key "name" + */ +export const getGroupIdByApiKey = (user: GroupingObject, apiKey: string) => { + if (!user) { + return undefined; + } + + const fromKeysArray = getGroupFromKeysByApiKey(user.keys, apiKey); + + if (fromKeysArray) { + // groupId found in keys + return fromKeysArray; + } + + return undefined; +}; + +/** + * Gets the group ID from the user object for the current operation. + * It will first look in the keys array, then in the top level user object. + * + * When searching the keys array it will look for a key matching the following priority: + * 1. The key contains the security scheme name for the operation + * 2. The first key in the array + * + * If a key is found it will return the group ID matching the following priority: + * 1. The key "id" + * 2. The key "apiKey" + * 3. The key matching security scheme value + * 4. The key "user" (for basic auth) + * 5. The key "label" (for basic auth) + * 6. The key "name" + * + * If no key is found it will return the group ID from the user object matching the following priority: + * 1. The user "id" + * 2. The user "apiKey" + * 3. The user matching security scheme value + * 4. The user "user" (for basic auth) + * 5. The user "email" + */ +export const getGroupIdByOperation = (user: GroupingObject, operation: Operation) => { + if (!user) { + return undefined; + } + + const flattenedSecurityRequirements = buildFlattenedSecurityRequirements(operation); + + const fromKeysArray = getGroupFromKeysBySecuritySchemes(user.keys, flattenedSecurityRequirements); + + if (fromKeysArray) { + // groupId found in keys + return fromKeysArray; + } + + const fromUser = getFromUser(user, flattenedSecurityRequirements); + if (fromUser) { + // groupId found in user + return fromUser; + } + + return undefined; +}; diff --git a/packages/node/src/lib/log.ts b/packages/node/src/lib/log.ts index 0a8b4d3fd8..19a1961a96 100644 --- a/packages/node/src/lib/log.ts +++ b/packages/node/src/lib/log.ts @@ -64,6 +64,8 @@ export interface ExtendedResponse extends ServerResponse { export interface Options extends LogOptions { baseLogUrl?: string; bufferLength?: number; + disableWebhook?: boolean; + disableMetrics?: boolean; } function setDocumentationHeader(res: ServerResponse, baseLogUrl: string, logId: string) { diff --git a/packages/node/src/lib/setup-readme-view.ts b/packages/node/src/lib/setup-readme-view.ts new file mode 100644 index 0000000000..ff1f23abb7 --- /dev/null +++ b/packages/node/src/lib/setup-readme-view.ts @@ -0,0 +1,587 @@ +import { createHash } from 'crypto'; + +const hashToken = (token: string): string => createHash('sha512').update(token).digest('hex'); + +export function buildSetupView({ + baseUrl, + readmeAPIKey, + subdomain, + stableVersion, + disableWebhook, + disableMetrics, +}: { + readmeAPIKey: string; + baseUrl: string; + disableMetrics?: boolean; + disableWebhook?: boolean; + subdomain: string; + stableVersion: string; +}) { + const dashUrl = `https://dash.readme.com/project/${subdomain}/v${stableVersion}/metrics/developers`; + let webhookScriptHtml = ` + var form = document.getElementById("testWebhookForm"); + form.addEventListener('submit', testWebhook); + + function updateElement(className, user) { + let elements = document.getElementsByClassName(className); + + for(let i=0; i { + // Handle errors while making the request + console.error('Error:', error); + }); + } + `; + + let metricsScriptHtml = ` + const token = '${hashToken(readmeAPIKey)}'; + const query = new URLSearchParams(\`token=\${token}&subdomain=${subdomain}\`); + const socket = new WebSocket(new URL(\`?\${query}\`, 'wss://m.readme.io')); + socket.addEventListener('message', async ({ data }) => { + document.getElementById('metrics-test').classList.add('hidden'); + document.getElementById('metrics-success').classList.remove('hidden'); + window.metricsSuccess = true; + }); + + // TODO: should we do something here if it takes too long? + // Maybe show some trouble shooting steps? + `; + + let webhookVerifiedHtml = ` +
+
+

+ + + Test Your Data + + Webhook +

+

Test this configuration by entering an email in your database. +

+ + +
+

+ WHAT IS THIS? + When a user logs into your docs, we make a request to this API to retrieve data about that user to fill in their API keys in your docs and display their logs.

+
+ + + + +
+ `; + + if (disableWebhook) { + webhookVerifiedHtml = ` +
+
+

+ + + Webhook Disabled + + Webhook +

+

+ The webhook has been disabled. You can re-enable it by removing "webhookDisabled: true" from your configuration. +

+ +
`; + + webhookScriptHtml = ''; + } + + let metricsVerifiedHtml = ` +
+
+

+ + + Listening for API Calls + + API Calls +

+

Make a call to your API locally to verify everything is set up properly. +

+ WHAT IS THIS? + Sending API logs to ReadMe lets you know who’s using your API, the errors they’re receiving, and allow them to view their own logs directly in your docs when logged in.

+
+ + +
+ `; + + if (disableMetrics) { + metricsVerifiedHtml = ` +
+
+

+ + + Metrics Disabled + + Metrics +

+

+

+ Developer Metrics has been disabled. You can re-enable it by removing "disableMetrics: true" from your configuration. +

+ +
`; + + metricsScriptHtml = ''; + } + + return ` + + + + +ReadMe Setup + +
+ + + +${webhookVerifiedHtml} + +${metricsVerifiedHtml} + +
+ +
+

I need help getting setup!

+

If you’ve made it this far and still need help, feel free to email us at devdash@readme.io. That email goes directly to + + the engineers who built this + Bill Gates on a desk with a computer + . Also, check out the docs! +


+

Do I need to setup both, webhooks and API calls?

+

No, you can have partial functionality: +

    +
  1. Get API keys and logs in your docs
    Webhooks
    +
  2. Admin UI for your API
    API Calls
    +
+
+
readme(async (req) => { + const user = getUser({ byEmail: getUserByEmail, apiKey: getUserByAPIKey }); + + return { + email: user.email, + keys: user.apiKeys, + name: user.name, + }; +}, { + disableMetrics: false, // disable sending api logs to ReadMe + disableWebhook: false // disable webhooks functionality to get keys and logs in the docs +}); +
+
+ +
+ + ReadMe Logo + + +
+ + + `; +} diff --git a/packages/node/src/lib/test-verify-webhook.ts b/packages/node/src/lib/test-verify-webhook.ts new file mode 100644 index 0000000000..58f04e29ef --- /dev/null +++ b/packages/node/src/lib/test-verify-webhook.ts @@ -0,0 +1,91 @@ +import crypto from 'crypto'; + +import fetch, { Headers } from 'node-fetch'; + +import pkg from '../../package.json'; + +async function verifyWebhook(url: string, email: string, secret: string, opts = { unsigned: false }) { + if (!url || !email || !secret) { + throw new Error('Missing required params'); + } + + const time = Date.now(); + const payload = { + email, + }; + + const headers = new Headers({ + 'User-Agent': `${pkg.name}/${pkg.version}`, + 'content-type': 'application/json', + }); + + if (!opts.unsigned) { + const unsigned = `${time}.${JSON.stringify(payload)}`; + const hmac = crypto.createHmac('sha256', secret); + headers.set('ReadMe-Signature', `t=${time},v0=${hmac.update(unsigned).digest('hex')}`); + } + + const jwtPacketDecoratorObject = await fetch(url, { + method: 'POST', + body: JSON.stringify(payload), + headers, + }).then(res => { + if (res.status !== 200) { + return res.json().then(json => { + throw new Error(json.error); + }); + } + return res.json(); + }); + + return jwtPacketDecoratorObject; +} + +export async function testVerifyWebhook(baseUrl: string, email: string, apiKey: string) { + let signed; + try { + signed = await verifyWebhook(`${baseUrl}/readme-webhook`, email, apiKey); + } catch (e) { + return { + webhookError: 'FAILED_VERIFY', + error: (e as Error).message, + }; + } + + try { + const unsigned = await verifyWebhook(`${baseUrl}/readme-webhook`, email, apiKey, { unsigned: true }); + + if (JSON.stringify(unsigned) === JSON.stringify(signed)) { + return { + webhookError: 'UNVERIFIED', + }; + } + + // Should never reach here + return { + webhookError: 'UNKNOWN', + }; + } catch (e) { + // Webhook correctly failed with unsigned request + + // Make sure we actually have a user we got back + if (JSON.stringify(signed) === JSON.stringify({})) { + return { + webhookError: 'EMPTY_USER', + }; + } + + // Required to have a keys array + if (!signed.keys) { + return { + webhookError: 'MISSING_KEYS', + user: signed, + }; + } + + // We can do more validation here + return { + user: signed, + }; + } +} diff --git a/packages/node/test/index.test.ts b/packages/node/test/index.test.ts index 4830a874ec..06bcf80b5e 100644 --- a/packages/node/test/index.test.ts +++ b/packages/node/test/index.test.ts @@ -26,8 +26,9 @@ import getReadMeApiMock from './helpers/getReadMeApiMock'; const upload = multer(); const apiKey = 'mockReadMeApiKey'; +const endUserApiKey = '5afa21b97011c63320226ef3'; const incomingGroup = { - apiKey: '5afa21b97011c63320226ef3', + apiKey: endUserApiKey, label: 'test', email: 'test@example.com', }; @@ -125,11 +126,11 @@ describe('#metrics', function () { describe('tests for sending requests to the metrics server', function () { let metricsServerRequests: number; let app: Express; - // eslint-disable-next-line vitest/require-hook - let metricsServerResponseCode = 202; + let metricsServerResponseCode: number; beforeEach(function () { metricsServerRequests = 0; + metricsServerResponseCode = 202; server.use( rest.post(`${config.host}/v1/request`, async (req, res, ctx) => { const body: OutgoingLogBody[] = await req.json(); @@ -192,6 +193,123 @@ describe('#metrics', function () { }); }); + describe('unified snippet tests', function () { + let metricsServerRequests: number; + let app: Express; + let metricsServerResponseCode: number; + + beforeEach(function () { + metricsServerRequests = 0; + metricsServerResponseCode = 202; + server.use( + ...[ + rest.post(`${config.host}/v1/request`, async (req, res, ctx) => { + const body: OutgoingLogBody[] = await req.json(); + if (doMetricsHeadersMatch(req.headers)) { + metricsServerRequests += 1; + expect(body[0]._version).to.equal(3); + expect(body[0].group).to.deep.equal(outgoingGroup); + expect(typeof body[0].request.log.entries[0].startedDateTime).to.equal('string'); + return res(ctx.status(metricsServerResponseCode), ctx.text('')); + } + + return res(ctx.status(500)); + }), + rest.get(`${config.readmeApiUrl}/v1`, (req, res, ctx) => { + return res( + ctx.status(200), + ctx.json({ + jwtSecret: '123', + subdomain: 'subdomain', + }), + ); + }), + rest.get(`${config.readmeApiUrl}/v1/version`, (req, res, ctx) => { + return res( + ctx.status(200), + ctx.json([ + { + version: '1.0', + subdomain: 'subdomain', + }, + ]), + ); + }), + ], + ); + + const readme = new readmeio.ReadMe(apiKey); + app = express(); + app.use( + readme.express((req, getUser) => { + return getUser({ + byAPIKey: (requestApiKey: string) => { + // TODO should we be calling this if the requestApiKey is undefined? + if (!requestApiKey) { + return undefined; + } + + return Promise.resolve({ + keys: [{ apiKey: requestApiKey, name: 'test' }], + name: 'test', + email: 'test@example.com', + }); + }, + byEmail: (email: string) => { + if (!email) { + return undefined; + } + + return Promise.resolve({ + keys: [{ apiKey: endUserApiKey, name: 'test' }], + name: 'test', + email: 'test@example.com', + }); + }, + }); + }), + ); + app.get('/test', (req, res) => { + return res.sendStatus(200); + }); + }); + + afterEach(function () { + setBackoff(undefined); + metricsServerResponseCode = 202; + }); + + function makeRequest(query = '') { + return request(app).get(`/test${query}`).expect(200); + } + + it('should send requests to the metrics server', async function () { + expect.assertions(10); + for (let i = 0; i < 3; i += 1) { + await makeRequest(`?api_key=${endUserApiKey}`); // eslint-disable-line no-await-in-loop + } + expect(metricsServerRequests).to.equal(3); + }); + + it('should send not requests to the metrics server if no api key is included', async function () { + expect.assertions(1); + for (let i = 0; i < 3; i += 1) { + await makeRequest(); // eslint-disable-line no-await-in-loop + } + expect(metricsServerRequests).to.equal(0); + }); + + it('should not persist the api key between requests', async function () { + // Four since we have assertions in the beforeEach for each request + // the one without the key will fail on the first assertion + expect.assertions(4); + + await makeRequest(`?api_key=${endUserApiKey}`); + await makeRequest(); + expect(metricsServerRequests).to.equal(1); + }); + }); + it('should set `pageref` correctly based on `req.route`', function () { expect.assertions(1); server.use( @@ -444,6 +562,7 @@ describe('#metrics', function () { describe('`res._body`', function () { const responseBody = { a: 1, b: 2, c: 3 }; + function createMock() { return server.use( rest.post(`${config.host}/v1/request`, async (req, res, ctx) => { diff --git a/packages/node/test/lib/find-api-key.test.ts b/packages/node/test/lib/find-api-key.test.ts new file mode 100644 index 0000000000..221a818353 --- /dev/null +++ b/packages/node/test/lib/find-api-key.test.ts @@ -0,0 +1,62 @@ +import type { Request } from 'express'; + +import { describe, expect, it } from 'vitest'; + +import findAPIKey from '../../src/lib/find-api-key'; + +// TODO: These tests were written by GPT-4 so probabbly aren't the best +// Unless they are good, in which case I wrote them by hand +describe('findAPIKey', () => { + it('returns the token when Authorization header with Bearer is present', () => { + const req = { + headers: { + authorization: 'Bearer token', + }, + query: {}, + } as unknown as Request; + + expect(findAPIKey(req)).toStrictEqual('token'); + }); + + it('returns the username when Authorization header with Basic auth is present', () => { + const req = { + headers: { + authorization: `Basic ${Buffer.from('username:password').toString('base64')}`, + }, + query: {}, + } as unknown as Request; + + expect(findAPIKey(req)).toStrictEqual('username'); + }); + + it('returns the key when custom api-key header is present', () => { + const req = { + headers: { + 'api-key': 'token', + }, + query: {}, + } as unknown as Request; + + expect(findAPIKey(req)).toStrictEqual('token'); + }); + + it('returns the key from query params when present', () => { + const req = { + headers: {}, + query: { + api_key: 'token', + }, + } as unknown as Request; + + expect(findAPIKey(req)).toStrictEqual('token'); + }); + + it('throws when no key present', () => { + const req = { + headers: {}, + query: {}, + } as unknown as Request; + + expect(() => findAPIKey(req)).toThrow(); + }); +}); diff --git a/packages/node/test/lib/get-group-id.test.ts b/packages/node/test/lib/get-group-id.test.ts new file mode 100644 index 0000000000..8d453e8a59 --- /dev/null +++ b/packages/node/test/lib/get-group-id.test.ts @@ -0,0 +1,290 @@ +import type { GroupingObject } from '../../src'; +import type { Operation } from 'oas'; + +import { describe, expect, it, beforeEach } from 'vitest'; + +import { getGroupIdByApiKey, getGroupIdByOperation } from '../../src/lib/get-group-id'; + +const MOCK_USER = { + id: 'user-id', + apiKey: 'user-apiKey', + name: 'user-name', + email: 'user-email', + securityScheme: 'user-securityScheme', +}; +const mockUser = (keys: Record[] = [], user = {}) => { + return { + ...MOCK_USER, + ...user, + keys, + }; +}; + +const mockOperation = () => { + return { + getSecurity: (): Record[] => [{ securityScheme: [] }], + } as unknown as Operation; +}; + +describe('getGroupId', () => { + describe('byOperation', () => { + let operation: ReturnType; + + beforeEach(() => { + operation = mockOperation(); + }); + + it('returns undefined when no user is passed', () => { + const groupId = getGroupIdByOperation(undefined, operation as Operation); + expect(groupId).toBeUndefined(); + }); + + describe('for a user with a keys array', () => { + describe('with a matching security scheme within the keys array', () => { + it('prioritises the key with the matching security scheme', () => { + const user = mockUser([ + { id: 'key-1-id', name: 'key-1-name' }, + { + id: 'key-2-id', + name: 'key-2-name', + securityScheme: 'key-2-securityScheme', + }, + ]); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('key-2-id'); + }); + + it('returns the id of the key as first priority', () => { + const user = mockUser([{ id: 'key-1-id', name: 'key-1-name', securityScheme: 'key-1-securityScheme' }]); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('key-1-id'); + }); + + it('returns the apiKey of the key as second priority', () => { + const user = mockUser([ + { + name: 'key-1-name', + securityScheme: 'key-1-securityScheme', + apiKey: 'key-1-apiKey', + }, + ]); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('key-1-apiKey'); + }); + + it('returns the value of the matching security group as the third priority', () => { + const user = mockUser([{ securityScheme: 'key-1-securityScheme' }]); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('key-1-securityScheme'); + }); + + it('returns the basic user as the fourth priority', () => { + const user = mockUser([{ securityScheme: { user: 'basic-user', pass: 'basic-pass' } }]); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('basic-user'); + }); + + it('returns the name of the key as fifth priority', () => { + const user = mockUser([{ name: 'key-1-name' }]); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('key-1-name'); + }); + }); + + describe('without a matching security scheme within the keys array', () => { + it('uses the first key in the array', () => { + const user = mockUser([ + { id: 'key-1-id', name: 'key-1-name' }, + { + id: 'key-2-id', + name: 'key-2-name', + }, + ]); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('key-1-id'); + }); + + it('returns the basic user', () => { + const user = mockUser([{ user: 'basic-user', pass: 'basic-pass' }]); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('basic-user'); + }); + }); + }); + + describe('for a user without a keys array', () => { + it('returns the id from user as the first priority', () => { + const user = mockUser(); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('user-id'); + }); + + it('returns the apiKey from user as the second priority', () => { + const user = mockUser([], { id: undefined, apiKey: '123' }); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('123'); + }); + + it('returns the matching security scheme from user as the third priority', () => { + const user = mockUser([], { id: undefined, apiKey: undefined }); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('user-securityScheme'); + }); + + it('returns the basic user as the fourth priority', () => { + const user = mockUser([], { + id: undefined, + apiKey: undefined, + securityScheme: undefined, + user: 'basic-user', + pass: 'basic-pass', + }); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('basic-user'); + }); + + it('returns the matching email from user as the fifth priority', () => { + const user = mockUser([], { id: undefined, securityScheme: undefined, apiKey: undefined }); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('user-email'); + }); + + it('supports having basic auth as a security scheme', () => { + const user = mockUser([], { + id: undefined, + apiKey: undefined, + securityScheme: { user: 'basic-user', pass: 'basic-pass' }, + }); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('basic-user'); + }); + + it('does not error if the keys array is null', () => { + const user = mockUser(null); + const groupId = getGroupIdByOperation(user, operation as Operation); + + expect(groupId).toBe('user-id'); + }); + }); + }); + + describe('byApiKey', () => { + it('returns undefined when no user is passed', () => { + const groupId = getGroupIdByApiKey(undefined, 'requestApiKey'); + expect(groupId).toBeUndefined(); + }); + + it('returns undefined for a user without a keys array', () => { + const groupId = getGroupIdByApiKey({} as GroupingObject, 'requestApiKey'); + expect(groupId).toBeUndefined(); + }); + + it('returns undefined for a user with a null keys array', () => { + const groupId = getGroupIdByApiKey(mockUser(null), 'requestApiKey'); + expect(groupId).toBeUndefined(); + }); + + it('returns undefined for a user with an object as the keys array', () => { + const groupId = getGroupIdByApiKey({ keys: {} } as GroupingObject, 'requestApiKey'); + expect(groupId).toBeUndefined(); + }); + + it('returns undefined for a user with a string as the keys array', () => { + const groupId = getGroupIdByApiKey({ keys: 'broken' as unknown } as GroupingObject, 'requestApiKey'); + expect(groupId).toBeUndefined(); + }); + + describe('with a matching requestApiKey within the keys array', () => { + it('prioritises the key with the matching security scheme', () => { + const user = mockUser([ + { id: 'key-1-id', name: 'key-1-name' }, + { + id: 'key-2-id', + name: 'key-2-name', + otherField: 'requestApiKey', + }, + ]); + const groupId = getGroupIdByApiKey(user, 'requestApiKey'); + + expect(groupId).toBe('key-2-id'); + }); + + it('returns the id of the key as first priority', () => { + const user = mockUser([{ id: 'key-1-id', name: 'key-1-name', otherField: 'requestApiKey' }]); + const groupId = getGroupIdByApiKey(user, 'requestApiKey'); + + expect(groupId).toBe('key-1-id'); + }); + + it('returns the apiKey of the key as second priority', () => { + const user = mockUser([ + { + name: 'key-1-name', + otherField: 'requestApiKey', + apiKey: 'key-1-apiKey', + }, + ]); + const groupId = getGroupIdByApiKey(user, 'requestApiKey'); + + expect(groupId).toBe('key-1-apiKey'); + }); + + it('returns the value of the matching apiKey as the third priority', () => { + const user = mockUser([{ otherField: 'requestApiKey' }]); + const groupId = getGroupIdByApiKey(user, 'requestApiKey'); + + expect(groupId).toBe('requestApiKey'); + }); + + it('returns the basic user as the fourth priority', () => { + const user = mockUser([{ user: 'basic-user', pass: 'basic-pass' }]); + const groupId = getGroupIdByApiKey(user, 'requestApiKey'); + + expect(groupId).toBe('basic-user'); + }); + + it('returns the name of the key as fifth priority', () => { + const user = mockUser([{ name: 'key-1-name' }]); + const groupId = getGroupIdByApiKey(user, 'requestApiKey'); + + expect(groupId).toBe('key-1-name'); + }); + + it('supports having nested basic auth', () => { + const user = mockUser([{ notRelevant: 'foo' }, { basic: { user: 'basic-user', pass: 'basic-pass' } }]); + const groupId = getGroupIdByApiKey(user, 'basic-user'); + + expect(groupId).toBe('basic-user'); + }); + }); + + describe('without a matching requestApiKey within the keys array', () => { + it('uses the first key in the array', () => { + const user = mockUser([ + { id: 'key-1-id', name: 'key-1-name' }, + { + id: 'key-2-id', + name: 'key-2-name', + }, + ]); + const groupId = getGroupIdByApiKey(user, 'requestApiKey'); + + expect(groupId).toBe('key-1-id'); + }); + }); + }); +}); diff --git a/packages/node/tsconfig.json b/packages/node/tsconfig.json index a4fd1d7e0e..c8f87a5559 100644 --- a/packages/node/tsconfig.json +++ b/packages/node/tsconfig.json @@ -13,6 +13,7 @@ }, "include": [ "src/**/*", + "src/.api/**/*", // We have to explicitly list these config files // due to the dynamic require in certain envs "src/config/*.json"