diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7c05239..4736677 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -45,6 +45,9 @@ jobs: - name: Test with coverage run: yarn test:coverage --coverageReporters=text --coverageReporters=json-summary + - name: E2E stories (uses dist/ from the Build step) + run: yarn test:e2e + - name: Coverage summary if: always() run: | diff --git a/CLAUDE.md b/CLAUDE.md index 54b4983..32a4df1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -60,6 +60,7 @@ OpenAPIToolGenerator (src/generator.ts) yarn test # Run all tests (unit + integration) yarn test:unit # Run unit tests only yarn test:integration # Run integration tests only +yarn test:e2e # E2E story suite (requires `yarn build` first — the packaging story consumes dist/) yarn test:coverage # Run tests with coverage report yarn build # Build CJS + ESM + type declarations yarn build:cjs # Build CommonJS output only @@ -81,16 +82,19 @@ yarn clean # Remove dist/ and coverage/ - **Framework**: Jest 29 with SWC transformer (`@swc/jest`) - **Coverage provider**: V8 (`coverageProvider: 'v8'` in jest.config.js) -- **Coverage target**: 100% statements, branches, functions, lines +- **Coverage target**: 100% statements, branches, functions, lines — a UNIT-suite contract; the e2e suite never runs under `test:coverage` - **Unit tests**: `src/__tests__/*.spec.ts` (one per module) - **Integration tests**: `src/__tests__/integration.spec.ts` (full pipeline, imports from entrypoint only) +- **E2E stories**: `e2e/*.e2e.ts` under `jest.e2e.config.js` (the `.e2e.ts` suffix + separate `roots` keep the suites structurally separate). Real loopback HTTP, the real MCP SDK over `InMemoryTransport`, vendored real-world specs, dist packaging, and tsc-compiled emitted declarations. `@modelcontextprotocol/sdk` and `ajv` are dev-only and must never be imported from `src/`. +- **Tested examples**: `examples//` pairs consumer-style code (`example.ts`, importing `mcp-from-openapi` — the e2e runner maps the bare specifier onto `src/index.ts`) with a colocated `example.e2e.ts` executed by `yarn test:e2e`. Each folder has a README; the index at `examples/README.md` and `docs/examples.md` point to them. New examples must follow this shape — an untested example is a doc bug. - **Coverage exclusion**: `src/index.ts` (barrel file) ### Testing Patterns -- **Inline specs**: Tests create OpenAPI spec objects directly (no fixture files) -- **Real loopback servers**: URL-loading and SSRF/connection-pinning tests drive a real - `127.0.0.1` HTTP server (via the shared `createLoopbackServer` helper) with +- **Inline specs (unit tests)**: Unit tests create OpenAPI spec objects directly (no fixture files). E2E story tests MAY load vendored real-world fixtures from `e2e/fixtures/` — provenance, pinned commits, and licenses documented in `e2e/fixtures/README.md`; regenerating a fixture requires updating the literal count assertions that pin it +- **Real loopback servers**: URL-loading, SSRF/connection-pinning, and e2e wire tests drive a real + `127.0.0.1` HTTP server (via the shared `src/__tests__/helpers/loopback.ts` helper, which also + captures each request's method/url/headers/raw body for wire assertions) with `refResolution.allowInternalIPs`, exercising the actual Node pinned transport + SSRF guard. This replaces `global.fetch` mocks and `$RefParser.dereference` spies for those paths, because the pinned transport bypasses `global.fetch`. Use `jest.spyOn(Response.prototype, …)` for diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 38809cc..6190182 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,6 +22,7 @@ Useful commands: | `yarn test` | Run all tests (unit + integration) | | `yarn test:unit` | Unit tests only | | `yarn test:integration` | Integration tests only | +| `yarn test:e2e` | E2E story suite (run `yarn build` first) | | `yarn test:coverage` | Tests with the enforced coverage gate | | `yarn build` | Build CJS + ESM + type declarations | diff --git a/README.md b/README.md index d8efb2a..a06f8e5 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,7 @@ for (const tool of await generator.generateTools({ target: "claude" })) { | [Type Signatures](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/type-signatures.md) | TypeScript call contracts for code-execution surfaces | | [Modern MCP Fields](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/modern-mcp-fields.md) | Tool `_meta`, icons, `x-mcp-header`, elicitation descriptors | | [Arazzo Workflows](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/arazzo.md) | fromArazzo() — Arazzo 1.0 workflows as consolidated MCP tools | +| [Tested Examples](https://github.com/agentfront/mcp-from-openapi/tree/main/examples) | Runnable examples, each executed as an e2e test on every CI run | | [Response Schemas](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/response-schemas.md) | Output schemas, status codes, oneOf unions | | [Annotations & Extensions](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/annotations.md) | Tool title, annotation inference, `x-mcp` extension family | | [Security](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/security.md) | SecurityResolver, all auth types, custom resolvers | diff --git a/docs/examples.md b/docs/examples.md index 6c20cc1..4a0db2c 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -4,6 +4,8 @@ --- +> **Runnable, tested examples live in [`examples/`](https://github.com/agentfront/mcp-from-openapi/tree/main/examples)** — each folder pairs consumer-style code with an e2e test that executes it against a real server on every CI run, so they cannot rot: [quickstart MCP server](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/quickstart-mcp-server), [HTTP requests](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/http-requests), [secure loading](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/secure-loading), [curation](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/curation), [client targets](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/client-targets), [typed tools](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/typed-tools), [Arazzo workflows](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/arazzo-workflow). The snippets below are quick-reference excerpts. + ## Building an MCP Server > **Prefer `buildHttpRequest`** from the library for real integrations — see [Request Builder](./request-builder.md). This example shows the underlying mapper contract. diff --git a/e2e/arazzo-executor.e2e.ts b/e2e/arazzo-executor.e2e.ts new file mode 100644 index 0000000..b36df74 --- /dev/null +++ b/e2e/arazzo-executor.e2e.ts @@ -0,0 +1,100 @@ +/** + * Arazzo story: a workflow IR produced by fromArazzo() is genuinely + * executable — a minimal in-test executor drives it over real loopback HTTP, + * proving `$inputs`, `$steps.*.outputs.*`, and `$response.body#/pointers` + * evaluate all the way onto the wire. + */ +import { fromArazzo } from '../src'; +import type { ArazzoDocument } from '../src'; +import { createLoopbackServer, type LoopbackHandler } from '../src/__tests__/helpers/loopback'; +import { loadFixture } from './helpers/fixtures'; +import { executeWorkflow } from './helpers/arazzo-executor'; +import * as yaml from 'yaml'; + +const arazzoDoc: ArazzoDocument = { + arazzo: '1.0.0', + info: { title: 'Order flows', version: '1.0.0' }, + sourceDescriptions: [{ name: 'petstore', url: 'https://example.com/petstore.yaml' }], + workflows: [ + { + workflowId: 'orderAndFetch', + summary: 'Place an order, then fetch it back', + inputs: { + type: 'object', + properties: { petId: { type: 'integer' }, quantity: { type: 'integer' } }, + required: ['petId', 'quantity'], + }, + steps: [ + { + stepId: 'place', + operationId: 'placeOrder', + requestBody: { + contentType: 'application/json', + payload: { petId: '$inputs.petId', quantity: '$inputs.quantity', status: 'placed' }, + }, + outputs: { orderId: '$response.body#/id' }, + }, + { + stepId: 'fetch', + operationId: 'getOrderById', + parameters: [{ name: 'orderId', in: 'path', value: '$steps.place.outputs.orderId' }], + outputs: { order: '$response.body', code: '$statusCode' }, + }, + ], + outputs: { order: '$steps.fetch.outputs.order', orderId: '$steps.place.outputs.orderId' }, + }, + ], +}; + +describe('story: Arazzo workflow IR drives real HTTP', () => { + const orders = new Map>(); + let nextId = 7; + const handler: LoopbackHandler = (req, res, body) => { + if (req.method === 'POST' && req.url === '/store/order') { + const order = { id: nextId++, ...JSON.parse(body.toString()), complete: false }; + orders.set(order.id as number, order); + res.writeHead(200, { 'content-type': 'application/json' }); + res.end(JSON.stringify(order)); + return; + } + const match = req.url?.match(/^\/store\/order\/(\d+)$/); + if (req.method === 'GET' && match) { + const order = orders.get(Number(match[1])); + res.writeHead(order ? 200 : 404, { 'content-type': 'application/json' }); + res.end(JSON.stringify(order ?? { message: 'not found' })); + return; + } + res.writeHead(500); + res.end(); + }; + const loopback = createLoopbackServer(() => handler); + + afterAll(() => loopback.close()); + + it('realizes workflow outputs end-to-end', async () => { + const baseUrl = await loopback.listen(); + const petstore = yaml.parse(loadFixture('petstore-3.0.yaml')); + const [workflowTool] = await fromArazzo(arazzoDoc, { sources: { petstore } }); + + expect(workflowTool.name).toBe('orderAndFetch'); + expect(workflowTool.metadata.workflow!.steps).toHaveLength(2); + + const run = await executeWorkflow(workflowTool, { petId: 42, quantity: 2 }, baseUrl); + + // step 1: the payload with $inputs substituted reached the wire + const posted = loopback.requests[0]; + expect(posted.method).toBe('POST'); + expect(posted.url).toBe('/store/order'); + expect(JSON.parse(posted.body.toString())).toEqual({ petId: 42, quantity: 2, status: 'placed' }); + + // step 2: $response.body#/id from step 1 became the path parameter + const fetched = loopback.requests[1]; + expect(fetched.method).toBe('GET'); + expect(fetched.url).toBe('/store/order/7'); + + expect(run.steps['place'].outputs['orderId']).toBe(7); + expect(run.steps['fetch'].outputs['code']).toBe(200); + expect(run.outputs['orderId']).toBe(7); + expect(run.outputs['order']).toEqual({ id: 7, petId: 42, quantity: 2, status: 'placed', complete: false }); + }); +}); diff --git a/e2e/curation-journey.e2e.ts b/e2e/curation-journey.e2e.ts new file mode 100644 index 0000000..ea4aff1 --- /dev/null +++ b/e2e/curation-journey.e2e.ts @@ -0,0 +1,77 @@ +/** + * Curation story on the big GitHub fixture: measure the context bill, + * patch the spec with an overlay (without forking it), trim aggressively, + * and filter — asserting the budget actually shrinks and every schema stays + * valid along the way. + */ +import { OpenAPIToolGenerator, analyzeToolSet, lintDocument } from '../src'; +import type { OpenAPIDocument } from '../src'; +import { loadJsonFixture } from './helpers/fixtures'; +import { compileAll } from './helpers/ajv'; + +describe('story: curation journey over the GitHub fixture', () => { + const document = () => loadJsonFixture('github-trimmed-3.0.json'); + + it('measures, patches, trims, and filters the tool set', async () => { + // 1. Baseline: the raw context bill + const baseline = await (await OpenAPIToolGenerator.fromJSON(document())).generateTools(); + const baselineTokens = analyzeToolSet(baseline).estimatedTokens; + expect(baseline).toHaveLength(78); + expect(baselineTokens).toBeGreaterThan(500_000); // ~600k measured — a real phone book + + // 2. Overlay: fix a lint finding without forking the spec + const rawLint = lintDocument(document()); + const vague = rawLint.findings.filter((finding) => finding.code === 'vague-description'); + expect(vague.length).toBeGreaterThan(0); + // finding.path is "METHOD /path" — validate the parse and pin the exact + // operation so a fixture regeneration fails loudly here, not downstream + const parsed = vague[0].path?.match(/^([A-Z]+) (\/\S+)$/); + expect(parsed).not.toBeNull(); + const [, method, opPath] = parsed!; + expect(method).toBe('DELETE'); + expect(opPath).toBe('/gists/{gist_id}'); + + const generator = await OpenAPIToolGenerator.fromJSON(document(), { + overlays: { + overlay: '1.0.0', + info: { title: 'Expand a vague description', version: '1.0.0' }, + actions: [ + { + target: `$.paths['${opPath}'].${method.toLowerCase()}`, + update: { + description: + 'Curated via overlay: deletes the referenced gist permanently for the authenticated user; requires the gist id path parameter and returns 204 on success.', + }, + }, + ], + }, + }); + const patchedLint = await generator.lint(); + expect(patchedLint.findings.filter((finding) => finding.code === 'vague-description')).toHaveLength( + vague.length - 1, + ); + + // 3. Trimming: the budget shrinks by more than half, schemas stay valid + const trimmed = await generator.generateTools({ + stripExamples: true, + maxDescriptionLength: 200, + maxProperties: 40, + maxSchemaDepth: 4, + }); + const trimmedTokens = analyzeToolSet(trimmed).estimatedTokens; + expect(trimmedTokens).toBeLessThan(0.5 * baselineTokens); + expect( + compileAll( + trimmed.flatMap((tool) => [ + { label: `${tool.name} input`, schema: tool.inputSchema }, + ...(tool.outputSchema ? [{ label: `${tool.name} output`, schema: tool.outputSchema }] : []), + ]), + ), + ).toEqual([]); + + // 4. Filtering: a curated slice instead of the phone book + const gistsOnly = await generator.generateTools({ includeTags: ['gists'] }); + expect(gistsOnly).toHaveLength(20); + expect(analyzeToolSet(gistsOnly).estimatedTokens).toBeLessThan(baselineTokens / 3); + }); +}); diff --git a/e2e/fixtures/NOTICES.md b/e2e/fixtures/NOTICES.md new file mode 100644 index 0000000..e3c6e03 --- /dev/null +++ b/e2e/fixtures/NOTICES.md @@ -0,0 +1,42 @@ +# Third-Party License Notices + +Full license texts for the vendored fixture portions in this directory, copied verbatim from the pinned upstream commits recorded in [README.md](./README.md). The MIT license requires these notices to accompany the redistributed portions. + +## github-trimmed-3.0.json — github/rest-api-description (commit b26c240) + +> MIT License +> +> Copyright (c) 2020 GitHub +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +## discord-trimmed-3.1.json — discord/discord-api-spec (commit 1314ec6) + +> MIT License +> +> Copyright 2023 Discord +> +> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +## petstore-3.0.yaml — swagger-api/swagger-petstore (commit 8f0dd28) + +Licensed under Apache-2.0; the license requires no notice reproduction for unmodified redistribution beyond attribution, recorded in [README.md](./README.md) with the upstream LICENSE link. diff --git a/e2e/fixtures/README.md b/e2e/fixtures/README.md new file mode 100644 index 0000000..bba4626 --- /dev/null +++ b/e2e/fixtures/README.md @@ -0,0 +1,33 @@ +# E2E Fixtures — Vendored Real-World OpenAPI Specs + +Real specs for the e2e story suite. **Unit tests never use fixture files** (inline specs only — see CLAUDE.md); these exist so the e2e stories exercise real-world spec weirdness that hand-built specs can't anticipate. They already earned their keep: vendoring them surfaced two product bugs (cyclic-schema infinite recursion in `toJsonSchema`, path-item-level parameters ignored by the validator). + +## Files + +| File | Source | Pinned commit | Retrieved | License | Size | +| ---- | ------ | ------------- | --------- | ------- | ---- | +| `petstore-3.0.yaml` | [swagger-api/swagger-petstore](https://github.com/swagger-api/swagger-petstore) `src/main/resources/openapi.yaml` (OAS 3.0.4) | `8f0dd286987880b4af7bce552aca3813166f3049` | 2026-08-13 | Apache-2.0 ([upstream LICENSE](https://github.com/swagger-api/swagger-petstore/blob/master/LICENSE)) | ~23 KB, vendored whole | +| `github-trimmed-3.0.json` | [github/rest-api-description](https://github.com/github/rest-api-description) `descriptions/api.github.com/api.github.com.json` (OAS 3.0.3, 12.9 MB upstream) | `b26c240ded1c8b79cb0fb09dee4a21239061fa23` | 2026-08-13 | MIT — © GitHub, Inc. ([upstream LICENSE](https://github.com/github/rest-api-description/blob/main/LICENSE.md)) | ~579 KB (78 operations) | +| `discord-trimmed-3.1.json` | [discord/discord-api-spec](https://github.com/discord/discord-api-spec) `specs/openapi.json` (OAS **3.1.0**, 1.18 MB upstream; dense `const`/`prefixItems`/`oneOf`, cyclic schemas) | `1314ec6fee3b2fdfb2c09b85fb49e467f84c1dd7` | 2026-08-13 | MIT — © Discord Inc. ([upstream LICENSE](https://github.com/discord/discord-api-spec/blob/main/LICENSE)) | ~410 KB (60 operations) | + +The MIT license texts are vendored verbatim in [NOTICES.md](./NOTICES.md), as required for the redistributed portions; the trimmed files carry an `info['x-fixture-provenance']` note pointing back here. + +## Regenerating + +Trimming is done by the vendored [`trim-openapi.mjs`](https://github.com/agentfront/mcp-from-openapi/blob/main/e2e/fixtures/trim-openapi.mjs) (operation filter by tags or path prefixes + transitive `$ref` component closure, stable key order). Exact invocations: + +```bash +PET_SHA=8f0dd286987880b4af7bce552aca3813166f3049 +curl -fsSL "https://raw.githubusercontent.com/swagger-api/swagger-petstore/${PET_SHA}/src/main/resources/openapi.yaml" \ + -o e2e/fixtures/petstore-3.0.yaml + +GH_SHA=b26c240ded1c8b79cb0fb09dee4a21239061fa23 +curl -fsSL "https://raw.githubusercontent.com/github/rest-api-description/${GH_SHA}/descriptions/api.github.com/api.github.com.json" -o /tmp/github-full.json +node e2e/fixtures/trim-openapi.mjs /tmp/github-full.json e2e/fixtures/github-trimmed-3.0.json --tags issues,gists + +DIS_SHA=1314ec6fee3b2fdfb2c09b85fb49e467f84c1dd7 +curl -fsSL "https://raw.githubusercontent.com/discord/discord-api-spec/${DIS_SHA}/specs/openapi.json" -o /tmp/discord-full.json +node e2e/fixtures/trim-openapi.mjs /tmp/discord-full.json e2e/fixtures/discord-trimmed-3.1.json --path-prefixes "/channels/{channel_id},/users" +``` + +**Regenerating a fixture (new commit or different trim) requires updating the literal tool-count and lint-finding assertions in `e2e/real-specs.e2e.ts` and `e2e/curation-journey.e2e.ts`** — the literals pin fixture↔spec drift on purpose. diff --git a/e2e/fixtures/discord-trimmed-3.1.json b/e2e/fixtures/discord-trimmed-3.1.json new file mode 100644 index 0000000..6bc3c4b --- /dev/null +++ b/e2e/fixtures/discord-trimmed-3.1.json @@ -0,0 +1,15062 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Discord HTTP API (Preview)", + "description": "Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details.", + "termsOfService": "https://discord.com/developers/docs/policies-and-agreements/developer-terms-of-service", + "license": { + "name": "MIT", + "identifier": "MIT" + }, + "version": "10", + "x-fixture-provenance": "Trimmed by e2e/fixtures/trim-openapi.mjs (--path-prefixes /channels/{channel_id},/users) — see e2e/fixtures/README.md" + }, + "servers": [ + { + "url": "https://discord.com/api/v10" + } + ], + "paths": { + "/channels/{channel_id}": { + "delete": { + "operationId": "delete_channel", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GuildChannelResponse" + }, + { + "$ref": "#/components/schemas/PrivateChannelResponse" + }, + { + "$ref": "#/components/schemas/PrivateGroupChannelResponse" + }, + { + "$ref": "#/components/schemas/ThreadResponse" + } + ] + } + } + }, + "description": "200 response for delete_channel", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "get": { + "operationId": "get_channel", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GuildChannelResponse" + }, + { + "$ref": "#/components/schemas/PrivateChannelResponse" + }, + { + "$ref": "#/components/schemas/PrivateGroupChannelResponse" + }, + { + "$ref": "#/components/schemas/ThreadResponse" + } + ] + } + } + }, + "description": "200 response for get_channel", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "patch": { + "operationId": "update_channel", + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpdateDMRequestPartial" + }, + { + "$ref": "#/components/schemas/UpdateGroupDMRequestPartial" + }, + { + "$ref": "#/components/schemas/UpdateGuildChannelRequestPartial" + }, + { + "$ref": "#/components/schemas/UpdateThreadRequestPartial" + } + ], + "x-discord-union": "oneOf" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GuildChannelResponse" + }, + { + "$ref": "#/components/schemas/PrivateChannelResponse" + }, + { + "$ref": "#/components/schemas/PrivateGroupChannelResponse" + }, + { + "$ref": "#/components/schemas/ThreadResponse" + } + ] + } + } + }, + "description": "200 response for update_channel", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/followers": { + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "follow_channel", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "webhook_channel_id": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + "required": [ + "webhook_channel_id" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChannelFollowerResponse" + } + } + }, + "description": "200 response for follow_channel", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/invites": { + "get": { + "operationId": "list_channel_invites", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/FriendInviteResponse" + }, + { + "$ref": "#/components/schemas/GroupDMInviteResponse" + }, + { + "$ref": "#/components/schemas/GuildInviteResponse" + }, + { + "type": "null" + } + ] + }, + "type": [ + "array", + "null" + ] + } + } + }, + "description": "200 response for list_channel_invites", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "create_channel_invite", + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateGroupDMInviteRequest" + }, + { + "$ref": "#/components/schemas/CreateGuildInviteRequest" + } + ], + "x-discord-union": "oneOf" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateGroupDMInviteRequest" + }, + { + "$ref": "#/components/schemas/CreateGuildInviteRequest" + } + ], + "x-discord-union": "oneOf" + } + }, + "multipart/form-data": { + "schema": { + "allOf": [ + { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateGroupDMInviteRequest" + }, + { + "$ref": "#/components/schemas/CreateGuildInviteRequest" + } + ], + "x-discord-union": "oneOf" + }, + { + "properties": { + "target_users_file": { + "contentEncoding": "binary", + "type": "string" + } + }, + "type": "object" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/FriendInviteResponse" + }, + { + "$ref": "#/components/schemas/GroupDMInviteResponse" + }, + { + "$ref": "#/components/schemas/GuildInviteResponse" + } + ] + } + } + }, + "description": "200 response for create_channel_invite", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "204": { + "description": "204 response for create_channel_invite", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/messages": { + "get": { + "operationId": "list_messages", + "parameters": [ + { + "in": "query", + "name": "around", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "query", + "name": "before", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "query", + "name": "after", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/MessageResponse" + }, + "type": [ + "array", + "null" + ] + } + } + }, + "description": "200 response for list_messages", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "create_message", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageCreateRequest" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/MessageCreateRequest" + } + }, + "multipart/form-data": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageCreateRequest" + }, + { + "properties": { + "files[0]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[1]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[2]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[3]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[4]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[5]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[6]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[7]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[8]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[9]": { + "contentEncoding": "binary", + "type": "string" + } + }, + "type": "object" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageResponse" + } + } + }, + "description": "200 response for create_message", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/messages/bulk-delete": { + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "bulk_delete_messages", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "messages": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "maxItems": 100, + "minItems": 2, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "messages" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "204 response for bulk_delete_messages", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/messages/pins": { + "get": { + "operationId": "list_pins", + "parameters": [ + { + "in": "query", + "name": "before", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 50, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PinnedMessagesResponse" + } + } + }, + "description": "200 response for list_pins", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/channels/{channel_id}/messages/pins/{message_id}": { + "delete": { + "operationId": "delete_pin", + "responses": { + "204": { + "description": "204 response for delete_pin", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "put": { + "operationId": "create_pin", + "responses": { + "204": { + "description": "204 response for create_pin", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/messages/{message_id}": { + "delete": { + "operationId": "delete_message", + "responses": { + "204": { + "description": "204 response for delete_message", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "get": { + "operationId": "get_message", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageResponse" + } + } + }, + "description": "200 response for get_message", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "patch": { + "operationId": "update_message", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageEditRequestPartial" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/MessageEditRequestPartial" + } + }, + "multipart/form-data": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageEditRequestPartial" + }, + { + "properties": { + "files[0]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[1]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[2]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[3]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[4]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[5]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[6]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[7]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[8]": { + "contentEncoding": "binary", + "type": "string" + }, + "files[9]": { + "contentEncoding": "binary", + "type": "string" + } + }, + "type": "object" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageResponse" + } + } + }, + "description": "200 response for update_message", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/messages/{message_id}/crosspost": { + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "crosspost_message", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageResponse" + } + } + }, + "description": "200 response for crosspost_message", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/messages/{message_id}/reactions": { + "delete": { + "operationId": "delete_all_message_reactions", + "responses": { + "204": { + "description": "204 response for delete_all_message_reactions", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}": { + "delete": { + "operationId": "delete_all_message_reactions_by_emoji", + "responses": { + "204": { + "description": "204 response for delete_all_message_reactions_by_emoji", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "get": { + "operationId": "list_message_reactions_by_emoji", + "parameters": [ + { + "in": "query", + "name": "after", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "in": "query", + "name": "type", + "schema": { + "$ref": "#/components/schemas/ReactionTypes" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": "array" + } + } + }, + "description": "200 response for list_message_reactions_by_emoji", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "emoji_name", + "required": true, + "schema": { + "maxLength": 152133, + "type": "string" + } + } + ] + }, + "/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me": { + "delete": { + "operationId": "delete_my_message_reaction", + "responses": { + "204": { + "description": "204 response for delete_my_message_reaction", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "emoji_name", + "required": true, + "schema": { + "maxLength": 152133, + "type": "string" + } + } + ], + "put": { + "operationId": "add_my_message_reaction", + "responses": { + "204": { + "description": "204 response for add_my_message_reaction", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/{user_id}": { + "delete": { + "operationId": "delete_user_message_reaction", + "responses": { + "204": { + "description": "204 response for delete_user_message_reaction", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "emoji_name", + "required": true, + "schema": { + "maxLength": 152133, + "type": "string" + } + }, + { + "in": "path", + "name": "user_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/channels/{channel_id}/messages/{message_id}/threads": { + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "create_thread_from_message", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTextThreadWithMessageRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreadResponse" + } + } + }, + "description": "201 response for create_thread_from_message", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/permissions/{overwrite_id}": { + "delete": { + "operationId": "delete_channel_permission_overwrite", + "responses": { + "204": { + "description": "204 response for delete_channel_permission_overwrite", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "overwrite_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "put": { + "operationId": "set_channel_permission_overwrite", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "allow": { + "type": [ + "integer", + "null" + ] + }, + "deny": { + "type": [ + "integer", + "null" + ] + }, + "type": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChannelPermissionOverwrites" + } + ] + } + }, + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "204 response for set_channel_permission_overwrite", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/pins": { + "get": { + "operationId": "deprecated_list_pins", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/MessageResponse" + }, + "type": [ + "array", + "null" + ] + } + } + }, + "description": "200 response for deprecated_list_pins", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/channels/{channel_id}/pins/{message_id}": { + "delete": { + "operationId": "deprecated_delete_pin", + "responses": { + "204": { + "description": "204 response for deprecated_delete_pin", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "put": { + "operationId": "deprecated_create_pin", + "responses": { + "204": { + "description": "204 response for deprecated_create_pin", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/polls/{message_id}/answers/{answer_id}": { + "get": { + "operationId": "get_answer_voters", + "parameters": [ + { + "in": "query", + "name": "after", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PollAnswerDetailsResponse" + } + } + }, + "description": "200 response for get_answer_voters", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "answer_id", + "required": true, + "schema": { + "format": "int32", + "maximum": 10, + "minimum": 1, + "type": "integer" + } + } + ] + }, + "/channels/{channel_id}/polls/{message_id}/expire": { + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "poll_expire", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageResponse" + } + } + }, + "description": "200 response for poll_expire", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/recipients/{user_id}": { + "delete": { + "operationId": "delete_group_dm_user", + "responses": { + "204": { + "description": "204 response for delete_group_dm_user", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "user_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "put": { + "operationId": "add_group_dm_user", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "access_token": { + "maxLength": 152133, + "type": [ + "string", + "null" + ] + }, + "nick": { + "maxLength": 152133, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PrivateChannelResponse" + }, + { + "$ref": "#/components/schemas/PrivateGroupChannelResponse" + } + ] + } + } + }, + "description": "201 response for add_group_dm_user", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "204": { + "description": "204 response for add_group_dm_user", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/send-soundboard-sound": { + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "send_soundboard_sound", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SoundboardSoundSendRequest" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "204 response for send_soundboard_sound", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/thread-members": { + "get": { + "operationId": "list_thread_members", + "parameters": [ + { + "in": "query", + "name": "with_member", + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 100, + "minimum": 1, + "type": "integer" + } + }, + { + "in": "query", + "name": "after", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ThreadMemberResponse" + }, + "type": "array" + } + } + }, + "description": "200 response for list_thread_members", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/channels/{channel_id}/thread-members/@me": { + "delete": { + "operationId": "leave_thread", + "responses": { + "204": { + "description": "204 response for leave_thread", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "put": { + "operationId": "join_thread", + "responses": { + "204": { + "description": "204 response for join_thread", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/thread-members/{user_id}": { + "delete": { + "operationId": "delete_thread_member", + "responses": { + "204": { + "description": "204 response for delete_thread_member", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "get": { + "operationId": "get_thread_member", + "parameters": [ + { + "in": "query", + "name": "with_member", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreadMemberResponse" + } + } + }, + "description": "200 response for get_thread_member", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "path", + "name": "user_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "put": { + "operationId": "add_thread_member", + "responses": { + "204": { + "description": "204 response for add_thread_member", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/threads": { + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "create_thread", + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateForumThreadRequest" + }, + { + "$ref": "#/components/schemas/CreateTextThreadWithoutMessageRequest" + } + ], + "x-discord-union": "oneOf" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateForumThreadRequest" + }, + { + "$ref": "#/components/schemas/CreateTextThreadWithoutMessageRequest" + } + ], + "x-discord-union": "oneOf" + } + }, + "multipart/form-data": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateForumThreadRequest" + }, + { + "$ref": "#/components/schemas/CreateTextThreadWithoutMessageRequest" + } + ], + "x-discord-union": "oneOf" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatedThreadResponse" + } + } + }, + "description": "201 response for create_thread", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/threads/archived/private": { + "get": { + "operationId": "list_private_archived_threads", + "parameters": [ + { + "in": "query", + "name": "before", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 100, + "minimum": 2, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreadsResponse" + } + } + }, + "description": "200 response for list_private_archived_threads", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/channels/{channel_id}/threads/archived/public": { + "get": { + "operationId": "list_public_archived_threads", + "parameters": [ + { + "in": "query", + "name": "before", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 100, + "minimum": 2, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreadsResponse" + } + } + }, + "description": "200 response for list_public_archived_threads", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/channels/{channel_id}/threads/search": { + "get": { + "operationId": "thread_search", + "parameters": [ + { + "in": "query", + "name": "name", + "schema": { + "maxLength": 100, + "type": "string" + } + }, + { + "in": "query", + "name": "slop", + "schema": { + "maximum": 100, + "minimum": 0, + "type": "integer" + } + }, + { + "in": "query", + "name": "min_id", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "query", + "name": "max_id", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "query", + "name": "tag", + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "maxItems": 20, + "type": "array", + "uniqueItems": true + } + ] + } + }, + { + "in": "query", + "name": "tag_setting", + "schema": { + "$ref": "#/components/schemas/ThreadSearchTagSetting" + } + }, + { + "in": "query", + "name": "archived", + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/ThreadSortingMode" + } + }, + { + "in": "query", + "name": "sort_order", + "schema": { + "$ref": "#/components/schemas/SortingOrder" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 25, + "minimum": 1, + "type": "integer" + } + }, + { + "in": "query", + "name": "offset", + "schema": { + "maximum": 9975, + "minimum": 0, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreadSearchResponse" + } + } + }, + "description": "200 response for thread_search", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SearchIndexNotReadyResponse" + } + } + }, + "description": "202 response for thread_search", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/channels/{channel_id}/typing": { + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "trigger_typing_indicator", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TypingIndicatorResponse" + } + } + }, + "description": "200 response for trigger_typing_indicator", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "204": { + "description": "204 response for trigger_typing_indicator", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/users/@me/threads/archived/private": { + "get": { + "operationId": "list_my_private_archived_threads", + "parameters": [ + { + "in": "query", + "name": "before", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 100, + "minimum": 2, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreadsResponse" + } + } + }, + "description": "200 response for list_my_private_archived_threads", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/channels/{channel_id}/voice-status": { + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "put": { + "description": "Set a voice channel's status.", + "operationId": "update_voice_channel_status", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "status": { + "description": "The new voice channel status", + "maxLength": 500, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "204 response for update_voice_channel_status", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/channels/{channel_id}/webhooks": { + "get": { + "operationId": "list_channel_webhooks", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ApplicationIncomingWebhookResponse" + }, + { + "$ref": "#/components/schemas/ChannelFollowerWebhookResponse" + }, + { + "$ref": "#/components/schemas/GuildIncomingWebhookResponse" + } + ] + }, + "type": [ + "array", + "null" + ] + } + } + }, + "description": "200 response for list_channel_webhooks", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "channel_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "post": { + "operationId": "create_webhook", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "avatar": { + "contentEncoding": "base64", + "type": [ + "string", + "null" + ] + }, + "name": { + "maxLength": 80, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GuildIncomingWebhookResponse" + } + } + }, + "description": "200 response for create_webhook", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/users/@me": { + "get": { + "operationId": "get_my_user", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserPIIResponse" + } + } + }, + "description": "200 response for get_my_user", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + }, + { + "OAuth2": [ + "identify" + ] + } + ] + }, + "patch": { + "operationId": "update_my_user", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BotAccountPatchRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserPIIResponse" + } + } + }, + "description": "200 response for update_my_user", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/users/@me/applications/{application_id}/entitlements": { + "get": { + "operationId": "get_current_user_application_entitlements", + "parameters": [ + { + "in": "query", + "name": "sku_ids", + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "maxItems": 100, + "type": "array", + "uniqueItems": true + } + ] + } + }, + { + "in": "query", + "name": "exclude_consumed", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/EntitlementResponse" + }, + "type": "array" + } + } + }, + "description": "200 response for get_current_user_application_entitlements", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "OAuth2": [ + "activities.invites.write", + "activities.read", + "activities.write", + "applications.builds.read", + "applications.builds.upload", + "applications.commands", + "applications.commands.permissions.update", + "applications.commands.update", + "applications.entitlements", + "applications.store.update", + "bot", + "connections", + "dm_channels.read", + "email", + "gdm.join", + "guilds", + "guilds.join", + "guilds.members.read", + "identify", + "messages.read", + "openid", + "relationships.read", + "role_connections.write", + "rpc", + "rpc.activities.write", + "rpc.notifications.read", + "rpc.screenshare.read", + "rpc.screenshare.write", + "rpc.video.read", + "rpc.video.write", + "rpc.voice.read", + "rpc.voice.write", + "voice", + "webhook.incoming" + ] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "application_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/users/@me/applications/{application_id}/role-connection": { + "delete": { + "operationId": "delete_application_user_role_connection", + "responses": { + "204": { + "description": "204 response for delete_application_user_role_connection", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "OAuth2": [ + "role_connections.write" + ] + } + ] + }, + "get": { + "operationId": "get_application_user_role_connection", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationUserRoleConnectionResponse" + } + } + }, + "description": "200 response for get_application_user_role_connection", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "OAuth2": [ + "role_connections.write" + ] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "application_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ], + "put": { + "operationId": "update_application_user_role_connection", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateApplicationUserRoleConnectionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationUserRoleConnectionResponse" + } + } + }, + "description": "200 response for update_application_user_role_connection", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "OAuth2": [ + "role_connections.write" + ] + } + ] + } + }, + "/users/@me/channels": { + "post": { + "operationId": "create_dm", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePrivateChannelRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/PrivateChannelResponse" + }, + { + "$ref": "#/components/schemas/PrivateGroupChannelResponse" + } + ] + } + } + }, + "description": "200 response for create_dm", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + } + }, + "/users/@me/connections": { + "get": { + "operationId": "list_my_connections", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ConnectedAccountResponse" + }, + "type": [ + "array", + "null" + ] + } + } + }, + "description": "200 response for list_my_connections", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + }, + { + "OAuth2": [ + "connections" + ] + } + ] + } + }, + "/users/@me/guilds": { + "get": { + "operationId": "list_my_guilds", + "parameters": [ + { + "in": "query", + "name": "before", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "query", + "name": "after", + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "maximum": 200, + "minimum": 1, + "type": "integer" + } + }, + { + "in": "query", + "name": "with_counts", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/MyGuildResponse" + }, + "type": [ + "array", + "null" + ] + } + } + }, + "description": "200 response for list_my_guilds", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + }, + { + "OAuth2": [ + "guilds" + ] + } + ] + } + }, + "/users/@me/guilds/{guild_id}": { + "delete": { + "operationId": "leave_guild", + "responses": { + "204": { + "description": "204 response for leave_guild", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "guild_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/users/@me/guilds/{guild_id}/member": { + "get": { + "operationId": "get_my_guild_member", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PrivateGuildMemberResponse" + } + } + }, + "description": "200 response for get_my_guild_member", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "OAuth2": [ + "guilds.members.read" + ] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "guild_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + }, + "/users/{user_id}": { + "get": { + "operationId": "get_user", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponse" + } + } + }, + "description": "200 response for get_user", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "429": { + "$ref": "#/components/responses/ClientRatelimitedResponse" + }, + "4XX": { + "$ref": "#/components/responses/ClientErrorResponse" + } + }, + "security": [ + { + "BotToken": [] + } + ] + }, + "parameters": [ + { + "in": "path", + "name": "user_id", + "required": true, + "schema": { + "$ref": "#/components/schemas/SnowflakeType" + } + } + ] + } + }, + "components": { + "headers": { + "X-RateLimit-Bucket": { + "description": "The bucket that the request belongs to", + "schema": { + "type": "string" + } + }, + "X-RateLimit-Limit": { + "description": "The maximum number of requests that can be made in the current ratelimit window", + "schema": { + "type": "integer" + } + }, + "X-RateLimit-Remaining": { + "description": "The number of requests remaining in the current ratelimit window", + "schema": { + "type": "integer" + } + }, + "X-RateLimit-Reset": { + "description": "A unix timestamp in seconds at which the current ratelimit window resets", + "schema": { + "type": "number" + } + }, + "X-RateLimit-Reset-After": { + "description": "The duration in seconds until the current ratelimit window resets", + "schema": { + "type": "number" + } + } + }, + "responses": { + "ClientErrorResponse": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + }, + "description": "Client error response", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + }, + "ClientRatelimitedResponse": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RatelimitedResponse" + } + } + }, + "description": "Client ratelimited response", + "headers": { + "X-RateLimit-Bucket": { + "$ref": "#/components/headers/X-RateLimit-Bucket" + }, + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + }, + "X-RateLimit-Reset-After": { + "$ref": "#/components/headers/X-RateLimit-Reset-After" + } + } + } + }, + "schemas": { + "AccountResponse": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "name" + ], + "type": "object" + }, + "ActionRowComponentForMessageRequest": { + "properties": { + "components": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ButtonComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/ChannelSelectComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/MentionableSelectComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/RoleSelectComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/StringSelectComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/UserSelectComponentForMessageRequest" + } + ] + }, + "maxItems": 5, + "minItems": 1, + "type": "array" + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 1 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "components" + ], + "type": "object" + }, + "ActionRowComponentResponse": { + "properties": { + "components": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ButtonComponentResponse" + }, + { + "$ref": "#/components/schemas/ChannelSelectComponentResponse" + }, + { + "$ref": "#/components/schemas/MentionableSelectComponentResponse" + }, + { + "$ref": "#/components/schemas/RoleSelectComponentResponse" + }, + { + "$ref": "#/components/schemas/StringSelectComponentResponse" + }, + { + "$ref": "#/components/schemas/TextInputComponentResponse" + }, + { + "$ref": "#/components/schemas/UserSelectComponentResponse" + } + ] + }, + "type": "array" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 1 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "components" + ], + "type": "object" + }, + "ActivityActionTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "title": "JOIN" + }, + { + "const": 2, + "title": "SPECTATE" + }, + { + "const": 3, + "title": "LISTEN" + }, + { + "const": 5, + "title": "JOIN_REQUEST" + }, + { + "const": 6, + "title": "STREAM_REQUEST" + } + ], + "type": "integer" + }, + "AllowedMentionTypes": { + "oneOf": [ + { + "const": "users", + "description": "Controls role mentions", + "title": "USERS" + }, + { + "const": "roles", + "description": "Controls user mentions", + "title": "ROLES" + }, + { + "const": "everyone", + "description": "Controls @everyone and @here mentions", + "title": "EVERYONE" + } + ], + "type": "string" + }, + "ApplicationCommandInteractionMetadataResponse": { + "properties": { + "authorizing_integration_owners": { + "additionalProperties": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "object" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "original_response_message_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "target_message_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "target_user": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/InteractionTypes" + } + ], + "enum": [ + 2 + ], + "format": "int32", + "type": "integer" + }, + "user": { + "$ref": "#/components/schemas/UserResponse" + } + }, + "required": [ + "id", + "type", + "authorizing_integration_owners" + ], + "type": "object" + }, + "ApplicationIncomingWebhookResponse": { + "properties": { + "application_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "avatar": { + "type": [ + "string", + "null" + ] + }, + "channel_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "guild_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/WebhookTypes" + } + ], + "enum": [ + 3 + ], + "format": "int32", + "type": "integer" + }, + "user": { + "$ref": "#/components/schemas/UserResponse" + } + }, + "required": [ + "application_id", + "avatar", + "channel_id", + "id", + "name", + "type" + ], + "type": "object" + }, + "ApplicationIntegrationTypeConfigurationResponse": { + "properties": { + "oauth2_install_params": { + "$ref": "#/components/schemas/ApplicationOAuth2InstallParamsResponse" + } + }, + "type": "object" + }, + "ApplicationOAuth2InstallParamsResponse": { + "properties": { + "permissions": { + "type": "string" + }, + "scopes": { + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/OAuth2Scopes" + } + ], + "enum": [ + "applications.commands", + "bot" + ], + "type": "string" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "scopes", + "permissions" + ], + "type": "object" + }, + "ApplicationResponse": { + "properties": { + "bot": { + "$ref": "#/components/schemas/UserResponse" + }, + "bot_public": { + "type": "boolean" + }, + "bot_require_code_grant": { + "type": "boolean" + }, + "cover_image": { + "type": "string" + }, + "custom_install_url": { + "format": "uri", + "type": "string" + }, + "description": { + "type": "string" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "flags_new": { + "type": "string" + }, + "guild_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "icon": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "install_params": { + "$ref": "#/components/schemas/ApplicationOAuth2InstallParamsResponse" + }, + "integration_types_config": { + "additionalProperties": { + "$ref": "#/components/schemas/ApplicationIntegrationTypeConfigurationResponse" + }, + "type": "object" + }, + "max_participants": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "name": { + "type": "string" + }, + "primary_sku_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "privacy_policy_url": { + "format": "uri", + "type": "string" + }, + "rpc_origins": { + "items": { + "type": "string" + }, + "type": "array" + }, + "slug": { + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "terms_of_service_url": { + "format": "uri", + "type": "string" + }, + "type": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ApplicationTypes" + } + ] + }, + "verify_key": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "icon", + "description", + "type", + "verify_key", + "flags", + "flags_new" + ], + "type": "object" + }, + "ApplicationTypes": { + "format": "int32", + "oneOf": [ + { + "const": 4, + "title": "GUILD_ROLE_SUBSCRIPTIONS" + } + ], + "type": "integer" + }, + "ApplicationUserRoleConnectionResponse": { + "properties": { + "metadata": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "platform_name": { + "type": "string" + }, + "platform_username": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "AvailableLocalesEnum": { + "oneOf": [ + { + "const": "ar", + "description": "The ar locale", + "title": "ar" + }, + { + "const": "bg", + "description": "The bg locale", + "title": "bg" + }, + { + "const": "cs", + "description": "The cs locale", + "title": "cs" + }, + { + "const": "da", + "description": "The da locale", + "title": "da" + }, + { + "const": "de", + "description": "The de locale", + "title": "de" + }, + { + "const": "el", + "description": "The el locale", + "title": "el" + }, + { + "const": "en-GB", + "description": "The en-GB locale", + "title": "en-GB" + }, + { + "const": "en-US", + "description": "The en-US locale", + "title": "en-US" + }, + { + "const": "es-419", + "description": "The es-419 locale", + "title": "es-419" + }, + { + "const": "es-ES", + "description": "The es-ES locale", + "title": "es-ES" + }, + { + "const": "fi", + "description": "The fi locale", + "title": "fi" + }, + { + "const": "fr", + "description": "The fr locale", + "title": "fr" + }, + { + "const": "he", + "description": "The he locale", + "title": "he" + }, + { + "const": "hi", + "description": "The hi locale", + "title": "hi" + }, + { + "const": "hr", + "description": "The hr locale", + "title": "hr" + }, + { + "const": "hu", + "description": "The hu locale", + "title": "hu" + }, + { + "const": "id", + "description": "The id locale", + "title": "id" + }, + { + "const": "it", + "description": "The it locale", + "title": "it" + }, + { + "const": "ja", + "description": "The ja locale", + "title": "ja" + }, + { + "const": "ko", + "description": "The ko locale", + "title": "ko" + }, + { + "const": "lt", + "description": "The lt locale", + "title": "lt" + }, + { + "const": "nl", + "description": "The nl locale", + "title": "nl" + }, + { + "const": "no", + "description": "The no locale", + "title": "no" + }, + { + "const": "pl", + "description": "The pl locale", + "title": "pl" + }, + { + "const": "pt-BR", + "description": "The pt-BR locale", + "title": "pt-BR" + }, + { + "const": "ro", + "description": "The ro locale", + "title": "ro" + }, + { + "const": "ru", + "description": "The ru locale", + "title": "ru" + }, + { + "const": "sv-SE", + "description": "The sv-SE locale", + "title": "sv-SE" + }, + { + "const": "th", + "description": "The th locale", + "title": "th" + }, + { + "const": "tr", + "description": "The tr locale", + "title": "tr" + }, + { + "const": "uk", + "description": "The uk locale", + "title": "uk" + }, + { + "const": "vi", + "description": "The vi locale", + "title": "vi" + }, + { + "const": "zh-CN", + "description": "The zh-CN locale", + "title": "zh-CN" + }, + { + "const": "zh-TW", + "description": "The zh-TW locale", + "title": "zh-TW" + } + ], + "type": "string" + }, + "BaseCreateMessageCreateRequest": { + "properties": { + "allowed_mentions": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MessageAllowedMentionsRequest" + } + ] + }, + "attachments": { + "items": { + "$ref": "#/components/schemas/MessageAttachmentRequest" + }, + "maxItems": 10, + "type": [ + "array", + "null" + ] + }, + "components": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ActionRowComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/ContainerComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/FileComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/MediaGalleryComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/SectionComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/SeparatorComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/TextDisplayComponentForMessageRequest" + } + ] + }, + "maxItems": 40, + "type": [ + "array", + "null" + ] + }, + "content": { + "maxLength": 4000, + "type": [ + "string", + "null" + ] + }, + "embeds": { + "items": { + "$ref": "#/components/schemas/RichEmbed" + }, + "maxItems": 10, + "type": [ + "array", + "null" + ] + }, + "flags": { + "type": [ + "integer", + "null" + ] + }, + "poll": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PollCreateRequest" + } + ] + }, + "shared_client_theme": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/CustomClientThemeShareRequest" + } + ] + }, + "sticker_ids": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "maxItems": 3, + "type": [ + "array", + "null" + ] + } + }, + "type": "object" + }, + "BasicApplicationResponseWithBot": { + "properties": { + "bot": { + "$ref": "#/components/schemas/UserResponse" + }, + "cover_image": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "primary_sku_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ApplicationTypes" + } + ] + } + }, + "required": [ + "id", + "name", + "icon", + "description", + "type" + ], + "type": "object" + }, + "BasicGuildMemberResponse": { + "properties": { + "avatar": { + "description": "the member's guild avatar hash", + "type": [ + "string", + "null" + ] + }, + "avatar_decoration_data": { + "description": "data for the member's guild avatar decoration", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserAvatarDecorationResponse" + } + ] + }, + "banner": { + "description": "the member's guild banner hash", + "type": [ + "string", + "null" + ] + }, + "collectibles": { + "description": "data for the member's collectibles", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserCollectiblesResponse" + } + ] + }, + "communication_disabled_until": { + "description": "when the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "flags": { + "description": "guild member flags represented as a bit set, defaults to 0", + "format": "int32", + "type": "integer" + }, + "joined_at": { + "description": "when the user joined the guild", + "format": "date-time", + "type": "string" + }, + "nick": { + "description": "this user's guild nickname", + "type": [ + "string", + "null" + ] + }, + "pending": { + "description": "whether the user has not yet passed the guild's Membership Screening requirements", + "type": "boolean" + }, + "premium_since": { + "description": "when the user started boosting the guild", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "roles": { + "description": "array of role object ids", + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "avatar", + "banner", + "communication_disabled_until", + "flags", + "joined_at", + "nick", + "pending", + "premium_since", + "roles" + ], + "type": "object" + }, + "BasicMessageResponse": { + "properties": { + "activity": { + "$ref": "#/components/schemas/MessageActivityResponse" + }, + "application": { + "$ref": "#/components/schemas/BasicApplicationResponseWithBot" + }, + "application_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "attachments": { + "items": { + "$ref": "#/components/schemas/MessageAttachmentResponse" + }, + "type": "array" + }, + "author": { + "$ref": "#/components/schemas/UserResponse" + }, + "call": { + "$ref": "#/components/schemas/MessageCallResponse" + }, + "channel_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "components": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ActionRowComponentResponse" + }, + { + "$ref": "#/components/schemas/ContainerComponentResponse" + }, + { + "$ref": "#/components/schemas/FileComponentResponse" + }, + { + "$ref": "#/components/schemas/MediaGalleryComponentResponse" + }, + { + "$ref": "#/components/schemas/SectionComponentResponse" + }, + { + "$ref": "#/components/schemas/SeparatorComponentResponse" + }, + { + "$ref": "#/components/schemas/TextDisplayComponentResponse" + } + ] + }, + "type": "array" + }, + "content": { + "type": "string" + }, + "edited_timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "embeds": { + "items": { + "$ref": "#/components/schemas/MessageEmbedResponse" + }, + "type": "array" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "interaction": { + "$ref": "#/components/schemas/MessageInteractionResponse" + }, + "interaction_metadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/ApplicationCommandInteractionMetadataResponse" + }, + { + "$ref": "#/components/schemas/MessageComponentInteractionMetadataResponse" + }, + { + "$ref": "#/components/schemas/ModalSubmitInteractionMetadataResponse" + } + ] + }, + "lobby_member": { + "$ref": "#/components/schemas/MessageLobbyMemberResponse" + }, + "mention_channels": { + "items": { + "$ref": "#/components/schemas/MessageMentionChannelResponse" + }, + "type": "array" + }, + "mention_everyone": { + "type": "boolean" + }, + "mention_roles": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "array", + "uniqueItems": true + }, + "mentions": { + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": "array" + }, + "message_reference": { + "$ref": "#/components/schemas/MessageReferenceResponse" + }, + "message_snapshots": { + "items": { + "$ref": "#/components/schemas/MessageSnapshotResponse" + }, + "type": "array" + }, + "nonce": { + "oneOf": [ + { + "format": "int64", + "maximum": 9223372036854776000, + "minimum": -9223372036854776000, + "type": "integer" + }, + { + "format": "nonce", + "maxLength": 25, + "type": "string" + } + ] + }, + "pinned": { + "type": "boolean" + }, + "poll": { + "$ref": "#/components/schemas/PollResponse" + }, + "position": { + "format": "int32", + "type": "integer" + }, + "purchase_notification": { + "$ref": "#/components/schemas/PurchaseNotificationResponse" + }, + "resolved": { + "$ref": "#/components/schemas/ResolvedObjectsResponse" + }, + "role_subscription_data": { + "$ref": "#/components/schemas/MessageRoleSubscriptionDataResponse" + }, + "shared_client_theme": { + "$ref": "#/components/schemas/CustomClientThemeResponse" + }, + "sticker_items": { + "items": { + "$ref": "#/components/schemas/MessageStickerItemResponse" + }, + "type": "array" + }, + "stickers": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/GuildStickerResponse" + }, + { + "$ref": "#/components/schemas/StandardStickerResponse" + } + ] + }, + "type": "array" + }, + "thread": { + "$ref": "#/components/schemas/ThreadResponse" + }, + "timestamp": { + "format": "date-time", + "type": "string" + }, + "tts": { + "type": "boolean" + }, + "type": { + "$ref": "#/components/schemas/MessageType" + }, + "webhook_id": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + "required": [ + "type", + "content", + "mentions", + "mention_roles", + "attachments", + "embeds", + "timestamp", + "edited_timestamp", + "flags", + "components", + "id", + "channel_id", + "author", + "pinned", + "mention_everyone", + "tts" + ], + "type": "object" + }, + "BotAccountPatchRequest": { + "properties": { + "avatar": { + "contentEncoding": "base64", + "type": [ + "string", + "null" + ] + }, + "banner": { + "contentEncoding": "base64", + "type": [ + "string", + "null" + ] + }, + "username": { + "maxLength": 32, + "minLength": 2, + "type": "string" + } + }, + "required": [ + "username" + ], + "type": "object" + }, + "ButtonComponentForMessageRequest": { + "properties": { + "custom_id": { + "maxLength": 100, + "minLength": 1, + "type": [ + "string", + "null" + ] + }, + "disabled": { + "type": [ + "boolean", + "null" + ] + }, + "emoji": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ComponentEmojiForRequest" + } + ] + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "label": { + "maxLength": 80, + "type": [ + "string", + "null" + ] + }, + "sku_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "style": { + "$ref": "#/components/schemas/ButtonStyleTypes" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 2 + ], + "format": "int32", + "type": "integer" + }, + "url": { + "format": "uri", + "maxLength": 512, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type", + "style" + ], + "type": "object" + }, + "ButtonComponentResponse": { + "properties": { + "custom_id": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "emoji": { + "$ref": "#/components/schemas/ComponentEmojiResponse" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "label": { + "type": "string" + }, + "sku_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "style": { + "$ref": "#/components/schemas/ButtonStyleTypes" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 2 + ], + "format": "int32", + "type": "integer" + }, + "url": { + "format": "uri", + "maxLength": 2048, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "type", + "id", + "style" + ], + "type": "object" + }, + "ButtonStyleTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "title": "PRIMARY" + }, + { + "const": 2, + "title": "SECONDARY" + }, + { + "const": 3, + "title": "SUCCESS" + }, + { + "const": 4, + "title": "DANGER" + }, + { + "const": 5, + "title": "LINK" + }, + { + "const": 6, + "title": "PREMIUM" + } + ], + "type": "integer" + }, + "ByNWeekdayResponse": { + "properties": { + "day": { + "$ref": "#/components/schemas/RecurrenceRuleWeekdays", + "description": "The day within the week to reoccur on" + }, + "n": { + "description": "The week to reoccur on (1-5, where 5 represents the last week)", + "format": "int32", + "type": "integer" + } + }, + "required": [ + "n", + "day" + ], + "type": "object" + }, + "ChannelFollowerResponse": { + "properties": { + "channel_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "webhook_id": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + "required": [ + "channel_id", + "webhook_id" + ], + "type": "object" + }, + "ChannelFollowerWebhookResponse": { + "properties": { + "application_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "avatar": { + "type": [ + "string", + "null" + ] + }, + "channel_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "guild_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "source_channel": { + "$ref": "#/components/schemas/WebhookSourceChannelResponse" + }, + "source_guild": { + "$ref": "#/components/schemas/WebhookSourceGuildResponse" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/WebhookTypes" + } + ], + "enum": [ + 2 + ], + "format": "int32", + "type": "integer" + }, + "user": { + "$ref": "#/components/schemas/UserResponse" + } + }, + "required": [ + "application_id", + "avatar", + "channel_id", + "id", + "name", + "type" + ], + "type": "object" + }, + "ChannelPermissionOverwriteRequest": { + "properties": { + "allow": { + "type": [ + "integer", + "null" + ] + }, + "deny": { + "type": [ + "integer", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ChannelPermissionOverwrites" + } + ] + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "ChannelPermissionOverwriteResponse": { + "properties": { + "allow": { + "type": "string" + }, + "deny": { + "type": "string" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "$ref": "#/components/schemas/ChannelPermissionOverwrites" + } + }, + "required": [ + "id", + "type", + "allow", + "deny" + ], + "type": "object" + }, + "ChannelPermissionOverwrites": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "title": "ROLE" + }, + { + "const": 1, + "title": "MEMBER" + } + ], + "type": "integer" + }, + "ChannelSelectComponentForMessageRequest": { + "properties": { + "channel_types": { + "items": { + "$ref": "#/components/schemas/ChannelTypes" + }, + "type": [ + "array", + "null" + ], + "uniqueItems": true + }, + "custom_id": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "default_values": { + "items": { + "$ref": "#/components/schemas/ChannelSelectDefaultValue" + }, + "maxItems": 25, + "type": [ + "array", + "null" + ] + }, + "disabled": { + "type": [ + "boolean", + "null" + ] + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "max_values": { + "maximum": 25, + "minimum": 1, + "type": [ + "integer", + "null" + ] + }, + "min_values": { + "maximum": 25, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "placeholder": { + "maxLength": 150, + "type": [ + "string", + "null" + ] + }, + "required": { + "type": [ + "boolean", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 8 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "custom_id" + ], + "type": "object" + }, + "ChannelSelectComponentResponse": { + "properties": { + "channel_types": { + "items": { + "$ref": "#/components/schemas/ChannelTypes" + }, + "type": "array", + "uniqueItems": true + }, + "custom_id": { + "type": "string" + }, + "default_values": { + "items": { + "$ref": "#/components/schemas/ChannelSelectDefaultValueResponse" + }, + "type": "array" + }, + "disabled": { + "type": "boolean" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "max_values": { + "format": "int32", + "type": "integer" + }, + "min_values": { + "format": "int32", + "type": "integer" + }, + "placeholder": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 8 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "custom_id", + "min_values", + "max_values" + ], + "type": "object" + }, + "ChannelSelectDefaultValue": { + "properties": { + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/SnowflakeSelectDefaultValueTypes" + } + ], + "enum": [ + "channel" + ], + "type": "string" + } + }, + "required": [ + "type", + "id" + ], + "type": "object" + }, + "ChannelSelectDefaultValueResponse": { + "properties": { + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/SnowflakeSelectDefaultValueTypes" + } + ], + "enum": [ + "channel" + ], + "type": "string" + } + }, + "required": [ + "type", + "id" + ], + "type": "object" + }, + "ChannelTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "description": "A direct message between users", + "title": "DM" + }, + { + "const": 3, + "description": "A direct message between multiple users", + "title": "GROUP_DM" + }, + { + "const": 0, + "description": "A text channel within a server", + "title": "GUILD_TEXT" + }, + { + "const": 2, + "description": "A voice channel within a server", + "title": "GUILD_VOICE" + }, + { + "const": 4, + "description": "An organizational category that contains up to 50 channels", + "title": "GUILD_CATEGORY" + }, + { + "const": 5, + "description": "A channel that users can follow and crosspost into their own server (formerly news channels)", + "title": "GUILD_ANNOUNCEMENT" + }, + { + "const": 10, + "description": "A temporary sub-channel within a GUILD_ANNOUNCEMENT channel", + "title": "ANNOUNCEMENT_THREAD" + }, + { + "const": 11, + "description": "A temporary sub-channel within a GUILD_TEXT or GUILD_THREADS_ONLY channel type set", + "title": "PUBLIC_THREAD" + }, + { + "const": 12, + "description": "A temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission", + "title": "PRIVATE_THREAD" + }, + { + "const": 13, + "description": "A voice channel for hosting events with an audience", + "title": "GUILD_STAGE_VOICE" + }, + { + "const": 14, + "description": "The channel in a hub containing the listed servers", + "title": "GUILD_DIRECTORY" + }, + { + "const": 15, + "description": "Channel that can only contain threads", + "title": "GUILD_FORUM" + } + ], + "type": "integer" + }, + "ComponentEmojiForRequest": { + "properties": { + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "name": { + "maxLength": 32, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "ComponentEmojiResponse": { + "properties": { + "animated": { + "type": "boolean" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "ConnectedAccountGuildResponse": { + "properties": { + "icon": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "icon" + ], + "type": "object" + }, + "ConnectedAccountIntegrationResponse": { + "properties": { + "account": { + "$ref": "#/components/schemas/AccountResponse" + }, + "guild": { + "$ref": "#/components/schemas/ConnectedAccountGuildResponse" + }, + "id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/IntegrationTypes" + } + }, + "required": [ + "id", + "type", + "account", + "guild" + ], + "type": "object" + }, + "ConnectedAccountProviders": { + "oneOf": [ + { + "const": "battlenet", + "title": "BATTLENET" + }, + { + "const": "bluesky", + "title": "BLUESKY" + }, + { + "const": "bungie", + "title": "BUNGIE" + }, + { + "const": "ebay", + "title": "EBAY" + }, + { + "const": "epicgames", + "title": "EPIC_GAMES" + }, + { + "const": "facebook", + "title": "FACEBOOK" + }, + { + "const": "github", + "title": "GITHUB" + }, + { + "const": "instagram", + "title": "INSTAGRAM" + }, + { + "const": "mastodon", + "title": "MASTODON" + }, + { + "const": "leagueoflegends", + "title": "LEAGUE_OF_LEGENDS" + }, + { + "const": "paypal", + "title": "PAYPAL" + }, + { + "const": "playstation", + "title": "PLAYSTATION" + }, + { + "const": "reddit", + "title": "REDDIT" + }, + { + "const": "riotgames", + "title": "RIOT_GAMES" + }, + { + "const": "roblox", + "title": "ROBLOX" + }, + { + "const": "skype", + "title": "SKYPE" + }, + { + "const": "spotify", + "title": "SPOTIFY" + }, + { + "const": "steam", + "title": "STEAM" + }, + { + "const": "tiktok", + "title": "TIKTOK" + }, + { + "const": "twitch", + "title": "TWITCH" + }, + { + "const": "twitter", + "title": "TWITTER" + }, + { + "const": "xbox", + "title": "XBOX" + }, + { + "const": "youtube", + "title": "YOUTUBE" + }, + { + "const": "domain", + "title": "DOMAIN" + } + ], + "type": "string" + }, + "ConnectedAccountResponse": { + "properties": { + "friend_sync": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "integrations": { + "items": { + "$ref": "#/components/schemas/ConnectedAccountIntegrationResponse" + }, + "type": "array" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "revoked": { + "type": "boolean" + }, + "show_activity": { + "type": "boolean" + }, + "two_way_link": { + "type": "boolean" + }, + "type": { + "$ref": "#/components/schemas/ConnectedAccountProviders" + }, + "verified": { + "type": "boolean" + }, + "visibility": { + "$ref": "#/components/schemas/ConnectedAccountVisibility" + } + }, + "required": [ + "id", + "name", + "type", + "friend_sync", + "show_activity", + "two_way_link", + "verified", + "visibility" + ], + "type": "object" + }, + "ConnectedAccountVisibility": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "title": "NONE" + }, + { + "const": 1, + "title": "EVERYONE" + } + ], + "type": "integer" + }, + "ContainerComponentForMessageRequest": { + "properties": { + "accent_color": { + "maximum": 16777215, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "components": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ActionRowComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/FileComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/MediaGalleryComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/SectionComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/SeparatorComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/TextDisplayComponentForMessageRequest" + } + ] + }, + "maxItems": 40, + "minItems": 1, + "type": "array" + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "spoiler": { + "type": [ + "boolean", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 17 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "components" + ], + "type": "object" + }, + "ContainerComponentResponse": { + "properties": { + "accent_color": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "components": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ActionRowComponentResponse" + }, + { + "$ref": "#/components/schemas/FileComponentResponse" + }, + { + "$ref": "#/components/schemas/MediaGalleryComponentResponse" + }, + { + "$ref": "#/components/schemas/SectionComponentResponse" + }, + { + "$ref": "#/components/schemas/SeparatorComponentResponse" + }, + { + "$ref": "#/components/schemas/TextDisplayComponentResponse" + } + ] + }, + "type": "array" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "spoiler": { + "type": "boolean" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 17 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "accent_color", + "components", + "spoiler" + ], + "type": "object" + }, + "CreateForumThreadRequest": { + "properties": { + "applied_tags": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "maxItems": 5, + "type": [ + "array", + "null" + ] + }, + "auto_archive_duration": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ThreadAutoArchiveDuration" + } + ] + }, + "message": { + "$ref": "#/components/schemas/BaseCreateMessageCreateRequest" + }, + "name": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "rate_limit_per_user": { + "format": "int32", + "maximum": 21600, + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "name", + "message" + ], + "type": "object" + }, + "CreateGroupDMInviteRequest": { + "properties": { + "max_age": { + "maximum": 604800, + "minimum": 1, + "type": [ + "integer", + "null" + ] + } + }, + "type": "object" + }, + "CreateGuildInviteRequest": { + "properties": { + "max_age": { + "maximum": 5184000, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "max_uses": { + "maximum": 100, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "role_ids": { + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "maxItems": 250, + "type": "array", + "uniqueItems": true + }, + { + "type": "null" + } + ] + }, + "target_application_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "target_type": { + "oneOf": [ + { + "type": "null" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/InviteTargetTypes" + } + ], + "enum": [ + 1, + 2 + ], + "format": "int32", + "type": "integer" + } + ] + }, + "target_user_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "temporary": { + "type": [ + "boolean", + "null" + ] + }, + "unique": { + "type": [ + "boolean", + "null" + ] + } + }, + "type": "object" + }, + "CreatePrivateChannelRequest": { + "properties": { + "access_tokens": { + "items": { + "maxLength": 152133, + "type": "string" + }, + "maxItems": 1521, + "type": [ + "array", + "null" + ], + "uniqueItems": true + }, + "nicks": { + "additionalProperties": { + "maxLength": 152133, + "type": [ + "string", + "null" + ] + }, + "maxProperties": 1521, + "type": [ + "object", + "null" + ] + }, + "recipient_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + } + }, + "type": "object" + }, + "CreateTextThreadWithMessageRequest": { + "properties": { + "auto_archive_duration": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ThreadAutoArchiveDuration" + } + ] + }, + "name": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "rate_limit_per_user": { + "format": "int32", + "maximum": 21600, + "minimum": 0, + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "CreateTextThreadWithoutMessageRequest": { + "properties": { + "auto_archive_duration": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ThreadAutoArchiveDuration" + } + ] + }, + "invitable": { + "type": [ + "boolean", + "null" + ] + }, + "name": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "rate_limit_per_user": { + "format": "int32", + "maximum": 21600, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "type": { + "oneOf": [ + { + "type": "null" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/ChannelTypes" + } + ], + "enum": [ + 10, + 11, + 12 + ], + "format": "int32", + "type": "integer" + } + ] + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "CreatedThreadResponse": { + "properties": { + "applied_tags": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "array" + }, + "bitrate": { + "format": "int32", + "type": "integer" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "guild_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "last_message_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "last_pin_timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "member": { + "$ref": "#/components/schemas/ThreadMemberResponse" + }, + "member_count": { + "format": "int32", + "type": "integer" + }, + "message_count": { + "format": "int32", + "type": "integer" + }, + "name": { + "type": "string" + }, + "owner_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "parent_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "permissions": { + "type": "string" + }, + "rate_limit_per_user": { + "format": "int32", + "type": "integer" + }, + "rtc_region": { + "type": [ + "string", + "null" + ] + }, + "thread_metadata": { + "$ref": "#/components/schemas/ThreadMetadataResponse" + }, + "total_message_sent": { + "format": "int32", + "type": "integer" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ChannelTypes" + } + ], + "enum": [ + 10, + 11, + 12 + ], + "format": "int32", + "type": "integer" + }, + "user_limit": { + "format": "int32", + "type": "integer" + }, + "video_quality_mode": { + "$ref": "#/components/schemas/VideoQualityModes" + } + }, + "required": [ + "id", + "type", + "flags", + "guild_id", + "name", + "owner_id", + "thread_metadata", + "message_count", + "member_count", + "total_message_sent" + ], + "type": "object" + }, + "CustomClientThemeResponse": { + "properties": { + "base_mix": { + "format": "int32", + "type": "integer" + }, + "base_theme": { + "$ref": "#/components/schemas/MessageShareCustomUserThemeBaseTheme" + }, + "colors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "gradient_angle": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "colors", + "gradient_angle", + "base_mix", + "base_theme" + ], + "type": "object" + }, + "CustomClientThemeShareRequest": { + "properties": { + "base_mix": { + "format": "int32", + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "base_theme": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MessageShareCustomUserThemeBaseTheme" + } + ] + }, + "colors": { + "items": { + "maxLength": 6, + "minLength": 6, + "type": "string" + }, + "maxItems": 5, + "minItems": 1, + "type": "array" + }, + "gradient_angle": { + "format": "int32", + "maximum": 360, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "colors", + "gradient_angle", + "base_mix" + ], + "type": "object" + }, + "DefaultReactionEmojiResponse": { + "properties": { + "emoji_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "emoji_name": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "emoji_id", + "emoji_name" + ], + "type": "object" + }, + "EntitlementResponse": { + "properties": { + "application_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "consumed": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "ends_at": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "fulfilled_at": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "fulfillment_status": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/EntitlementTenantFulfillmentStatusResponse" + } + ] + }, + "gifter_user_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "guild_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "parent_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "sku_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "starts_at": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "type": { + "$ref": "#/components/schemas/EntitlementTypes" + }, + "user_id": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + "required": [ + "id", + "sku_id", + "application_id", + "user_id", + "deleted", + "starts_at", + "ends_at", + "type" + ], + "type": "object" + }, + "EntitlementTenantFulfillmentStatusResponse": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "title": "UNKNOWN" + }, + { + "const": 1, + "title": "FULFILLMENT_NOT_NEEDED" + }, + { + "const": 2, + "title": "FULFILLMENT_NEEDED" + }, + { + "const": 3, + "title": "FULFILLED" + }, + { + "const": 4, + "title": "FULFILLMENT_FAILED" + }, + { + "const": 5, + "title": "UNFULFILLMENT_NEEDED" + }, + { + "const": 6, + "title": "UNFULFILLED" + }, + { + "const": 7, + "title": "UNFULFILLMENT_FAILED" + } + ], + "type": "integer" + }, + "EntitlementTypes": { + "format": "int32", + "oneOf": [ + { + "const": 8, + "title": "APPLICATION_SUBSCRIPTION" + }, + { + "const": 10, + "title": "QUEST_REWARD" + } + ], + "type": "integer" + }, + "Error": { + "description": "A single error, either for an API response or a specific field.", + "properties": { + "code": { + "description": "Discord internal error code. See error code reference", + "type": "integer" + }, + "message": { + "description": "Human-readable error message", + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "ErrorDetails": { + "oneOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/ErrorDetails" + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/InnerErrors" + } + ] + }, + "ErrorResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "properties": { + "errors": { + "$ref": "#/components/schemas/ErrorDetails" + } + }, + "type": "object" + } + ], + "description": "Errors object returned by the Discord API", + "type": "object" + }, + "FileComponentForMessageRequest": { + "properties": { + "file": { + "$ref": "#/components/schemas/UnfurledMediaRequestWithAttachmentReferenceRequired" + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "spoiler": { + "type": [ + "boolean", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 13 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "file" + ], + "type": "object" + }, + "FileComponentResponse": { + "properties": { + "file": { + "$ref": "#/components/schemas/UnfurledMediaResponse" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "size": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "spoiler": { + "type": "boolean" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 13 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "file", + "name", + "size", + "spoiler" + ], + "type": "object" + }, + "ForumLayout": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "description": "No default has been set for forum channel", + "title": "DEFAULT" + }, + { + "const": 1, + "description": "Display posts as a list", + "title": "LIST" + }, + { + "const": 2, + "description": "Display posts as a collection of tiles", + "title": "GRID" + } + ], + "type": "integer" + }, + "ForumTagResponse": { + "properties": { + "emoji_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "emoji_name": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "moderated": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "moderated", + "emoji_id", + "emoji_name" + ], + "type": "object" + }, + "FriendInviteResponse": { + "properties": { + "channel": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/InviteChannelResponse" + } + ] + }, + "code": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "expires_at": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "friends_count": { + "format": "int32", + "type": "integer" + }, + "inviter": { + "$ref": "#/components/schemas/UserResponse" + }, + "is_contact": { + "type": "boolean" + }, + "max_age": { + "format": "int32", + "type": "integer" + }, + "max_uses": { + "format": "int32", + "type": "integer" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/InviteTypes" + } + ], + "enum": [ + 2 + ], + "format": "int32", + "type": "integer" + }, + "uses": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "code", + "expires_at", + "channel" + ], + "type": "object" + }, + "GroupDMInviteResponse": { + "properties": { + "approximate_member_count": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "channel": { + "$ref": "#/components/schemas/InviteChannelResponse" + }, + "code": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "expires_at": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "inviter": { + "$ref": "#/components/schemas/UserResponse" + }, + "max_age": { + "format": "int32", + "type": "integer" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/InviteTypes" + } + ], + "enum": [ + 1 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "code", + "expires_at", + "channel" + ], + "type": "object" + }, + "GuildChannelResponse": { + "properties": { + "available_tags": { + "items": { + "$ref": "#/components/schemas/ForumTagResponse" + }, + "type": "array" + }, + "bitrate": { + "format": "int32", + "type": "integer" + }, + "default_auto_archive_duration": { + "$ref": "#/components/schemas/ThreadAutoArchiveDuration" + }, + "default_forum_layout": { + "$ref": "#/components/schemas/ForumLayout" + }, + "default_reaction_emoji": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/DefaultReactionEmojiResponse" + } + ] + }, + "default_sort_order": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ThreadSortOrder" + } + ] + }, + "default_tag_setting": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ThreadSearchTagSetting" + } + ] + }, + "default_thread_rate_limit_per_user": { + "format": "int32", + "type": "integer" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "guild_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "last_message_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "last_pin_timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "name": { + "type": "string" + }, + "nsfw": { + "type": "boolean" + }, + "parent_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "permission_overwrites": { + "items": { + "$ref": "#/components/schemas/ChannelPermissionOverwriteResponse" + }, + "type": "array" + }, + "permissions": { + "type": "string" + }, + "position": { + "format": "int32", + "type": "integer" + }, + "rate_limit_per_user": { + "format": "int32", + "type": "integer" + }, + "rtc_region": { + "type": [ + "string", + "null" + ] + }, + "topic": { + "type": [ + "string", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ChannelTypes" + } + ], + "enum": [ + 0, + 2, + 4, + 5, + 13, + 14, + 15 + ], + "format": "int32", + "type": "integer" + }, + "user_limit": { + "format": "int32", + "type": "integer" + }, + "video_quality_mode": { + "$ref": "#/components/schemas/VideoQualityModes" + } + }, + "required": [ + "id", + "type", + "flags", + "guild_id", + "name", + "position" + ], + "type": "object" + }, + "GuildFeatures": { + "oneOf": [ + { + "const": "ANIMATED_BANNER", + "description": "guild has access to set an animated guild banner image", + "title": "ANIMATED_BANNER" + }, + { + "const": "ANIMATED_ICON", + "description": "guild has access to set an animated guild icon", + "title": "ANIMATED_ICON" + }, + { + "const": "APPLICATION_COMMAND_PERMISSIONS_V2", + "description": "guild is using the old permissions configuration behavior", + "title": "APPLICATION_COMMAND_PERMISSIONS_V2" + }, + { + "const": "AUTO_MODERATION", + "description": "guild has set up auto moderation rules", + "title": "AUTO_MODERATION" + }, + { + "const": "BANNER", + "description": "guild has access to set a guild banner image", + "title": "BANNER" + }, + { + "const": "COMMUNITY", + "description": "guild can enable welcome screen, Membership Screening, stage channels and discovery, and receives community updates", + "title": "COMMUNITY" + }, + { + "const": "CREATOR_MONETIZABLE_PROVISIONAL", + "description": "guild has enabled monetization", + "title": "CREATOR_MONETIZABLE_PROVISIONAL" + }, + { + "const": "CREATOR_STORE_PAGE", + "description": "guild has enabled the role subscription promo page", + "title": "CREATOR_STORE_PAGE" + }, + { + "const": "DEVELOPER_SUPPORT_SERVER", + "description": "guild has been set as a support server on the App Directory", + "title": "DEVELOPER_SUPPORT_SERVER" + }, + { + "const": "DISCOVERABLE", + "description": "guild is able to be discovered in the directory", + "title": "DISCOVERABLE" + }, + { + "const": "FEATURABLE", + "description": "guild is able to be featured in the directory", + "title": "FEATURABLE" + }, + { + "const": "INVITES_DISABLED", + "description": "guild has paused invites, preventing new users from joining", + "title": "INVITES_DISABLED" + }, + { + "const": "INVITE_SPLASH", + "description": "guild has access to set an invite splash background", + "title": "INVITE_SPLASH" + }, + { + "const": "MEMBER_VERIFICATION_GATE_ENABLED", + "description": "guild has enabled Membership Screening", + "title": "MEMBER_VERIFICATION_GATE_ENABLED" + }, + { + "const": "MORE_STICKERS", + "description": "guild has increased custom sticker slots", + "title": "MORE_STICKERS" + }, + { + "const": "NEWS", + "description": "guild has access to create announcement channels", + "title": "NEWS" + }, + { + "const": "PARTNERED", + "description": "guild is partnered", + "title": "PARTNERED" + }, + { + "const": "PREVIEW_ENABLED", + "description": "guild can be previewed before joining via Membership Screening or the directory", + "title": "PREVIEW_ENABLED" + }, + { + "const": "RAID_ALERTS_DISABLED", + "description": "guild has disabled activity alerts in the configured safety alerts channel", + "title": "RAID_ALERTS_DISABLED" + }, + { + "const": "PRUNE_REQUIRES_ADMIN", + "description": "guild has restricted member prune to administrators and the guild owner", + "title": "PRUNE_REQUIRES_ADMIN" + }, + { + "const": "ROLE_ICONS", + "description": "guild is able to set role icons", + "title": "ROLE_ICONS" + }, + { + "const": "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE", + "description": "guild has role subscriptions that can be purchased", + "title": "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE" + }, + { + "const": "ROLE_SUBSCRIPTIONS_ENABLED", + "description": "guild has enabled role subscriptions", + "title": "ROLE_SUBSCRIPTIONS_ENABLED" + }, + { + "const": "TICKETED_EVENTS_ENABLED", + "description": "guild has enabled ticketed events", + "title": "TICKETED_EVENTS_ENABLED" + }, + { + "const": "VANITY_URL", + "description": "guild has access to set a vanity URL", + "title": "VANITY_URL" + }, + { + "const": "VERIFIED", + "description": "guild is verified", + "title": "VERIFIED" + }, + { + "const": "VIP_REGIONS", + "description": "guild has access to set 384kbps bitrate in voice (previously VIP voice servers)", + "title": "VIP_REGIONS" + }, + { + "const": "WELCOME_SCREEN_ENABLED", + "description": "guild has enabled the welcome screen", + "title": "WELCOME_SCREEN_ENABLED" + }, + { + "const": "OFFICIAL_GAME_GUILD", + "description": "guild is an official guild for one or more games", + "title": "OFFICIAL_GAME_GUILD" + } + ], + "type": "string" + }, + "GuildIncomingWebhookResponse": { + "properties": { + "application_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "avatar": { + "type": [ + "string", + "null" + ] + }, + "channel_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "guild_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "token": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/WebhookTypes" + } + ], + "enum": [ + 1 + ], + "format": "int32", + "type": "integer" + }, + "url": { + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/UserResponse" + } + }, + "required": [ + "application_id", + "avatar", + "channel_id", + "id", + "name", + "type" + ], + "type": "object" + }, + "GuildInviteResponse": { + "properties": { + "approximate_member_count": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "approximate_presence_count": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "channel": { + "$ref": "#/components/schemas/InviteChannelResponse" + }, + "code": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "expires_at": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "guild": { + "$ref": "#/components/schemas/InviteGuildResponse" + }, + "guild_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "guild_scheduled_event": { + "$ref": "#/components/schemas/ScheduledEventResponse" + }, + "inviter": { + "$ref": "#/components/schemas/UserResponse" + }, + "is_contact": { + "type": "boolean" + }, + "is_nickname_changeable": { + "type": "boolean" + }, + "liveliness": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/GuildLivelinessResponse" + } + ] + }, + "max_age": { + "format": "int32", + "type": "integer" + }, + "max_uses": { + "format": "int32", + "type": "integer" + }, + "roles": { + "items": { + "$ref": "#/components/schemas/InviteGuildRoleResponse" + }, + "type": [ + "array", + "null" + ] + }, + "target_application": { + "$ref": "#/components/schemas/InviteApplicationResponse" + }, + "target_channel_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "target_message_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "target_type": { + "$ref": "#/components/schemas/InviteTargetTypes" + }, + "target_user": { + "$ref": "#/components/schemas/UserResponse" + }, + "temporary": { + "type": "boolean" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/InviteTypes" + } + ], + "enum": [ + 0 + ], + "format": "int32", + "type": "integer" + }, + "uses": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "code", + "expires_at", + "guild", + "guild_id", + "channel" + ], + "type": "object" + }, + "GuildLivelinessResponse": { + "properties": { + "last_updated_ts": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "msg_activity_bins": { + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "msg_activity_bins" + ], + "type": "object" + }, + "GuildMemberResponse": { + "properties": { + "avatar": { + "description": "the member's guild avatar hash", + "type": [ + "string", + "null" + ] + }, + "avatar_decoration_data": { + "description": "data for the member's guild avatar decoration", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserAvatarDecorationResponse" + } + ] + }, + "banner": { + "description": "the member's guild banner hash", + "type": [ + "string", + "null" + ] + }, + "collectibles": { + "description": "data for the member's collectibles", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserCollectiblesResponse" + } + ] + }, + "communication_disabled_until": { + "description": "when the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deaf": { + "description": "whether the user is deafened in voice channels", + "type": "boolean" + }, + "flags": { + "description": "guild member flags represented as a bit set, defaults to 0", + "format": "int32", + "type": "integer" + }, + "joined_at": { + "description": "when the user joined the guild", + "format": "date-time", + "type": "string" + }, + "mute": { + "description": "whether the user is muted in voice channels", + "type": "boolean" + }, + "nick": { + "description": "this user's guild nickname", + "type": [ + "string", + "null" + ] + }, + "pending": { + "description": "whether the user has not yet passed the guild's Membership Screening requirements", + "type": "boolean" + }, + "premium_since": { + "description": "when the user started boosting the guild", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "roles": { + "description": "array of role object ids", + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "array", + "uniqueItems": true + }, + "user": { + "$ref": "#/components/schemas/UserResponse", + "description": "the user this guild member represents" + } + }, + "required": [ + "avatar", + "banner", + "communication_disabled_until", + "flags", + "joined_at", + "nick", + "pending", + "premium_since", + "roles", + "user", + "mute", + "deaf" + ], + "type": "object" + }, + "GuildNSFWContentLevel": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "title": "DEFAULT" + }, + { + "const": 1, + "title": "EXPLICIT" + }, + { + "const": 2, + "title": "SAFE" + }, + { + "const": 3, + "title": "AGE_RESTRICTED" + } + ], + "type": "integer" + }, + "GuildProductPurchaseResponse": { + "properties": { + "listing_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "product_name": { + "type": "string" + } + }, + "required": [ + "listing_id", + "product_name" + ], + "type": "object" + }, + "GuildRoleColorsResponse": { + "properties": { + "primary_color": { + "format": "int32", + "type": "integer" + }, + "secondary_color": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "tertiary_color": { + "format": "int32", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "primary_color", + "secondary_color", + "tertiary_color" + ], + "type": "object" + }, + "GuildRoleResponse": { + "properties": { + "color": { + "format": "int32", + "type": "integer" + }, + "colors": { + "$ref": "#/components/schemas/GuildRoleColorsResponse" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "hoist": { + "type": "boolean" + }, + "icon": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "managed": { + "type": "boolean" + }, + "mentionable": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "permissions": { + "type": "string" + }, + "position": { + "format": "int32", + "type": "integer" + }, + "tags": { + "$ref": "#/components/schemas/GuildRoleTagsResponse" + }, + "unicode_emoji": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "name", + "permissions", + "position", + "color", + "colors", + "hoist", + "managed", + "mentionable", + "icon", + "unicode_emoji", + "flags" + ], + "type": "object" + }, + "GuildRoleTagsResponse": { + "properties": { + "available_for_purchase": { + "type": "null" + }, + "bot_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "guild_connections": { + "type": "null" + }, + "integration_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "premium_subscriber": { + "type": "null" + }, + "subscription_listing_id": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + "type": "object" + }, + "GuildScheduledEventEntityTypes": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "title": "NONE" + }, + { + "const": 1, + "title": "STAGE_INSTANCE" + }, + { + "const": 2, + "title": "VOICE" + }, + { + "const": 3, + "title": "EXTERNAL" + } + ], + "type": "integer" + }, + "GuildScheduledEventExceptionResponse": { + "properties": { + "event_exception_id": { + "$ref": "#/components/schemas/SnowflakeType", + "description": "ID of the event exception" + }, + "event_id": { + "$ref": "#/components/schemas/SnowflakeType", + "description": "ID of the scheduled event this exception belongs to" + }, + "is_canceled": { + "description": "Whether this occurrence is canceled", + "type": "boolean" + }, + "scheduled_end_time": { + "description": "Overridden end time of this occurrence", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "scheduled_start_time": { + "description": "Overridden start time of this occurrence", + "format": "date-time", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "event_id", + "event_exception_id", + "scheduled_start_time", + "scheduled_end_time", + "is_canceled" + ], + "type": "object" + }, + "GuildScheduledEventPrivacyLevels": { + "format": "int32", + "oneOf": [ + { + "const": 2, + "description": "the scheduled event is only accessible to guild members", + "title": "GUILD_ONLY" + } + ], + "type": "integer" + }, + "GuildScheduledEventStatuses": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "title": "SCHEDULED" + }, + { + "const": 2, + "title": "ACTIVE" + }, + { + "const": 3, + "title": "COMPLETED" + }, + { + "const": 4, + "title": "CANCELED" + } + ], + "type": "integer" + }, + "GuildScheduledEventUserResponses": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "description": "User is not interested in the event", + "title": "UNINTERESTED" + }, + { + "const": 1, + "description": "User is interested in the event", + "title": "INTERESTED" + } + ], + "type": "integer" + }, + "GuildStickerResponse": { + "properties": { + "available": { + "type": "boolean" + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "format_type": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/StickerFormatTypes" + } + ] + }, + "guild_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "tags": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/StickerTypes" + } + ], + "enum": [ + 2 + ], + "format": "int32", + "type": "integer" + }, + "user": { + "$ref": "#/components/schemas/UserResponse" + } + }, + "required": [ + "id", + "name", + "tags", + "type", + "format_type", + "description", + "available", + "guild_id" + ], + "type": "object" + }, + "InnerErrors": { + "additionalProperties": false, + "properties": { + "_errors": { + "description": "The list of errors for this field", + "items": { + "$ref": "#/components/schemas/Error" + }, + "type": "array" + } + }, + "required": [ + "_errors" + ], + "type": "object" + }, + "Int53Type": { + "format": "int64", + "maximum": 9007199254740991, + "minimum": -9007199254740991, + "type": "integer" + }, + "IntegrationTypes": { + "oneOf": [ + { + "const": "discord", + "title": "DISCORD" + }, + { + "const": "twitch", + "title": "TWITCH" + }, + { + "const": "youtube", + "title": "YOUTUBE" + }, + { + "const": "guild_subscription", + "title": "GUILD_SUBSCRIPTION" + } + ], + "type": "string" + }, + "InteractionTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "description": "Sent by Discord to validate your application's interaction handler", + "title": "PING" + }, + { + "const": 2, + "description": "Sent when a user uses an application command", + "title": "APPLICATION_COMMAND" + }, + { + "const": 3, + "description": "Sent when a user interacts with a message component previously sent by your application", + "title": "MESSAGE_COMPONENT" + }, + { + "const": 4, + "description": "Sent when a user is filling in an autocomplete option in a chat command", + "title": "APPLICATION_COMMAND_AUTOCOMPLETE" + }, + { + "const": 5, + "description": "Sent when a user submits a modal previously sent by your application", + "title": "MODAL_SUBMIT" + }, + { + "const": 6, + "description": "Sent when Discord is checking if a user can purchase a Social Layer SKU", + "title": "SOCIAL_LAYER_SKU_PURCHASE_ELIGIBILITY" + } + ], + "type": "integer" + }, + "InviteApplicationResponse": { + "properties": { + "bot": { + "$ref": "#/components/schemas/UserResponse" + }, + "bot_public": { + "type": "boolean" + }, + "bot_require_code_grant": { + "type": "boolean" + }, + "cover_image": { + "type": "string" + }, + "custom_install_url": { + "format": "uri", + "type": "string" + }, + "description": { + "type": "string" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "flags_new": { + "type": "string" + }, + "guild_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "icon": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "install_params": { + "$ref": "#/components/schemas/ApplicationOAuth2InstallParamsResponse" + }, + "integration_types_config": { + "additionalProperties": { + "$ref": "#/components/schemas/ApplicationIntegrationTypeConfigurationResponse" + }, + "type": "object" + }, + "max_participants": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "name": { + "type": "string" + }, + "primary_sku_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "privacy_policy_url": { + "format": "uri", + "type": "string" + }, + "rpc_origins": { + "items": { + "type": "string" + }, + "type": "array" + }, + "slug": { + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "terms_of_service_url": { + "format": "uri", + "type": "string" + }, + "type": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ApplicationTypes" + } + ] + }, + "verify_key": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "icon", + "description", + "type", + "verify_key", + "flags", + "flags_new" + ], + "type": "object" + }, + "InviteChannelRecipientResponse": { + "properties": { + "avatar": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "username": { + "type": "string" + } + }, + "required": [ + "id", + "username", + "avatar" + ], + "type": "object" + }, + "InviteChannelResponse": { + "properties": { + "icon": { + "type": "string" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "recipients": { + "items": { + "$ref": "#/components/schemas/InviteChannelRecipientResponse" + }, + "type": "array" + }, + "type": { + "$ref": "#/components/schemas/ChannelTypes" + } + }, + "required": [ + "id", + "type", + "name" + ], + "type": "object" + }, + "InviteGuildResponse": { + "properties": { + "banner": { + "type": [ + "string", + "null" + ] + }, + "description": { + "type": [ + "string", + "null" + ] + }, + "features": { + "items": { + "$ref": "#/components/schemas/GuildFeatures" + }, + "type": "array", + "uniqueItems": true + }, + "icon": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "nsfw": { + "type": [ + "boolean", + "null" + ] + }, + "nsfw_level": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/GuildNSFWContentLevel" + } + ] + }, + "premium_subscription_count": { + "format": "int32", + "type": "integer" + }, + "splash": { + "type": [ + "string", + "null" + ] + }, + "vanity_url_code": { + "type": [ + "string", + "null" + ] + }, + "verification_level": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VerificationLevels" + } + ] + } + }, + "required": [ + "id", + "name", + "splash", + "banner", + "description", + "icon", + "features", + "verification_level", + "vanity_url_code", + "nsfw_level", + "nsfw", + "premium_subscription_count" + ], + "type": "object" + }, + "InviteGuildRoleResponse": { + "properties": { + "color": { + "format": "int32", + "type": "integer" + }, + "colors": { + "$ref": "#/components/schemas/GuildRoleColorsResponse" + }, + "icon": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "permissions": { + "type": "string" + }, + "position": { + "format": "int32", + "type": "integer" + }, + "unicode_emoji": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "name", + "position", + "color", + "colors", + "icon", + "unicode_emoji" + ], + "type": "object" + }, + "InviteTargetTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "title": "STREAM" + }, + { + "const": 2, + "title": "EMBEDDED_APPLICATION" + }, + { + "const": 3, + "title": "ROLE_SUBSCRIPTIONS_PURCHASE" + } + ], + "type": "integer" + }, + "InviteTypes": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "title": "GUILD" + }, + { + "const": 1, + "title": "GROUP_DM" + }, + { + "const": 2, + "title": "FRIEND" + } + ], + "type": "integer" + }, + "MediaGalleryComponentForMessageRequest": { + "properties": { + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "items": { + "items": { + "$ref": "#/components/schemas/MediaGalleryItemRequest" + }, + "maxItems": 10, + "minItems": 1, + "type": "array" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 12 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "items" + ], + "type": "object" + }, + "MediaGalleryComponentResponse": { + "properties": { + "id": { + "format": "int32", + "type": "integer" + }, + "items": { + "items": { + "$ref": "#/components/schemas/MediaGalleryItemResponse" + }, + "type": "array" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 12 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "items" + ], + "type": "object" + }, + "MediaGalleryItemRequest": { + "properties": { + "description": { + "maxLength": 1024, + "minLength": 1, + "type": [ + "string", + "null" + ] + }, + "media": { + "$ref": "#/components/schemas/UnfurledMediaRequest" + }, + "spoiler": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "media" + ], + "type": "object" + }, + "MediaGalleryItemResponse": { + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "media": { + "$ref": "#/components/schemas/UnfurledMediaResponse" + }, + "spoiler": { + "type": "boolean" + } + }, + "required": [ + "media", + "description", + "spoiler" + ], + "type": "object" + }, + "MentionableSelectComponentForMessageRequest": { + "properties": { + "custom_id": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "default_values": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/RoleSelectDefaultValue" + }, + { + "$ref": "#/components/schemas/UserSelectDefaultValue" + } + ] + }, + "maxItems": 25, + "type": [ + "array", + "null" + ] + }, + "disabled": { + "type": [ + "boolean", + "null" + ] + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "max_values": { + "maximum": 25, + "minimum": 1, + "type": [ + "integer", + "null" + ] + }, + "min_values": { + "maximum": 25, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "placeholder": { + "maxLength": 150, + "type": [ + "string", + "null" + ] + }, + "required": { + "type": [ + "boolean", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 7 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "custom_id" + ], + "type": "object" + }, + "MentionableSelectComponentResponse": { + "properties": { + "custom_id": { + "type": "string" + }, + "default_values": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/RoleSelectDefaultValueResponse" + }, + { + "$ref": "#/components/schemas/UserSelectDefaultValueResponse" + } + ] + }, + "type": "array" + }, + "disabled": { + "type": "boolean" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "max_values": { + "format": "int32", + "type": "integer" + }, + "min_values": { + "format": "int32", + "type": "integer" + }, + "placeholder": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 7 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "custom_id", + "min_values", + "max_values" + ], + "type": "object" + }, + "MessageActivityResponse": { + "properties": { + "party_id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ActivityActionTypes" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "MessageAllowedMentionsRequest": { + "properties": { + "parse": { + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/AllowedMentionTypes" + } + ] + }, + "maxItems": 1521, + "type": [ + "array", + "null" + ], + "uniqueItems": true + }, + "replied_user": { + "type": [ + "boolean", + "null" + ] + }, + "roles": { + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "maxItems": 100, + "type": [ + "array", + "null" + ], + "uniqueItems": true + }, + "users": { + "items": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "maxItems": 100, + "type": [ + "array", + "null" + ], + "uniqueItems": true + } + }, + "type": "object" + }, + "MessageAttachmentRequest": { + "properties": { + "description": { + "maxLength": 1024, + "type": [ + "string", + "null" + ] + }, + "duration_secs": { + "format": "double", + "maximum": 2147483647, + "minimum": 0, + "type": [ + "number", + "null" + ] + }, + "filename": { + "maxLength": 1024, + "minLength": 1, + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "is_remix": { + "type": [ + "boolean", + "null" + ] + }, + "is_spoiler": { + "type": [ + "boolean", + "null" + ] + }, + "title": { + "maxLength": 1024, + "type": [ + "string", + "null" + ] + }, + "waveform": { + "maxLength": 400, + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "MessageAttachmentResponse": { + "properties": { + "application": { + "$ref": "#/components/schemas/ApplicationResponse" + }, + "clip_created_at": { + "format": "date-time", + "type": "string" + }, + "clip_participants": { + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": "array" + }, + "content_type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "duration_secs": { + "format": "double", + "type": "number" + }, + "ephemeral": { + "type": "boolean" + }, + "filename": { + "type": "string" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "height": { + "format": "int32", + "type": "integer" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "placeholder": { + "type": "string" + }, + "placeholder_version": { + "format": "int32", + "type": "integer" + }, + "proxy_url": { + "format": "uri", + "type": "string" + }, + "size": { + "format": "int32", + "type": "integer" + }, + "title": { + "type": [ + "string", + "null" + ] + }, + "url": { + "format": "uri", + "type": "string" + }, + "waveform": { + "type": "string" + }, + "width": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "id", + "filename", + "size", + "url", + "proxy_url" + ], + "type": "object" + }, + "MessageCallResponse": { + "properties": { + "ended_timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "participants": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "array", + "uniqueItems": true + } + }, + "required": [ + "participants" + ], + "type": "object" + }, + "MessageComponentInteractionMetadataResponse": { + "properties": { + "authorizing_integration_owners": { + "additionalProperties": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "object" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "interacted_message_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "original_response_message_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/InteractionTypes" + } + ], + "enum": [ + 3 + ], + "format": "int32", + "type": "integer" + }, + "user": { + "$ref": "#/components/schemas/UserResponse" + } + }, + "required": [ + "id", + "type", + "authorizing_integration_owners", + "interacted_message_id" + ], + "type": "object" + }, + "MessageComponentSeparatorSpacingSize": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "description": "Small spacing", + "title": "SMALL" + }, + { + "const": 2, + "description": "Large spacing", + "title": "LARGE" + } + ], + "type": "integer" + }, + "MessageComponentTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "description": "Container for other components", + "title": "ACTION_ROW" + }, + { + "const": 2, + "description": "Button object", + "title": "BUTTON" + }, + { + "const": 3, + "description": "Select menu for picking from defined text options", + "title": "STRING_SELECT" + }, + { + "const": 4, + "description": "Text input object", + "title": "TEXT_INPUT" + }, + { + "const": 5, + "description": "Select menu for users", + "title": "USER_SELECT" + }, + { + "const": 6, + "description": "Select menu for roles", + "title": "ROLE_SELECT" + }, + { + "const": 7, + "description": "Select menu for mentionables (users and roles)", + "title": "MENTIONABLE_SELECT" + }, + { + "const": 8, + "description": "Select menu for channels", + "title": "CHANNEL_SELECT" + }, + { + "const": 9, + "description": "Section component", + "title": "SECTION" + }, + { + "const": 10, + "description": "Text component", + "title": "TEXT_DISPLAY" + }, + { + "const": 11, + "description": "Thumbnail component", + "title": "THUMBNAIL" + }, + { + "const": 12, + "description": "Media gallery component", + "title": "MEDIA_GALLERY" + }, + { + "const": 13, + "description": "File component", + "title": "FILE" + }, + { + "const": 14, + "description": "Separator component", + "title": "SEPARATOR" + }, + { + "const": 17, + "description": "Container component", + "title": "CONTAINER" + }, + { + "const": 18, + "description": "Label component", + "title": "LABEL" + }, + { + "const": 19, + "description": "File upload component", + "title": "FILE_UPLOAD" + }, + { + "const": 21, + "description": "Radio group component", + "title": "RADIO_GROUP" + }, + { + "const": 22, + "description": "Checkbox group component", + "title": "CHECKBOX_GROUP" + }, + { + "const": 23, + "description": "Checkbox component", + "title": "CHECKBOX" + } + ], + "type": "integer" + }, + "MessageCreateRequest": { + "properties": { + "allowed_mentions": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MessageAllowedMentionsRequest" + } + ] + }, + "attachments": { + "items": { + "$ref": "#/components/schemas/MessageAttachmentRequest" + }, + "maxItems": 10, + "type": [ + "array", + "null" + ] + }, + "components": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ActionRowComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/ContainerComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/FileComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/MediaGalleryComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/SectionComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/SeparatorComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/TextDisplayComponentForMessageRequest" + } + ] + }, + "maxItems": 40, + "type": [ + "array", + "null" + ] + }, + "content": { + "maxLength": 4000, + "type": [ + "string", + "null" + ] + }, + "embeds": { + "items": { + "$ref": "#/components/schemas/RichEmbed" + }, + "maxItems": 10, + "type": [ + "array", + "null" + ] + }, + "enforce_nonce": { + "type": [ + "boolean", + "null" + ] + }, + "flags": { + "type": [ + "integer", + "null" + ] + }, + "message_reference": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MessageReferenceRequest" + } + ] + }, + "nonce": { + "oneOf": [ + { + "format": "int64", + "maximum": 9223372036854776000, + "minimum": -9223372036854776000, + "type": "integer" + }, + { + "format": "nonce", + "maxLength": 25, + "type": "string" + }, + { + "type": "null" + } + ] + }, + "poll": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PollCreateRequest" + } + ] + }, + "shared_client_theme": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/CustomClientThemeShareRequest" + } + ] + }, + "sticker_ids": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "maxItems": 3, + "type": [ + "array", + "null" + ] + }, + "tts": { + "type": [ + "boolean", + "null" + ] + } + }, + "type": "object" + }, + "MessageEditRequestPartial": { + "properties": { + "allowed_mentions": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MessageAllowedMentionsRequest" + } + ] + }, + "attachments": { + "items": { + "$ref": "#/components/schemas/MessageAttachmentRequest" + }, + "maxItems": 10, + "type": [ + "array", + "null" + ] + }, + "components": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ActionRowComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/ContainerComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/FileComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/MediaGalleryComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/SectionComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/SeparatorComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/TextDisplayComponentForMessageRequest" + } + ] + }, + "maxItems": 40, + "type": [ + "array", + "null" + ] + }, + "content": { + "maxLength": 4000, + "type": [ + "string", + "null" + ] + }, + "embeds": { + "items": { + "$ref": "#/components/schemas/RichEmbed" + }, + "maxItems": 10, + "type": [ + "array", + "null" + ] + }, + "flags": { + "type": [ + "integer", + "null" + ] + }, + "sticker_ids": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "maxItems": 1521, + "type": [ + "array", + "null" + ] + } + }, + "type": "object" + }, + "MessageEmbedAuthorResponse": { + "properties": { + "icon_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "proxy_icon_url": { + "format": "uri", + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "MessageEmbedFieldResponse": { + "properties": { + "inline": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value", + "inline" + ], + "type": "object" + }, + "MessageEmbedFooterResponse": { + "properties": { + "icon_url": { + "type": "string" + }, + "proxy_icon_url": { + "format": "uri", + "type": "string" + }, + "text": { + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + }, + "MessageEmbedImageResponse": { + "properties": { + "content_type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "flags": { + "$ref": "#/components/schemas/UInt32Type" + }, + "height": { + "$ref": "#/components/schemas/UInt32Type" + }, + "placeholder": { + "type": "string" + }, + "placeholder_version": { + "$ref": "#/components/schemas/UInt32Type" + }, + "proxy_url": { + "format": "uri", + "type": "string" + }, + "url": { + "type": "string" + }, + "width": { + "$ref": "#/components/schemas/UInt32Type" + } + }, + "type": "object" + }, + "MessageEmbedProviderResponse": { + "properties": { + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "MessageEmbedResponse": { + "properties": { + "author": { + "$ref": "#/components/schemas/MessageEmbedAuthorResponse" + }, + "color": { + "format": "int32", + "type": "integer" + }, + "components": { + "items": { + "$ref": "#/components/schemas/ContainerComponentResponse" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "fields": { + "items": { + "$ref": "#/components/schemas/MessageEmbedFieldResponse" + }, + "type": "array" + }, + "flags": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "footer": { + "$ref": "#/components/schemas/MessageEmbedFooterResponse" + }, + "image": { + "$ref": "#/components/schemas/MessageEmbedImageResponse" + }, + "provider": { + "$ref": "#/components/schemas/MessageEmbedProviderResponse" + }, + "thumbnail": { + "$ref": "#/components/schemas/MessageEmbedImageResponse" + }, + "timestamp": { + "format": "date-time", + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "video": { + "$ref": "#/components/schemas/MessageEmbedVideoResponse" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "MessageEmbedVideoResponse": { + "properties": { + "content_type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "flags": { + "$ref": "#/components/schemas/UInt32Type" + }, + "height": { + "$ref": "#/components/schemas/UInt32Type" + }, + "placeholder": { + "type": "string" + }, + "placeholder_version": { + "$ref": "#/components/schemas/UInt32Type" + }, + "proxy_url": { + "format": "uri", + "type": "string" + }, + "url": { + "type": "string" + }, + "width": { + "$ref": "#/components/schemas/UInt32Type" + } + }, + "type": "object" + }, + "MessageInteractionResponse": { + "properties": { + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "name_localized": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/InteractionTypes" + }, + "user": { + "$ref": "#/components/schemas/UserResponse" + } + }, + "required": [ + "id", + "type", + "name" + ], + "type": "object" + }, + "MessageLobbyMemberResponse": { + "properties": { + "additional_name": { + "type": "string" + } + }, + "required": [ + "additional_name" + ], + "type": "object" + }, + "MessageMentionChannelResponse": { + "properties": { + "guild_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ChannelTypes" + } + }, + "required": [ + "id", + "name", + "type", + "guild_id" + ], + "type": "object" + }, + "MessageReactionCountDetailsResponse": { + "properties": { + "burst": { + "format": "int32", + "type": "integer" + }, + "normal": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "burst", + "normal" + ], + "type": "object" + }, + "MessageReactionEmojiResponse": { + "properties": { + "animated": { + "type": "boolean" + }, + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "name": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "name" + ], + "type": "object" + }, + "MessageReactionResponse": { + "properties": { + "burst_colors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "count": { + "format": "int32", + "type": "integer" + }, + "count_details": { + "$ref": "#/components/schemas/MessageReactionCountDetailsResponse" + }, + "emoji": { + "$ref": "#/components/schemas/MessageReactionEmojiResponse" + }, + "me": { + "type": "boolean" + }, + "me_burst": { + "type": "boolean" + } + }, + "required": [ + "emoji", + "count", + "count_details", + "burst_colors", + "me_burst", + "me" + ], + "type": "object" + }, + "MessageReferenceRequest": { + "properties": { + "channel_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "fail_if_not_exists": { + "type": [ + "boolean", + "null" + ] + }, + "guild_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "message_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MessageReferenceType" + } + ] + } + }, + "required": [ + "message_id" + ], + "type": "object" + }, + "MessageReferenceResponse": { + "properties": { + "channel_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "guild_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "message_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "$ref": "#/components/schemas/MessageReferenceType" + } + }, + "required": [ + "type", + "channel_id" + ], + "type": "object" + }, + "MessageReferenceType": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "description": "Reference to a message", + "title": "DEFAULT" + } + ], + "type": "integer" + }, + "MessageResponse": { + "properties": { + "activity": { + "$ref": "#/components/schemas/MessageActivityResponse" + }, + "application": { + "$ref": "#/components/schemas/BasicApplicationResponseWithBot" + }, + "application_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "attachments": { + "items": { + "$ref": "#/components/schemas/MessageAttachmentResponse" + }, + "type": "array" + }, + "author": { + "$ref": "#/components/schemas/UserResponse" + }, + "call": { + "$ref": "#/components/schemas/MessageCallResponse" + }, + "channel_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "components": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ActionRowComponentResponse" + }, + { + "$ref": "#/components/schemas/ContainerComponentResponse" + }, + { + "$ref": "#/components/schemas/FileComponentResponse" + }, + { + "$ref": "#/components/schemas/MediaGalleryComponentResponse" + }, + { + "$ref": "#/components/schemas/SectionComponentResponse" + }, + { + "$ref": "#/components/schemas/SeparatorComponentResponse" + }, + { + "$ref": "#/components/schemas/TextDisplayComponentResponse" + } + ] + }, + "type": "array" + }, + "content": { + "type": "string" + }, + "edited_timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "embeds": { + "items": { + "$ref": "#/components/schemas/MessageEmbedResponse" + }, + "type": "array" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "interaction": { + "$ref": "#/components/schemas/MessageInteractionResponse" + }, + "interaction_metadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/ApplicationCommandInteractionMetadataResponse" + }, + { + "$ref": "#/components/schemas/MessageComponentInteractionMetadataResponse" + }, + { + "$ref": "#/components/schemas/ModalSubmitInteractionMetadataResponse" + } + ] + }, + "lobby_member": { + "$ref": "#/components/schemas/MessageLobbyMemberResponse" + }, + "mention_channels": { + "items": { + "$ref": "#/components/schemas/MessageMentionChannelResponse" + }, + "type": "array" + }, + "mention_everyone": { + "type": "boolean" + }, + "mention_roles": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "array", + "uniqueItems": true + }, + "mentions": { + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": "array" + }, + "message_reference": { + "$ref": "#/components/schemas/MessageReferenceResponse" + }, + "message_snapshots": { + "items": { + "$ref": "#/components/schemas/MessageSnapshotResponse" + }, + "type": "array" + }, + "nonce": { + "oneOf": [ + { + "format": "int64", + "maximum": 9223372036854776000, + "minimum": -9223372036854776000, + "type": "integer" + }, + { + "format": "nonce", + "maxLength": 25, + "type": "string" + } + ] + }, + "pinned": { + "type": "boolean" + }, + "poll": { + "$ref": "#/components/schemas/PollResponse" + }, + "position": { + "format": "int32", + "type": "integer" + }, + "purchase_notification": { + "$ref": "#/components/schemas/PurchaseNotificationResponse" + }, + "reactions": { + "items": { + "$ref": "#/components/schemas/MessageReactionResponse" + }, + "type": "array" + }, + "referenced_message": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/BasicMessageResponse" + } + ] + }, + "resolved": { + "$ref": "#/components/schemas/ResolvedObjectsResponse" + }, + "role_subscription_data": { + "$ref": "#/components/schemas/MessageRoleSubscriptionDataResponse" + }, + "shared_client_theme": { + "$ref": "#/components/schemas/CustomClientThemeResponse" + }, + "sticker_items": { + "items": { + "$ref": "#/components/schemas/MessageStickerItemResponse" + }, + "type": "array" + }, + "stickers": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/GuildStickerResponse" + }, + { + "$ref": "#/components/schemas/StandardStickerResponse" + } + ] + }, + "type": "array" + }, + "thread": { + "$ref": "#/components/schemas/ThreadResponse" + }, + "timestamp": { + "format": "date-time", + "type": "string" + }, + "tts": { + "type": "boolean" + }, + "type": { + "$ref": "#/components/schemas/MessageType" + }, + "webhook_id": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + "required": [ + "type", + "content", + "mentions", + "mention_roles", + "attachments", + "embeds", + "timestamp", + "edited_timestamp", + "flags", + "components", + "id", + "channel_id", + "author", + "pinned", + "mention_everyone", + "tts" + ], + "type": "object" + }, + "MessageRoleSubscriptionDataResponse": { + "properties": { + "is_renewal": { + "type": "boolean" + }, + "role_subscription_listing_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "tier_name": { + "type": "string" + }, + "total_months_subscribed": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "role_subscription_listing_id", + "tier_name", + "total_months_subscribed", + "is_renewal" + ], + "type": "object" + }, + "MessageShareCustomUserThemeBaseTheme": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "description": "No base theme", + "title": "UNSET" + }, + { + "const": 1, + "description": "Dark base theme", + "title": "DARK" + }, + { + "const": 2, + "description": "Light base theme", + "title": "LIGHT" + }, + { + "const": 3, + "description": "Darker base theme", + "title": "DARKER" + }, + { + "const": 4, + "description": "Midnight base theme", + "title": "MIDNIGHT" + } + ], + "type": "integer" + }, + "MessageSnapshotResponse": { + "properties": { + "message": { + "$ref": "#/components/schemas/MinimalContentMessageResponse" + } + }, + "required": [ + "message" + ], + "type": "object" + }, + "MessageStickerItemResponse": { + "properties": { + "format_type": { + "$ref": "#/components/schemas/StickerFormatTypes" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "format_type" + ], + "type": "object" + }, + "MessageType": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "description": "", + "title": "DEFAULT" + }, + { + "const": 1, + "description": "", + "title": "RECIPIENT_ADD" + }, + { + "const": 2, + "description": "", + "title": "RECIPIENT_REMOVE" + }, + { + "const": 3, + "description": "", + "title": "CALL" + }, + { + "const": 4, + "description": "", + "title": "CHANNEL_NAME_CHANGE" + }, + { + "const": 5, + "description": "", + "title": "CHANNEL_ICON_CHANGE" + }, + { + "const": 6, + "description": "", + "title": "CHANNEL_PINNED_MESSAGE" + }, + { + "const": 7, + "description": "", + "title": "USER_JOIN" + }, + { + "const": 8, + "description": "", + "title": "GUILD_BOOST" + }, + { + "const": 9, + "description": "", + "title": "GUILD_BOOST_TIER_1" + }, + { + "const": 10, + "description": "", + "title": "GUILD_BOOST_TIER_2" + }, + { + "const": 11, + "description": "", + "title": "GUILD_BOOST_TIER_3" + }, + { + "const": 12, + "description": "", + "title": "CHANNEL_FOLLOW_ADD" + }, + { + "const": 14, + "description": "", + "title": "GUILD_DISCOVERY_DISQUALIFIED" + }, + { + "const": 15, + "description": "", + "title": "GUILD_DISCOVERY_REQUALIFIED" + }, + { + "const": 16, + "description": "", + "title": "GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING" + }, + { + "const": 17, + "description": "", + "title": "GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING" + }, + { + "const": 18, + "description": "", + "title": "THREAD_CREATED" + }, + { + "const": 19, + "description": "", + "title": "REPLY" + }, + { + "const": 20, + "description": "", + "title": "CHAT_INPUT_COMMAND" + }, + { + "const": 21, + "description": "", + "title": "THREAD_STARTER_MESSAGE" + }, + { + "const": 22, + "description": "", + "title": "GUILD_INVITE_REMINDER" + }, + { + "const": 23, + "description": "", + "title": "CONTEXT_MENU_COMMAND" + }, + { + "const": 24, + "description": "", + "title": "AUTO_MODERATION_ACTION" + }, + { + "const": 25, + "description": "", + "title": "ROLE_SUBSCRIPTION_PURCHASE" + }, + { + "const": 26, + "description": "", + "title": "INTERACTION_PREMIUM_UPSELL" + }, + { + "const": 27, + "description": "", + "title": "STAGE_START" + }, + { + "const": 28, + "description": "", + "title": "STAGE_END" + }, + { + "const": 29, + "description": "", + "title": "STAGE_SPEAKER" + }, + { + "const": 31, + "description": "", + "title": "STAGE_TOPIC" + }, + { + "const": 32, + "description": "", + "title": "GUILD_APPLICATION_PREMIUM_SUBSCRIPTION" + }, + { + "const": 36, + "description": "", + "title": "GUILD_INCIDENT_ALERT_MODE_ENABLED" + }, + { + "const": 37, + "description": "", + "title": "GUILD_INCIDENT_ALERT_MODE_DISABLED" + }, + { + "const": 38, + "description": "", + "title": "GUILD_INCIDENT_REPORT_RAID" + }, + { + "const": 39, + "description": "", + "title": "GUILD_INCIDENT_REPORT_FALSE_ALARM" + }, + { + "const": 46, + "description": "", + "title": "POLL_RESULT" + }, + { + "const": 55, + "description": "", + "title": "HD_STREAMING_UPGRADED" + } + ], + "type": "integer" + }, + "MinimalContentMessageResponse": { + "properties": { + "attachments": { + "items": { + "$ref": "#/components/schemas/MessageAttachmentResponse" + }, + "type": "array" + }, + "components": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/ActionRowComponentResponse" + }, + { + "$ref": "#/components/schemas/ContainerComponentResponse" + }, + { + "$ref": "#/components/schemas/FileComponentResponse" + }, + { + "$ref": "#/components/schemas/MediaGalleryComponentResponse" + }, + { + "$ref": "#/components/schemas/SectionComponentResponse" + }, + { + "$ref": "#/components/schemas/SeparatorComponentResponse" + }, + { + "$ref": "#/components/schemas/TextDisplayComponentResponse" + } + ] + }, + "type": "array" + }, + "content": { + "type": "string" + }, + "edited_timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "embeds": { + "items": { + "$ref": "#/components/schemas/MessageEmbedResponse" + }, + "type": "array" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "mention_roles": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "array", + "uniqueItems": true + }, + "mentions": { + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": "array" + }, + "sticker_items": { + "items": { + "$ref": "#/components/schemas/MessageStickerItemResponse" + }, + "type": "array" + }, + "stickers": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/GuildStickerResponse" + }, + { + "$ref": "#/components/schemas/StandardStickerResponse" + } + ] + }, + "type": "array" + }, + "timestamp": { + "format": "date-time", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/MessageType" + } + }, + "required": [ + "type", + "content", + "mentions", + "mention_roles", + "attachments", + "embeds", + "timestamp", + "edited_timestamp", + "flags", + "components" + ], + "type": "object" + }, + "ModalSubmitInteractionMetadataResponse": { + "properties": { + "authorizing_integration_owners": { + "additionalProperties": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "object" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "original_response_message_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "triggering_interaction_metadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/ApplicationCommandInteractionMetadataResponse" + }, + { + "$ref": "#/components/schemas/MessageComponentInteractionMetadataResponse" + } + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/InteractionTypes" + } + ], + "enum": [ + 5 + ], + "format": "int32", + "type": "integer" + }, + "user": { + "$ref": "#/components/schemas/UserResponse" + } + }, + "required": [ + "id", + "type", + "authorizing_integration_owners", + "triggering_interaction_metadata" + ], + "type": "object" + }, + "MyGuildResponse": { + "properties": { + "approximate_member_count": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "approximate_presence_count": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "banner": { + "type": [ + "string", + "null" + ] + }, + "features": { + "items": { + "$ref": "#/components/schemas/GuildFeatures" + }, + "type": "array", + "uniqueItems": true + }, + "icon": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "boolean" + }, + "permissions": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "icon", + "banner", + "owner", + "permissions", + "features" + ], + "type": "object" + }, + "NameplatePalette": { + "oneOf": [ + { + "const": "crimson", + "description": "Crimson color palette", + "title": "CRIMSON" + }, + { + "const": "berry", + "description": "Berry color palette", + "title": "BERRY" + }, + { + "const": "sky", + "description": "Sky color palette", + "title": "SKY" + }, + { + "const": "teal", + "description": "Teal color palette", + "title": "TEAL" + }, + { + "const": "forest", + "description": "Forest color palette", + "title": "FOREST" + }, + { + "const": "bubble_gum", + "description": "Bubble gum color palette", + "title": "BUBBLE_GUM" + }, + { + "const": "violet", + "description": "Violet color palette", + "title": "VIOLET" + }, + { + "const": "cobalt", + "description": "Cobalt color palette", + "title": "COBALT" + }, + { + "const": "clover", + "description": "Clover color palette", + "title": "CLOVER" + }, + { + "const": "lemon", + "description": "Lemon color palette", + "title": "LEMON" + }, + { + "const": "white", + "description": "White color palette", + "title": "WHITE" + }, + { + "const": "black", + "description": "Black color palette", + "title": "BLACK" + } + ], + "type": "string" + }, + "OAuth2Scopes": { + "oneOf": [ + { + "const": "identify", + "description": "allows /users/@me without email", + "title": "IDENTIFY" + }, + { + "const": "email", + "description": "enables /users/@me to return an email", + "title": "EMAIL" + }, + { + "const": "connections", + "description": "allows /users/@me/connections to return linked third-party accounts", + "title": "CONNECTIONS" + }, + { + "const": "guilds", + "description": "allows /users/@me/guilds to return basic information about all of a user's guilds", + "title": "GUILDS" + }, + { + "const": "guilds.join", + "description": "allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild", + "title": "GUILDS_JOIN" + }, + { + "const": "guilds.members.read", + "description": "allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild", + "title": "GUILDS_MEMBERS_READ" + }, + { + "const": "gdm.join", + "description": "allows your app to join users to a group dm", + "title": "GDM_JOIN" + }, + { + "const": "bot", + "description": "for oauth2 bots, this puts the bot in the user's selected guild by default", + "title": "BOT" + }, + { + "const": "rpc", + "description": "for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval", + "title": "RPC" + }, + { + "const": "rpc.notifications.read", + "description": "for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval", + "title": "RPC_NOTIFICATIONS_READ" + }, + { + "const": "rpc.voice.read", + "description": "for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval", + "title": "RPC_VOICE_READ" + }, + { + "const": "rpc.voice.write", + "description": "for local rpc server access, this allows you to update a user's voice settings - requires Discord approval", + "title": "RPC_VOICE_WRITE" + }, + { + "const": "rpc.video.read", + "description": "for local rpc server access, this allows you to read a user's video status - requires Discord approval", + "title": "RPC_VIDEO_READ" + }, + { + "const": "rpc.video.write", + "description": "for local rpc server access, this allows you to update a user's video settings - requires Discord approval", + "title": "RPC_VIDEO_WRITE" + }, + { + "const": "rpc.screenshare.read", + "description": "for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval", + "title": "RPC_SCREENSHARE_READ" + }, + { + "const": "rpc.screenshare.write", + "description": "for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval", + "title": "RPC_SCREENSHARE_WRITE" + }, + { + "const": "rpc.activities.write", + "description": "for local rpc server access, this allows you to update a user's activity - requires Discord approval", + "title": "RPC_ACTIVITIES_WRITE" + }, + { + "const": "webhook.incoming", + "description": "this generates a webhook that is returned in the oauth token response for authorization code grants", + "title": "WEBHOOK_INCOMING" + }, + { + "const": "messages.read", + "description": "for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates)", + "title": "MESSAGES_READ" + }, + { + "const": "applications.builds.upload", + "description": "allows your app to upload/update builds for a user's applications - requires Discord approval", + "title": "APPLICATIONS_BUILDS_UPLOAD" + }, + { + "const": "applications.builds.read", + "description": "allows your app to read build data for a user's applications", + "title": "APPLICATIONS_BUILDS_READ" + }, + { + "const": "applications.commands", + "description": "allows your app to use commands in a guild", + "title": "APPLICATIONS_COMMANDS" + }, + { + "const": "applications.commands.permissions.update", + "description": "allows your app to update permissions for its commands in a guild a user has permissions to", + "title": "APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE" + }, + { + "const": "applications.commands.update", + "description": "allows your app to update its commands using a Bearer token - client credentials grant only", + "title": "APPLICATIONS_COMMANDS_UPDATE" + }, + { + "const": "applications.store.update", + "description": "allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications", + "title": "APPLICATIONS_STORE_UPDATE" + }, + { + "const": "applications.entitlements", + "description": "allows your app to read entitlements for a user's applications", + "title": "APPLICATIONS_ENTITLEMENTS" + }, + { + "const": "activities.read", + "description": "allows your app to fetch data from a user's \"Now Playing/Recently Played\" list - requires Discord approval", + "title": "ACTIVITIES_READ" + }, + { + "const": "activities.write", + "description": "allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)", + "title": "ACTIVITIES_WRITE" + }, + { + "const": "activities.invites.write", + "description": "allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)", + "title": "ACTIVITIES_INVITES_WRITE" + }, + { + "const": "relationships.read", + "description": "allows your app to know a user's friends and implicit relationships - requires Discord approval", + "title": "RELATIONSHIPS_READ" + }, + { + "const": "voice", + "description": "allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval", + "title": "VOICE" + }, + { + "const": "dm_channels.read", + "description": "allows your app to see information about the user's DMs and group DMs - requires Discord approval", + "title": "DM_CHANNELS_READ" + }, + { + "const": "role_connections.write", + "description": "allows your app to update a user's connection and metadata for the app", + "title": "ROLE_CONNECTIONS_WRITE" + }, + { + "const": "openid", + "description": "for OpenID Connect, this allows your app to receive user id and basic profile information", + "title": "OPENID" + } + ], + "type": "string" + }, + "PinnedMessageResponse": { + "properties": { + "message": { + "$ref": "#/components/schemas/MessageResponse" + }, + "pinned_at": { + "format": "date-time", + "type": "string" + } + }, + "required": [ + "pinned_at", + "message" + ], + "type": "object" + }, + "PinnedMessagesResponse": { + "properties": { + "has_more": { + "type": "boolean" + }, + "items": { + "items": { + "$ref": "#/components/schemas/PinnedMessageResponse" + }, + "type": "array" + } + }, + "required": [ + "items", + "has_more" + ], + "type": "object" + }, + "PollAnswerCreateRequest": { + "properties": { + "poll_media": { + "$ref": "#/components/schemas/PollMediaCreateRequest", + "description": "The data of the answer" + } + }, + "required": [ + "poll_media" + ], + "type": "object" + }, + "PollAnswerDetailsResponse": { + "properties": { + "users": { + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": "array" + } + }, + "required": [ + "users" + ], + "type": "object" + }, + "PollAnswerResponse": { + "properties": { + "answer_id": { + "description": "The ID of the answer", + "format": "int32", + "type": "integer" + }, + "poll_media": { + "$ref": "#/components/schemas/PollMediaResponse", + "description": "The data of the answer" + } + }, + "required": [ + "answer_id", + "poll_media" + ], + "type": "object" + }, + "PollCreateRequest": { + "properties": { + "allow_multiselect": { + "description": "Whether a user can select multiple answers", + "type": [ + "boolean", + "null" + ] + }, + "answers": { + "description": "Each of the answers available in the poll, up to 10", + "items": { + "$ref": "#/components/schemas/PollAnswerCreateRequest" + }, + "maxItems": 10, + "minItems": 1, + "type": "array" + }, + "duration": { + "description": "Number of hours the poll should be open for, up to 32 days. Defaults to 24", + "format": "int32", + "maximum": 768, + "minimum": 1, + "type": [ + "integer", + "null" + ] + }, + "layout_type": { + "description": "The layout type of the poll. Defaults to... DEFAULT!", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PollLayoutTypes" + } + ] + }, + "question": { + "$ref": "#/components/schemas/PollMedia", + "description": "The question of the poll. Only `text` is supported." + } + }, + "required": [ + "question", + "answers" + ], + "type": "object" + }, + "PollEmoji": { + "properties": { + "animated": { + "description": "Whether the emoji is animated", + "type": [ + "boolean", + "null" + ] + }, + "id": { + "description": "The ID of the custom emoji", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "name": { + "description": "The name of the emoji, or the unicode emoji character", + "maxLength": 32, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "PollEmojiCreateRequest": { + "properties": { + "animated": { + "description": "Whether the emoji is animated", + "type": [ + "boolean", + "null" + ] + }, + "id": { + "description": "The ID of the custom emoji", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "name": { + "description": "The name of the emoji, or the unicode emoji character", + "maxLength": 32, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "PollLayoutTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "description": "The, uhm, default layout type.", + "title": "DEFAULT" + } + ], + "type": "integer" + }, + "PollMedia": { + "properties": { + "emoji": { + "description": "The emoji of the field", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PollEmoji" + } + ] + }, + "text": { + "description": "The text of the field", + "maxLength": 300, + "minLength": 1, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "PollMediaCreateRequest": { + "properties": { + "emoji": { + "description": "The emoji of the field", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/PollEmojiCreateRequest" + } + ] + }, + "text": { + "description": "The text of the field", + "maxLength": 300, + "minLength": 1, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "PollMediaResponse": { + "properties": { + "emoji": { + "$ref": "#/components/schemas/MessageReactionEmojiResponse", + "description": "The emoji of the field" + }, + "text": { + "description": "The text of the field", + "type": "string" + } + }, + "type": "object" + }, + "PollResponse": { + "properties": { + "allow_multiselect": { + "description": "Whether a user can select multiple answers", + "type": "boolean" + }, + "answers": { + "description": "Each of the answers available in the poll", + "items": { + "$ref": "#/components/schemas/PollAnswerResponse" + }, + "type": "array" + }, + "expiry": { + "description": "The time when the poll ends", + "format": "date-time", + "type": "string" + }, + "layout_type": { + "$ref": "#/components/schemas/PollLayoutTypes", + "description": "The layout type of the poll" + }, + "question": { + "$ref": "#/components/schemas/PollMediaResponse", + "description": "The question of the poll. Only `text` is supported." + }, + "results": { + "$ref": "#/components/schemas/PollResultsResponse", + "description": "The results of the poll" + } + }, + "required": [ + "question", + "answers", + "expiry", + "allow_multiselect", + "layout_type", + "results" + ], + "type": "object" + }, + "PollResultsEntryResponse": { + "properties": { + "count": { + "description": "The number of votes for this answer", + "format": "int32", + "type": "integer" + }, + "id": { + "description": "The answer_id", + "format": "int32", + "type": "integer" + }, + "me_voted": { + "description": "Whether the current user voted for this answer", + "type": "boolean" + } + }, + "required": [ + "id", + "count", + "me_voted" + ], + "type": "object" + }, + "PollResultsResponse": { + "properties": { + "answer_counts": { + "description": "The counts for each answer", + "items": { + "$ref": "#/components/schemas/PollResultsEntryResponse" + }, + "type": "array" + }, + "is_finalized": { + "description": "Whether the votes have been precisely counted", + "type": "boolean" + } + }, + "required": [ + "answer_counts", + "is_finalized" + ], + "type": "object" + }, + "PremiumTypes": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "description": "None", + "title": "NONE" + }, + { + "const": 1, + "description": "Nitro Classic", + "title": "TIER_1" + }, + { + "const": 2, + "description": "Nitro Standard", + "title": "TIER_2" + }, + { + "const": 3, + "description": "Nitro Basic", + "title": "TIER_0" + } + ], + "type": "integer" + }, + "PrivateChannelResponse": { + "properties": { + "flags": { + "format": "int32", + "type": "integer" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "last_message_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "last_pin_timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "recipients": { + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": "array" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ChannelTypes" + } + ], + "enum": [ + 1 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "id", + "type", + "flags", + "recipients" + ], + "type": "object" + }, + "PrivateGroupChannelResponse": { + "properties": { + "application_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "icon": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "last_message_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "last_pin_timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "managed": { + "type": "boolean" + }, + "name": { + "type": [ + "string", + "null" + ] + }, + "owner_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "recipients": { + "items": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": "array" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ChannelTypes" + } + ], + "enum": [ + 3 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "id", + "type", + "flags", + "recipients", + "name", + "icon", + "owner_id" + ], + "type": "object" + }, + "PrivateGuildMemberResponse": { + "properties": { + "avatar": { + "description": "the member's guild avatar hash", + "type": [ + "string", + "null" + ] + }, + "avatar_decoration_data": { + "description": "data for the member's guild avatar decoration", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserAvatarDecorationResponse" + } + ] + }, + "banner": { + "description": "the member's guild banner hash", + "type": [ + "string", + "null" + ] + }, + "collectibles": { + "description": "data for the member's collectibles", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserCollectiblesResponse" + } + ] + }, + "communication_disabled_until": { + "description": "when the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "deaf": { + "description": "whether the user is deafened in voice channels", + "type": "boolean" + }, + "flags": { + "description": "guild member flags represented as a bit set, defaults to 0", + "format": "int32", + "type": "integer" + }, + "joined_at": { + "description": "when the user joined the guild", + "format": "date-time", + "type": "string" + }, + "mute": { + "description": "whether the user is muted in voice channels", + "type": "boolean" + }, + "nick": { + "description": "this user's guild nickname", + "type": [ + "string", + "null" + ] + }, + "pending": { + "description": "whether the user has not yet passed the guild's Membership Screening requirements", + "type": "boolean" + }, + "permissions": { + "type": "string" + }, + "premium_since": { + "description": "when the user started boosting the guild", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "roles": { + "description": "array of role object ids", + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "array", + "uniqueItems": true + }, + "user": { + "$ref": "#/components/schemas/UserResponse", + "description": "the user this guild member represents" + } + }, + "required": [ + "avatar", + "banner", + "communication_disabled_until", + "flags", + "joined_at", + "nick", + "pending", + "premium_since", + "roles", + "user", + "mute", + "deaf" + ], + "type": "object" + }, + "PurchaseNotificationResponse": { + "properties": { + "guild_product_purchase": { + "$ref": "#/components/schemas/GuildProductPurchaseResponse" + }, + "type": { + "$ref": "#/components/schemas/PurchaseType" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "PurchaseType": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "title": "GUILD_PRODUCT" + } + ], + "type": "integer" + }, + "RatelimitedResponse": { + "allOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "properties": { + "global": { + "description": "Whether you are being ratelimited by the global ratelimit or a per-endpoint ratelimit", + "type": "boolean" + }, + "retry_after": { + "description": "The number of seconds to wait before retrying your request", + "type": "number" + } + }, + "required": [ + "retry_after", + "global" + ], + "type": "object" + } + ], + "description": "Ratelimit error object returned by the Discord API", + "type": "object" + }, + "ReactionTypes": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "description": "Normal reaction type", + "title": "NORMAL" + }, + { + "const": 1, + "description": "Burst reaction type", + "title": "BURST" + } + ], + "type": "integer" + }, + "RecurrenceRuleFrequencies": { + "format": "int32", + "oneOf": [ + { + "const": 3, + "title": "DAILY" + }, + { + "const": 2, + "title": "WEEKLY" + }, + { + "const": 1, + "title": "MONTHLY" + }, + { + "const": 0, + "title": "YEARLY" + } + ], + "type": "integer" + }, + "RecurrenceRuleMonths": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "title": "JANUARY" + }, + { + "const": 2, + "title": "FEBRUARY" + }, + { + "const": 3, + "title": "MARCH" + }, + { + "const": 4, + "title": "APRIL" + }, + { + "const": 5, + "title": "MAY" + }, + { + "const": 6, + "title": "JUNE" + }, + { + "const": 7, + "title": "JULY" + }, + { + "const": 8, + "title": "AUGUST" + }, + { + "const": 9, + "title": "SEPTEMBER" + }, + { + "const": 10, + "title": "OCTOBER" + }, + { + "const": 11, + "title": "NOVEMBER" + }, + { + "const": 12, + "title": "DECEMBER" + } + ], + "type": "integer" + }, + "RecurrenceRuleResponse": { + "properties": { + "by_month": { + "description": "Set of specific months to recur on", + "items": { + "$ref": "#/components/schemas/RecurrenceRuleMonths" + }, + "type": [ + "array", + "null" + ], + "uniqueItems": true + }, + "by_month_day": { + "description": "Set of specific dates within a month to recur on", + "items": { + "format": "int32", + "type": "integer" + }, + "type": [ + "array", + "null" + ], + "uniqueItems": true + }, + "by_n_weekday": { + "description": "List of specific days within a specific week to recur on", + "items": { + "$ref": "#/components/schemas/ByNWeekdayResponse" + }, + "type": [ + "array", + "null" + ] + }, + "by_weekday": { + "description": "Set of specific days within a week for the event to recur on", + "items": { + "$ref": "#/components/schemas/RecurrenceRuleWeekdays" + }, + "type": [ + "array", + "null" + ], + "uniqueItems": true + }, + "by_year_day": { + "description": "Set of days within a year to recur on (1-364)", + "items": { + "format": "int32", + "type": "integer" + }, + "type": [ + "array", + "null" + ], + "uniqueItems": true + }, + "count": { + "description": "Total number of times the event is allowed to recur", + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "end": { + "description": "Ending time of the recurrence interval", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "frequency": { + "$ref": "#/components/schemas/RecurrenceRuleFrequencies", + "description": "How often the event occurs" + }, + "interval": { + "description": "The spacing between events, defined by frequency", + "format": "int32", + "type": "integer" + }, + "start": { + "description": "Starting time of the recurrence interval", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "start", + "frequency", + "interval", + "by_weekday", + "by_n_weekday", + "by_month", + "by_month_day" + ], + "type": "object" + }, + "RecurrenceRuleWeekdays": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "title": "MONDAY" + }, + { + "const": 1, + "title": "TUESDAY" + }, + { + "const": 2, + "title": "WEDNESDAY" + }, + { + "const": 3, + "title": "THURSDAY" + }, + { + "const": 4, + "title": "FRIDAY" + }, + { + "const": 5, + "title": "SATURDAY" + }, + { + "const": 6, + "title": "SUNDAY" + } + ], + "type": "integer" + }, + "ResolvedObjectsResponse": { + "properties": { + "channels": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/GuildChannelResponse" + }, + { + "$ref": "#/components/schemas/PrivateChannelResponse" + }, + { + "$ref": "#/components/schemas/PrivateGroupChannelResponse" + }, + { + "$ref": "#/components/schemas/ThreadResponse" + } + ] + }, + "type": [ + "object", + "null" + ] + }, + "members": { + "additionalProperties": { + "$ref": "#/components/schemas/BasicGuildMemberResponse" + }, + "type": [ + "object", + "null" + ] + }, + "roles": { + "additionalProperties": { + "$ref": "#/components/schemas/GuildRoleResponse" + }, + "type": [ + "object", + "null" + ] + }, + "users": { + "additionalProperties": { + "$ref": "#/components/schemas/UserResponse" + }, + "type": [ + "object", + "null" + ] + } + }, + "type": "object" + }, + "RichEmbed": { + "properties": { + "author": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RichEmbedAuthor" + } + ] + }, + "color": { + "maximum": 16777215, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "description": { + "maxLength": 4096, + "type": [ + "string", + "null" + ] + }, + "fields": { + "items": { + "$ref": "#/components/schemas/RichEmbedField" + }, + "maxItems": 25, + "type": [ + "array", + "null" + ] + }, + "footer": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RichEmbedFooter" + } + ] + }, + "image": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RichEmbedImage" + } + ] + }, + "provider": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RichEmbedProvider" + } + ] + }, + "thumbnail": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RichEmbedThumbnail" + } + ] + }, + "timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "title": { + "maxLength": 256, + "type": [ + "string", + "null" + ] + }, + "type": { + "maxLength": 152133, + "type": [ + "string", + "null" + ] + }, + "url": { + "format": "uri", + "maxLength": 2048, + "type": [ + "string", + "null" + ] + }, + "video": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RichEmbedVideo" + } + ] + } + }, + "type": "object" + }, + "RichEmbedAuthor": { + "properties": { + "icon_url": { + "format": "uri", + "maxLength": 2048, + "type": [ + "string", + "null" + ] + }, + "name": { + "maxLength": 256, + "type": [ + "string", + "null" + ] + }, + "url": { + "format": "uri", + "maxLength": 2048, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "RichEmbedField": { + "properties": { + "inline": { + "type": [ + "boolean", + "null" + ] + }, + "name": { + "maxLength": 256, + "type": "string" + }, + "value": { + "maxLength": 1024, + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "RichEmbedFooter": { + "properties": { + "icon_url": { + "format": "uri", + "maxLength": 2048, + "type": [ + "string", + "null" + ] + }, + "text": { + "maxLength": 2048, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "RichEmbedImage": { + "properties": { + "description": { + "maxLength": 4096, + "type": [ + "string", + "null" + ] + }, + "height": { + "type": [ + "integer", + "null" + ] + }, + "is_animated": { + "type": [ + "boolean", + "null" + ] + }, + "placeholder": { + "maxLength": 64, + "type": [ + "string", + "null" + ] + }, + "placeholder_version": { + "maximum": 2147483647, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "url": { + "format": "uri", + "maxLength": 2048, + "type": [ + "string", + "null" + ] + }, + "width": { + "type": [ + "integer", + "null" + ] + } + }, + "type": "object" + }, + "RichEmbedProvider": { + "properties": { + "name": { + "maxLength": 256, + "type": [ + "string", + "null" + ] + }, + "url": { + "format": "uri", + "maxLength": 2048, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "RichEmbedThumbnail": { + "properties": { + "description": { + "maxLength": 4096, + "type": [ + "string", + "null" + ] + }, + "height": { + "type": [ + "integer", + "null" + ] + }, + "is_animated": { + "type": [ + "boolean", + "null" + ] + }, + "placeholder": { + "maxLength": 64, + "type": [ + "string", + "null" + ] + }, + "placeholder_version": { + "maximum": 2147483647, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "url": { + "format": "uri", + "maxLength": 2048, + "type": [ + "string", + "null" + ] + }, + "width": { + "type": [ + "integer", + "null" + ] + } + }, + "type": "object" + }, + "RichEmbedVideo": { + "properties": { + "description": { + "maxLength": 4096, + "type": [ + "string", + "null" + ] + }, + "height": { + "type": [ + "integer", + "null" + ] + }, + "is_animated": { + "type": [ + "boolean", + "null" + ] + }, + "placeholder": { + "maxLength": 64, + "type": [ + "string", + "null" + ] + }, + "placeholder_version": { + "maximum": 2147483647, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "url": { + "format": "uri", + "maxLength": 2048, + "type": [ + "string", + "null" + ] + }, + "width": { + "type": [ + "integer", + "null" + ] + } + }, + "type": "object" + }, + "RoleSelectComponentForMessageRequest": { + "properties": { + "custom_id": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "default_values": { + "items": { + "$ref": "#/components/schemas/RoleSelectDefaultValue" + }, + "maxItems": 25, + "type": [ + "array", + "null" + ] + }, + "disabled": { + "type": [ + "boolean", + "null" + ] + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "max_values": { + "maximum": 25, + "minimum": 1, + "type": [ + "integer", + "null" + ] + }, + "min_values": { + "maximum": 25, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "placeholder": { + "maxLength": 150, + "type": [ + "string", + "null" + ] + }, + "required": { + "type": [ + "boolean", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 6 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "custom_id" + ], + "type": "object" + }, + "RoleSelectComponentResponse": { + "properties": { + "custom_id": { + "type": "string" + }, + "default_values": { + "items": { + "$ref": "#/components/schemas/RoleSelectDefaultValueResponse" + }, + "type": "array" + }, + "disabled": { + "type": "boolean" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "max_values": { + "format": "int32", + "type": "integer" + }, + "min_values": { + "format": "int32", + "type": "integer" + }, + "placeholder": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 6 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "custom_id", + "min_values", + "max_values" + ], + "type": "object" + }, + "RoleSelectDefaultValue": { + "properties": { + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/SnowflakeSelectDefaultValueTypes" + } + ], + "enum": [ + "role" + ], + "type": "string" + } + }, + "required": [ + "type", + "id" + ], + "type": "object" + }, + "RoleSelectDefaultValueResponse": { + "properties": { + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/SnowflakeSelectDefaultValueTypes" + } + ], + "enum": [ + "role" + ], + "type": "string" + } + }, + "required": [ + "type", + "id" + ], + "type": "object" + }, + "ScheduledEventResponse": { + "properties": { + "channel_id": { + "description": "Channel ID in which the scheduled event will be hosted, or null if entity type is EXTERNAL", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "creator": { + "$ref": "#/components/schemas/UserResponse", + "description": "User that created the scheduled event" + }, + "creator_id": { + "description": "ID of the user that created the scheduled event", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "description": { + "description": "Description of the scheduled event", + "type": [ + "string", + "null" + ] + }, + "entity_id": { + "description": "ID of the hosting entity associated with the scheduled event", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "entity_type": { + "$ref": "#/components/schemas/GuildScheduledEventEntityTypes", + "description": "Type of hosting entity associated with the scheduled event" + }, + "guild_id": { + "$ref": "#/components/schemas/SnowflakeType", + "description": "ID of the guild the scheduled event belongs to" + }, + "guild_scheduled_event_exceptions": { + "items": { + "$ref": "#/components/schemas/GuildScheduledEventExceptionResponse" + }, + "type": "array" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType", + "description": "ID of the scheduled event" + }, + "image": { + "description": "Cover image hash of the scheduled event", + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Name of the scheduled event", + "type": "string" + }, + "privacy_level": { + "$ref": "#/components/schemas/GuildScheduledEventPrivacyLevels", + "description": "Privacy level of the scheduled event" + }, + "recurrence_rule": { + "description": "Recurrence rule for the scheduled event, or null if not recurring", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/RecurrenceRuleResponse" + } + ] + }, + "scheduled_end_time": { + "description": "When the scheduled event will end, or null if no end time", + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "scheduled_start_time": { + "description": "When the scheduled event will start", + "format": "date-time", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/GuildScheduledEventStatuses", + "description": "Status of the scheduled event" + }, + "user_count": { + "description": "Number of users subscribed to the scheduled event", + "format": "int32", + "type": "integer" + }, + "user_rsvp": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ScheduledEventUserResponse" + } + ] + } + }, + "required": [ + "id", + "guild_id", + "name", + "description", + "channel_id", + "creator_id", + "image", + "scheduled_start_time", + "scheduled_end_time", + "status", + "entity_type", + "entity_id", + "recurrence_rule", + "privacy_level", + "guild_scheduled_event_exceptions" + ], + "type": "object" + }, + "ScheduledEventUserResponse": { + "properties": { + "guild_scheduled_event_exception_id": { + "description": "ID of the scheduled event exception", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "guild_scheduled_event_id": { + "$ref": "#/components/schemas/SnowflakeType", + "description": "ID of the scheduled event" + }, + "member": { + "$ref": "#/components/schemas/GuildMemberResponse", + "description": "Guild member object for the RSVP user" + }, + "response": { + "$ref": "#/components/schemas/GuildScheduledEventUserResponses", + "description": "User's RSVP status for the event" + }, + "user": { + "$ref": "#/components/schemas/UserResponse", + "description": "User object for the RSVP user" + }, + "user_id": { + "$ref": "#/components/schemas/SnowflakeType", + "description": "ID of the user" + } + }, + "required": [ + "guild_scheduled_event_id", + "user_id", + "response" + ], + "type": "object" + }, + "SearchIndexNotReadyResponse": { + "properties": { + "code": { + "format": "int32", + "type": "integer" + }, + "documents_indexed": { + "format": "int32", + "type": "integer" + }, + "message": { + "type": "string" + }, + "retry_after": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "message", + "code", + "documents_indexed", + "retry_after" + ], + "type": "object" + }, + "SectionComponentForMessageRequest": { + "properties": { + "accessory": { + "oneOf": [ + { + "$ref": "#/components/schemas/ButtonComponentForMessageRequest" + }, + { + "$ref": "#/components/schemas/ThumbnailComponentForMessageRequest" + } + ] + }, + "components": { + "items": { + "$ref": "#/components/schemas/TextDisplayComponentForMessageRequest" + }, + "maxItems": 3, + "minItems": 1, + "type": "array" + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 9 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "components", + "accessory" + ], + "type": "object" + }, + "SectionComponentResponse": { + "properties": { + "accessory": { + "oneOf": [ + { + "$ref": "#/components/schemas/ButtonComponentResponse" + }, + { + "$ref": "#/components/schemas/ThumbnailComponentResponse" + } + ] + }, + "components": { + "items": { + "$ref": "#/components/schemas/TextDisplayComponentResponse" + }, + "type": "array" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 9 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "components", + "accessory" + ], + "type": "object" + }, + "SeparatorComponentForMessageRequest": { + "properties": { + "divider": { + "type": [ + "boolean", + "null" + ] + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "spacing": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/MessageComponentSeparatorSpacingSize" + } + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 14 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "SeparatorComponentResponse": { + "properties": { + "divider": { + "type": "boolean" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "spacing": { + "$ref": "#/components/schemas/MessageComponentSeparatorSpacingSize" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 14 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "spacing", + "divider" + ], + "type": "object" + }, + "SnowflakeSelectDefaultValueTypes": { + "oneOf": [ + { + "const": "user", + "title": "USER" + }, + { + "const": "role", + "title": "ROLE" + }, + { + "const": "channel", + "title": "CHANNEL" + } + ], + "type": "string" + }, + "SnowflakeType": { + "format": "snowflake", + "pattern": "^(0|[1-9][0-9]*)$", + "type": "string" + }, + "SortingOrder": { + "oneOf": [ + { + "const": "asc", + "title": "ASC" + }, + { + "const": "desc", + "title": "DESC" + } + ], + "type": "string" + }, + "SoundboardSoundSendRequest": { + "properties": { + "sound_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "source_guild_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + } + }, + "required": [ + "sound_id" + ], + "type": "object" + }, + "StandardStickerResponse": { + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "format_type": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/StickerFormatTypes" + } + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + }, + "pack_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "sort_value": { + "format": "int32", + "type": "integer" + }, + "tags": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/StickerTypes" + } + ], + "enum": [ + 1 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "id", + "name", + "tags", + "type", + "format_type", + "description", + "pack_id", + "sort_value" + ], + "type": "object" + }, + "StickerFormatTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "title": "PNG" + }, + { + "const": 2, + "title": "APNG" + }, + { + "const": 3, + "title": "LOTTIE" + }, + { + "const": 4, + "title": "GIF" + } + ], + "type": "integer" + }, + "StickerTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "description": "an official sticker in a pack, part of Nitro or in a removed purchasable pack", + "title": "STANDARD" + }, + { + "const": 2, + "description": "a sticker uploaded to a guild for the guild's members", + "title": "GUILD" + } + ], + "type": "integer" + }, + "StringSelectComponentForMessageRequest": { + "properties": { + "custom_id": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "disabled": { + "type": [ + "boolean", + "null" + ] + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "max_values": { + "maximum": 25, + "minimum": 1, + "type": [ + "integer", + "null" + ] + }, + "min_values": { + "maximum": 25, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "options": { + "items": { + "$ref": "#/components/schemas/StringSelectOptionForRequest" + }, + "maxItems": 25, + "minItems": 1, + "type": "array" + }, + "placeholder": { + "maxLength": 150, + "type": [ + "string", + "null" + ] + }, + "required": { + "type": [ + "boolean", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 3 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "custom_id", + "options" + ], + "type": "object" + }, + "StringSelectComponentResponse": { + "properties": { + "custom_id": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "max_values": { + "format": "int32", + "type": "integer" + }, + "min_values": { + "format": "int32", + "type": "integer" + }, + "options": { + "items": { + "$ref": "#/components/schemas/StringSelectOptionResponse" + }, + "type": "array" + }, + "placeholder": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 3 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "custom_id", + "min_values", + "max_values", + "options" + ], + "type": "object" + }, + "StringSelectOptionForRequest": { + "properties": { + "default": { + "type": [ + "boolean", + "null" + ] + }, + "description": { + "maxLength": 100, + "type": [ + "string", + "null" + ] + }, + "emoji": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ComponentEmojiForRequest" + } + ] + }, + "label": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "value": { + "maxLength": 100, + "minLength": 1, + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "type": "object" + }, + "StringSelectOptionResponse": { + "properties": { + "default": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "emoji": { + "$ref": "#/components/schemas/ComponentEmojiResponse" + }, + "label": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "label", + "value" + ], + "type": "object" + }, + "TextDisplayComponentForMessageRequest": { + "properties": { + "content": { + "maxLength": 4000, + "minLength": 1, + "type": "string" + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 10 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "content" + ], + "type": "object" + }, + "TextDisplayComponentResponse": { + "properties": { + "content": { + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 10 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "content" + ], + "type": "object" + }, + "TextInputComponentResponse": { + "properties": { + "custom_id": { + "type": "string" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "label": { + "type": [ + "string", + "null" + ] + }, + "max_length": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "min_length": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "placeholder": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "style": { + "$ref": "#/components/schemas/TextInputStyleTypes" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 4 + ], + "format": "int32", + "type": "integer" + }, + "value": { + "type": "string" + } + }, + "required": [ + "type", + "id", + "custom_id", + "style", + "label", + "min_length", + "max_length" + ], + "type": "object" + }, + "TextInputStyleTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "description": "Single-line input", + "title": "SHORT" + }, + { + "const": 2, + "description": "Multi-line input", + "title": "PARAGRAPH" + } + ], + "type": "integer" + }, + "ThreadAutoArchiveDuration": { + "format": "int32", + "oneOf": [ + { + "const": 60, + "description": "One hour", + "title": "ONE_HOUR" + }, + { + "const": 1440, + "description": "One day", + "title": "ONE_DAY" + }, + { + "const": 4320, + "description": "Three days", + "title": "THREE_DAY" + }, + { + "const": 10080, + "description": "Seven days", + "title": "SEVEN_DAY" + } + ], + "type": "integer" + }, + "ThreadMemberResponse": { + "properties": { + "flags": { + "format": "int32", + "type": "integer" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "join_timestamp": { + "format": "date-time", + "type": "string" + }, + "member": { + "$ref": "#/components/schemas/GuildMemberResponse" + }, + "user_id": { + "$ref": "#/components/schemas/SnowflakeType" + } + }, + "required": [ + "id", + "user_id", + "join_timestamp", + "flags" + ], + "type": "object" + }, + "ThreadMetadataResponse": { + "properties": { + "archive_timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "archived": { + "type": "boolean" + }, + "auto_archive_duration": { + "$ref": "#/components/schemas/ThreadAutoArchiveDuration" + }, + "create_timestamp": { + "format": "date-time", + "type": "string" + }, + "invitable": { + "type": "boolean" + }, + "locked": { + "type": "boolean" + } + }, + "required": [ + "archived", + "archive_timestamp", + "auto_archive_duration", + "locked" + ], + "type": "object" + }, + "ThreadResponse": { + "properties": { + "applied_tags": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": "array" + }, + "bitrate": { + "format": "int32", + "type": "integer" + }, + "flags": { + "format": "int32", + "type": "integer" + }, + "guild_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "last_message_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "last_pin_timestamp": { + "format": "date-time", + "type": [ + "string", + "null" + ] + }, + "member": { + "$ref": "#/components/schemas/ThreadMemberResponse" + }, + "member_count": { + "format": "int32", + "type": "integer" + }, + "message_count": { + "format": "int32", + "type": "integer" + }, + "name": { + "type": "string" + }, + "owner_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "parent_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "permissions": { + "type": "string" + }, + "rate_limit_per_user": { + "format": "int32", + "type": "integer" + }, + "rtc_region": { + "type": [ + "string", + "null" + ] + }, + "thread_metadata": { + "$ref": "#/components/schemas/ThreadMetadataResponse" + }, + "total_message_sent": { + "format": "int32", + "type": "integer" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/ChannelTypes" + } + ], + "enum": [ + 10, + 11, + 12 + ], + "format": "int32", + "type": "integer" + }, + "user_limit": { + "format": "int32", + "type": "integer" + }, + "video_quality_mode": { + "$ref": "#/components/schemas/VideoQualityModes" + } + }, + "required": [ + "id", + "type", + "flags", + "guild_id", + "name", + "owner_id", + "thread_metadata", + "message_count", + "member_count", + "total_message_sent" + ], + "type": "object" + }, + "ThreadSearchResponse": { + "properties": { + "first_messages": { + "items": { + "$ref": "#/components/schemas/MessageResponse" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "members": { + "items": { + "$ref": "#/components/schemas/ThreadMemberResponse" + }, + "type": "array" + }, + "threads": { + "items": { + "$ref": "#/components/schemas/ThreadResponse" + }, + "type": "array" + }, + "total_results": { + "format": "int32", + "type": "integer" + } + }, + "required": [ + "threads", + "members", + "has_more", + "total_results" + ], + "type": "object" + }, + "ThreadSearchTagSetting": { + "oneOf": [ + { + "const": "match_all", + "description": "The thread tags must contain all tags in the search query", + "title": "MATCH_ALL" + }, + { + "const": "match_some", + "description": "The thread tags must contain at least one of tags in the search query", + "title": "MATCH_SOME" + } + ], + "type": "string" + }, + "ThreadSortOrder": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "description": "Sort forum posts by activity", + "title": "LATEST_ACTIVITY" + }, + { + "const": 1, + "description": "Sort forum posts by creation time (from most recent to oldest)", + "title": "CREATION_DATE" + } + ], + "type": "integer" + }, + "ThreadSortingMode": { + "oneOf": [ + { + "const": "relevance", + "title": "RELEVANCE" + }, + { + "const": "creation_time", + "title": "CREATION_TIME" + }, + { + "const": "last_message_time", + "title": "LAST_MESSAGE_TIME" + }, + { + "const": "archive_time", + "title": "ARCHIVE_TIME" + } + ], + "type": "string" + }, + "ThreadsResponse": { + "properties": { + "first_messages": { + "items": { + "$ref": "#/components/schemas/MessageResponse" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "members": { + "items": { + "$ref": "#/components/schemas/ThreadMemberResponse" + }, + "type": "array" + }, + "threads": { + "items": { + "$ref": "#/components/schemas/ThreadResponse" + }, + "type": "array" + } + }, + "required": [ + "threads", + "members", + "has_more" + ], + "type": "object" + }, + "ThumbnailComponentForMessageRequest": { + "properties": { + "description": { + "maxLength": 1024, + "minLength": 1, + "type": [ + "string", + "null" + ] + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "media": { + "$ref": "#/components/schemas/UnfurledMediaRequest" + }, + "spoiler": { + "type": [ + "boolean", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 11 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "media" + ], + "type": "object" + }, + "ThumbnailComponentResponse": { + "properties": { + "description": { + "type": [ + "string", + "null" + ] + }, + "id": { + "format": "int32", + "type": "integer" + }, + "media": { + "$ref": "#/components/schemas/UnfurledMediaResponse" + }, + "spoiler": { + "type": "boolean" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 11 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "media", + "description", + "spoiler" + ], + "type": "object" + }, + "TypingIndicatorResponse": { + "properties": {}, + "type": "object" + }, + "UInt32Type": { + "format": "int64", + "maximum": 4294967295, + "minimum": 0, + "type": "integer" + }, + "UnfurledMediaRequest": { + "properties": { + "url": { + "format": "uri", + "maxLength": 2048, + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "UnfurledMediaRequestWithAttachmentReferenceRequired": { + "properties": { + "url": { + "format": "uri", + "maxLength": 2048, + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "UnfurledMediaResponse": { + "properties": { + "attachment_id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "content_type": { + "type": [ + "string", + "null" + ] + }, + "height": { + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "proxy_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "width": { + "format": "int32", + "type": [ + "integer", + "null" + ] + } + }, + "required": [ + "id", + "url", + "proxy_url" + ], + "type": "object" + }, + "UpdateApplicationUserRoleConnectionRequest": { + "properties": { + "metadata": { + "additionalProperties": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "maxProperties": 5, + "type": [ + "object", + "null" + ] + }, + "platform_name": { + "maxLength": 50, + "type": [ + "string", + "null" + ] + }, + "platform_username": { + "maxLength": 100, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "UpdateDMRequestPartial": { + "properties": { + "name": { + "maxLength": 100, + "minLength": 0, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "UpdateDefaultReactionEmojiRequest": { + "properties": { + "emoji_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "emoji_name": { + "maxLength": 100, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "UpdateGroupDMRequestPartial": { + "properties": { + "icon": { + "contentEncoding": "base64", + "type": [ + "string", + "null" + ] + }, + "name": { + "maxLength": 100, + "minLength": 0, + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "UpdateGuildChannelRequestPartial": { + "properties": { + "available_tags": { + "items": { + "$ref": "#/components/schemas/UpdateThreadTagRequest" + }, + "maxItems": 20, + "type": [ + "array", + "null" + ] + }, + "bitrate": { + "format": "int32", + "minimum": 8000, + "type": [ + "integer", + "null" + ] + }, + "default_auto_archive_duration": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ThreadAutoArchiveDuration" + } + ] + }, + "default_forum_layout": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ForumLayout" + } + ] + }, + "default_reaction_emoji": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UpdateDefaultReactionEmojiRequest" + } + ] + }, + "default_sort_order": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ThreadSortOrder" + } + ] + }, + "default_tag_setting": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ThreadSearchTagSetting" + } + ] + }, + "default_thread_rate_limit_per_user": { + "maximum": 21600, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "flags": { + "type": [ + "integer", + "null" + ] + }, + "name": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "nsfw": { + "type": [ + "boolean", + "null" + ] + }, + "parent_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "permission_overwrites": { + "items": { + "$ref": "#/components/schemas/ChannelPermissionOverwriteRequest" + }, + "maxItems": 100, + "type": [ + "array", + "null" + ] + }, + "position": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "rate_limit_per_user": { + "maximum": 21600, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "rtc_region": { + "type": [ + "string", + "null" + ] + }, + "topic": { + "maxLength": 4096, + "minLength": 0, + "type": [ + "string", + "null" + ] + }, + "type": { + "oneOf": [ + { + "type": "null" + }, + { + "allOf": [ + { + "$ref": "#/components/schemas/ChannelTypes" + } + ], + "enum": [ + 0, + 2, + 4, + 5, + 13, + 14, + 15 + ], + "format": "int32", + "type": "integer" + } + ] + }, + "user_limit": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "video_quality_mode": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VideoQualityModes" + } + ] + } + }, + "type": "object" + }, + "UpdateThreadRequestPartial": { + "properties": { + "applied_tags": { + "items": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "maxItems": 5, + "type": [ + "array", + "null" + ] + }, + "archived": { + "type": [ + "boolean", + "null" + ] + }, + "auto_archive_duration": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/ThreadAutoArchiveDuration" + } + ] + }, + "bitrate": { + "format": "int32", + "minimum": 8000, + "type": [ + "integer", + "null" + ] + }, + "flags": { + "type": [ + "integer", + "null" + ] + }, + "invitable": { + "type": [ + "boolean", + "null" + ] + }, + "locked": { + "type": [ + "boolean", + "null" + ] + }, + "name": { + "maxLength": 100, + "minLength": 0, + "type": [ + "string", + "null" + ] + }, + "rate_limit_per_user": { + "format": "int32", + "maximum": 21600, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "rtc_region": { + "type": [ + "string", + "null" + ] + }, + "user_limit": { + "maximum": 99, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "video_quality_mode": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/VideoQualityModes" + } + ] + } + }, + "type": "object" + }, + "UpdateThreadTagRequest": { + "properties": { + "emoji_id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "emoji_name": { + "maxLength": 100, + "type": [ + "string", + "null" + ] + }, + "id": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "moderated": { + "type": [ + "boolean", + "null" + ] + }, + "name": { + "maxLength": 50, + "minLength": 0, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "UserAvatarDecorationResponse": { + "properties": { + "asset": { + "description": "the avatar decoration hash", + "type": "string" + }, + "sku_id": { + "description": "id of the avatar decoration's SKU", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + } + }, + "required": [ + "asset", + "sku_id" + ], + "type": "object" + }, + "UserCollectiblesResponse": { + "properties": { + "nameplate": { + "description": "Object mapping of nameplate data", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserNameplateResponse" + } + ] + } + }, + "required": [ + "nameplate" + ], + "type": "object" + }, + "UserNameplateResponse": { + "properties": { + "asset": { + "description": "Path to the nameplate asset", + "type": "string" + }, + "label": { + "description": "The label of this nameplate. Currently unused", + "type": "string" + }, + "palette": { + "$ref": "#/components/schemas/NameplatePalette", + "description": "Background color of the nameplate" + }, + "sku_id": { + "description": "ID of the nameplate SKU", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + } + }, + "required": [ + "sku_id", + "asset", + "label", + "palette" + ], + "type": "object" + }, + "UserPIIResponse": { + "properties": { + "accent_color": { + "description": "the user's banner color encoded as an integer representation of hexadecimal color code", + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "avatar": { + "description": "the user's avatar hash", + "type": [ + "string", + "null" + ] + }, + "avatar_decoration_data": { + "description": "data for the user's avatar decoration", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserAvatarDecorationResponse" + } + ] + }, + "banner": { + "description": "the user's banner hash", + "type": [ + "string", + "null" + ] + }, + "bot": { + "description": "whether the user belongs to an OAuth2 application", + "type": "boolean" + }, + "collectibles": { + "description": "data for the user's collectibles", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserCollectiblesResponse" + } + ] + }, + "discriminator": { + "description": "the user's Discord-tag", + "type": "string" + }, + "email": { + "type": [ + "string", + "null" + ] + }, + "flags": { + "$ref": "#/components/schemas/Int53Type", + "description": "the flags on a user's account" + }, + "global_name": { + "description": "the user's display name, if it is set", + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType", + "description": "the user's id" + }, + "locale": { + "$ref": "#/components/schemas/AvailableLocalesEnum" + }, + "mfa_enabled": { + "type": "boolean" + }, + "premium_type": { + "$ref": "#/components/schemas/PremiumTypes" + }, + "primary_guild": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserPrimaryGuildResponse" + } + ] + }, + "public_flags": { + "description": "the public flags on a user's account", + "format": "int32", + "type": "integer" + }, + "system": { + "description": "whether the user is an Official Discord System user (part of the urgent message system)", + "type": "boolean" + }, + "username": { + "description": "the user's username, not unique across the platform", + "type": "string" + }, + "verified": { + "type": "boolean" + } + }, + "required": [ + "id", + "username", + "avatar", + "discriminator", + "public_flags", + "flags", + "global_name", + "mfa_enabled", + "locale" + ], + "type": "object" + }, + "UserPrimaryGuildResponse": { + "properties": { + "badge": { + "description": "the server tag badge hash", + "type": [ + "string", + "null" + ] + }, + "identity_enabled": { + "description": "whether the user is displaying the primary guild's server tag", + "type": [ + "boolean", + "null" + ] + }, + "identity_guild_id": { + "description": "the id of the user's primary guild", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/SnowflakeType" + } + ] + }, + "tag": { + "description": "the text of the user's server tag, limited to 4 characters", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "identity_guild_id", + "identity_enabled", + "tag", + "badge" + ], + "type": "object" + }, + "UserResponse": { + "properties": { + "accent_color": { + "description": "the user's banner color encoded as an integer representation of hexadecimal color code", + "format": "int32", + "type": [ + "integer", + "null" + ] + }, + "avatar": { + "description": "the user's avatar hash", + "type": [ + "string", + "null" + ] + }, + "avatar_decoration_data": { + "description": "data for the user's avatar decoration", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserAvatarDecorationResponse" + } + ] + }, + "banner": { + "description": "the user's banner hash", + "type": [ + "string", + "null" + ] + }, + "bot": { + "description": "whether the user belongs to an OAuth2 application", + "type": "boolean" + }, + "collectibles": { + "description": "data for the user's collectibles", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserCollectiblesResponse" + } + ] + }, + "discriminator": { + "description": "the user's Discord-tag", + "type": "string" + }, + "flags": { + "$ref": "#/components/schemas/Int53Type", + "description": "the flags on a user's account" + }, + "global_name": { + "description": "the user's display name, if it is set", + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType", + "description": "the user's id" + }, + "primary_guild": { + "description": "the user's primary guild", + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/components/schemas/UserPrimaryGuildResponse" + } + ] + }, + "public_flags": { + "description": "the public flags on a user's account", + "format": "int32", + "type": "integer" + }, + "system": { + "description": "whether the user is an Official Discord System user (part of the urgent message system)", + "type": "boolean" + }, + "username": { + "description": "the user's username, not unique across the platform", + "type": "string" + } + }, + "required": [ + "id", + "username", + "avatar", + "discriminator", + "public_flags", + "flags", + "global_name", + "primary_guild" + ], + "type": "object" + }, + "UserSelectComponentForMessageRequest": { + "properties": { + "custom_id": { + "maxLength": 100, + "minLength": 1, + "type": "string" + }, + "default_values": { + "items": { + "$ref": "#/components/schemas/UserSelectDefaultValue" + }, + "maxItems": 25, + "type": [ + "array", + "null" + ] + }, + "disabled": { + "type": [ + "boolean", + "null" + ] + }, + "id": { + "format": "int32", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "max_values": { + "maximum": 25, + "minimum": 1, + "type": [ + "integer", + "null" + ] + }, + "min_values": { + "maximum": 25, + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "placeholder": { + "maxLength": 150, + "type": [ + "string", + "null" + ] + }, + "required": { + "type": [ + "boolean", + "null" + ] + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 5 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "custom_id" + ], + "type": "object" + }, + "UserSelectComponentResponse": { + "properties": { + "custom_id": { + "type": "string" + }, + "default_values": { + "items": { + "$ref": "#/components/schemas/UserSelectDefaultValueResponse" + }, + "type": "array" + }, + "disabled": { + "type": "boolean" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "max_values": { + "format": "int32", + "type": "integer" + }, + "min_values": { + "format": "int32", + "type": "integer" + }, + "placeholder": { + "type": "string" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/MessageComponentTypes" + } + ], + "enum": [ + 5 + ], + "format": "int32", + "type": "integer" + } + }, + "required": [ + "type", + "id", + "custom_id", + "min_values", + "max_values" + ], + "type": "object" + }, + "UserSelectDefaultValue": { + "properties": { + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/SnowflakeSelectDefaultValueTypes" + } + ], + "enum": [ + "user" + ], + "type": "string" + } + }, + "required": [ + "type", + "id" + ], + "type": "object" + }, + "UserSelectDefaultValueResponse": { + "properties": { + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "type": { + "allOf": [ + { + "$ref": "#/components/schemas/SnowflakeSelectDefaultValueTypes" + } + ], + "enum": [ + "user" + ], + "type": "string" + } + }, + "required": [ + "type", + "id" + ], + "type": "object" + }, + "VerificationLevels": { + "format": "int32", + "oneOf": [ + { + "const": 0, + "description": "unrestricted", + "title": "NONE" + }, + { + "const": 1, + "description": "must have verified email on account", + "title": "LOW" + }, + { + "const": 2, + "description": "must be registered on Discord for longer than 5 minutes", + "title": "MEDIUM" + }, + { + "const": 3, + "description": "must be a member of the server for longer than 10 minutes", + "title": "HIGH" + }, + { + "const": 4, + "description": "must have a verified phone number", + "title": "VERY_HIGH" + } + ], + "type": "integer" + }, + "VideoQualityModes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "description": "Discord chooses the quality for optimal performance", + "title": "AUTO" + }, + { + "const": 2, + "description": "720p", + "title": "FULL" + } + ], + "type": "integer" + }, + "WebhookSourceChannelResponse": { + "properties": { + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "type": "object" + }, + "WebhookSourceGuildResponse": { + "properties": { + "icon": { + "type": [ + "string", + "null" + ] + }, + "id": { + "$ref": "#/components/schemas/SnowflakeType" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "icon", + "name" + ], + "type": "object" + }, + "WebhookTypes": { + "format": "int32", + "oneOf": [ + { + "const": 1, + "description": "Incoming Webhooks can post messages to channels with a generated token", + "title": "GUILD_INCOMING" + }, + { + "const": 2, + "description": "Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels", + "title": "CHANNEL_FOLLOWER" + }, + { + "const": 3, + "description": "Application webhooks are webhooks used with Interactions", + "title": "APPLICATION_INCOMING" + } + ], + "type": "integer" + } + }, + "securitySchemes": { + "BotToken": { + "description": "Discord bot token", + "in": "header", + "name": "Authorization", + "type": "apiKey" + }, + "OAuth2": { + "flows": { + "authorizationCode": { + "authorizationUrl": "https://discord.com/api/oauth2/authorize", + "refreshUrl": "https://discord.com/api/oauth2/token", + "scopes": { + "activities.invites.write": "allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)", + "activities.read": "allows your app to fetch data from a user's \"Now Playing/Recently Played\" list - requires Discord approval", + "activities.write": "allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)", + "applications.builds.read": "allows your app to read build data for a user's applications", + "applications.builds.upload": "allows your app to upload/update builds for a user's applications - requires Discord approval", + "applications.commands": "allows your app to use commands in a guild", + "applications.commands.permissions.update": "allows your app to update permissions for its commands in a guild a user has permissions to", + "applications.entitlements": "allows your app to read entitlements for a user's applications", + "applications.store.update": "allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications", + "bot": "for oauth2 bots, this puts the bot in the user's selected guild by default", + "connections": "allows /users/@me/connections to return linked third-party accounts", + "dm_channels.read": "allows your app to see information about the user's DMs and group DMs - requires Discord approval", + "email": "enables /users/@me to return an email", + "gdm.join": "allows your app to join users to a group dm", + "guilds": "allows /users/@me/guilds to return basic information about all of a user's guilds", + "guilds.join": "allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild", + "guilds.members.read": "allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild", + "identify": "allows /users/@me without email", + "messages.read": "for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates)", + "openid": "for OpenID Connect, this allows your app to receive user id and basic profile information", + "relationships.read": "allows your app to know a user's friends and implicit relationships - requires Discord approval", + "role_connections.write": "allows your app to update a user's connection and metadata for the app", + "rpc": "for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval", + "rpc.activities.write": "for local rpc server access, this allows you to update a user's activity - requires Discord approval", + "rpc.notifications.read": "for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval", + "rpc.screenshare.read": "for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval", + "rpc.screenshare.write": "for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval", + "rpc.video.read": "for local rpc server access, this allows you to read a user's video status - requires Discord approval", + "rpc.video.write": "for local rpc server access, this allows you to update a user's video settings - requires Discord approval", + "rpc.voice.read": "for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval", + "rpc.voice.write": "for local rpc server access, this allows you to update a user's voice settings - requires Discord approval", + "voice": "allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval", + "webhook.incoming": "this generates a webhook that is returned in the oauth token response for authorization code grants" + }, + "tokenUrl": "https://discord.com/api/oauth2/token" + }, + "clientCredentials": { + "refreshUrl": "https://discord.com/api/oauth2/token", + "scopes": { + "activities.invites.write": "allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)", + "activities.read": "allows your app to fetch data from a user's \"Now Playing/Recently Played\" list - requires Discord approval", + "activities.write": "allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)", + "applications.builds.read": "allows your app to read build data for a user's applications", + "applications.builds.upload": "allows your app to upload/update builds for a user's applications - requires Discord approval", + "applications.commands": "allows your app to use commands in a guild", + "applications.commands.permissions.update": "allows your app to update permissions for its commands in a guild a user has permissions to", + "applications.commands.update": "allows your app to update its commands using a Bearer token - client credentials grant only", + "applications.entitlements": "allows your app to read entitlements for a user's applications", + "applications.store.update": "allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications", + "bot": "for oauth2 bots, this puts the bot in the user's selected guild by default", + "connections": "allows /users/@me/connections to return linked third-party accounts", + "dm_channels.read": "allows your app to see information about the user's DMs and group DMs - requires Discord approval", + "email": "enables /users/@me to return an email", + "gdm.join": "allows your app to join users to a group dm", + "guilds": "allows /users/@me/guilds to return basic information about all of a user's guilds", + "guilds.join": "allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild", + "guilds.members.read": "allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild", + "identify": "allows /users/@me without email", + "messages.read": "for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates)", + "openid": "for OpenID Connect, this allows your app to receive user id and basic profile information", + "relationships.read": "allows your app to know a user's friends and implicit relationships - requires Discord approval", + "rpc": "for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval", + "rpc.activities.write": "for local rpc server access, this allows you to update a user's activity - requires Discord approval", + "rpc.notifications.read": "for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval", + "rpc.screenshare.read": "for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval", + "rpc.screenshare.write": "for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval", + "rpc.video.read": "for local rpc server access, this allows you to read a user's video status - requires Discord approval", + "rpc.video.write": "for local rpc server access, this allows you to update a user's video settings - requires Discord approval", + "rpc.voice.read": "for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval", + "rpc.voice.write": "for local rpc server access, this allows you to update a user's voice settings - requires Discord approval", + "voice": "allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval", + "webhook.incoming": "this generates a webhook that is returned in the oauth token response for authorization code grants" + }, + "tokenUrl": "https://discord.com/api/oauth2/token" + }, + "implicit": { + "authorizationUrl": "https://discord.com/api/oauth2/authorize", + "refreshUrl": "https://discord.com/api/oauth2/token", + "scopes": { + "activities.invites.write": "allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)", + "activities.read": "allows your app to fetch data from a user's \"Now Playing/Recently Played\" list - requires Discord approval", + "activities.write": "allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)", + "applications.builds.read": "allows your app to read build data for a user's applications", + "applications.builds.upload": "allows your app to upload/update builds for a user's applications - requires Discord approval", + "applications.commands": "allows your app to use commands in a guild", + "applications.commands.permissions.update": "allows your app to update permissions for its commands in a guild a user has permissions to", + "applications.entitlements": "allows your app to read entitlements for a user's applications", + "applications.store.update": "allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications", + "bot": "for oauth2 bots, this puts the bot in the user's selected guild by default", + "connections": "allows /users/@me/connections to return linked third-party accounts", + "dm_channels.read": "allows your app to see information about the user's DMs and group DMs - requires Discord approval", + "email": "enables /users/@me to return an email", + "gdm.join": "allows your app to join users to a group dm", + "guilds": "allows /users/@me/guilds to return basic information about all of a user's guilds", + "guilds.join": "allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild", + "guilds.members.read": "allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild", + "identify": "allows /users/@me without email", + "messages.read": "for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates)", + "openid": "for OpenID Connect, this allows your app to receive user id and basic profile information", + "relationships.read": "allows your app to know a user's friends and implicit relationships - requires Discord approval", + "rpc": "for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval", + "rpc.activities.write": "for local rpc server access, this allows you to update a user's activity - requires Discord approval", + "rpc.notifications.read": "for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval", + "rpc.screenshare.read": "for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval", + "rpc.screenshare.write": "for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval", + "rpc.video.read": "for local rpc server access, this allows you to read a user's video status - requires Discord approval", + "rpc.video.write": "for local rpc server access, this allows you to update a user's video settings - requires Discord approval", + "rpc.voice.read": "for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval", + "rpc.voice.write": "for local rpc server access, this allows you to update a user's voice settings - requires Discord approval", + "voice": "allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval", + "webhook.incoming": "this generates a webhook that is returned in the oauth token response for authorization code grants" + } + } + }, + "type": "oauth2" + } + } + } +} diff --git a/e2e/fixtures/github-trimmed-3.0.json b/e2e/fixtures/github-trimmed-3.0.json new file mode 100644 index 0000000..343c016 --- /dev/null +++ b/e2e/fixtures/github-trimmed-3.0.json @@ -0,0 +1,16487 @@ +{ + "openapi": "3.0.3", + "info": { + "version": "1.1.4", + "title": "GitHub v3 REST API", + "description": "GitHub's v3 REST API.", + "license": { + "name": "MIT", + "url": "https://spdx.org/licenses/MIT" + }, + "termsOfService": "https://docs.github.com/articles/github-terms-of-service", + "contact": { + "name": "Support", + "url": "https://support.github.com/contact?tags=dotcom-rest-api" + }, + "x-github-plan": "api.github.com", + "x-fixture-provenance": "Trimmed by e2e/fixtures/trim-openapi.mjs (--tags issues,gists) — see e2e/fixtures/README.md" + }, + "servers": [ + { + "url": "https://api.github.com" + } + ], + "paths": { + "/gists": { + "get": { + "description": "Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#list-gists-for-the-authenticated-user" + }, + "operationId": "gists/list", + "parameters": [ + { + "$ref": "#/components/parameters/since" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/base-gist-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/base-gist" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + } + }, + "summary": "List gists for the authenticated user", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + }, + "post": { + "description": "Allows you to add a new gist with one or more files.\n\n> [!NOTE]\n> Don't name your files \"gistfile\" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#create-a-gist" + }, + "operationId": "gists/create", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "summary": "Creating a gist", + "value": { + "description": "Example of a gist", + "files": { + "README.md": { + "content": "Hello World" + } + }, + "public": false + } + } + }, + "schema": { + "properties": { + "description": { + "description": "Description of the gist", + "example": "Example Ruby script", + "type": "string" + }, + "files": { + "additionalProperties": { + "properties": { + "content": { + "description": "Content of the file", + "readOnly": false, + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "description": "Names and content for the files that make up the gist", + "example": { + "hello.rb": { + "content": "puts \"Hello, World!\"" + } + }, + "type": "object" + }, + "public": { + "oneOf": [ + { + "default": false, + "description": "Flag indicating whether the gist is public", + "example": true, + "type": "boolean" + }, + { + "default": "false", + "enum": [ + "true", + "false" + ], + "example": "true", + "type": "string" + } + ] + } + }, + "required": [ + "files" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/gist" + } + }, + "schema": { + "$ref": "#/components/schemas/gist-simple" + } + } + }, + "description": "Response", + "headers": { + "Location": { + "example": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "schema": { + "type": "string" + } + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Create a gist", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + } + }, + "/gists/public": { + "get": { + "description": "List public gists sorted by most recently updated to least recently updated.\n\nNote: With [pagination](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#list-public-gists" + }, + "operationId": "gists/list-public", + "parameters": [ + { + "$ref": "#/components/parameters/since" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/base-gist-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/base-gist" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "List public gists", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + } + }, + "/gists/starred": { + "get": { + "description": "List the authenticated user's starred gists:", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#list-starred-gists" + }, + "operationId": "gists/list-starred", + "parameters": [ + { + "$ref": "#/components/parameters/since" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/base-gist-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/base-gist" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "401": { + "$ref": "#/components/responses/requires_authentication" + }, + "403": { + "$ref": "#/components/responses/forbidden" + } + }, + "summary": "List starred gists", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + } + }, + "/gists/{gist_id}": { + "delete": { + "description": "", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#delete-a-gist" + }, + "operationId": "gists/delete", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Delete a gist", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + }, + "get": { + "description": "Gets a specified gist.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#get-a-gist" + }, + "operationId": "gists/get", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/gist" + } + }, + "schema": { + "$ref": "#/components/schemas/gist-simple" + } + } + }, + "description": "Response" + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden_gist" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Get a gist", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + }, + "patch": { + "description": "Allows you to update a gist's description and to update, delete, or rename gist files. Files\nfrom the previous version of the gist that aren't explicitly changed during an edit\nare unchanged.\n\nAt least one of `description` or `files` is required.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#update-a-gist" + }, + "operationId": "gists/update", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "deleteFile": { + "summary": "Deleting a gist file", + "value": { + "files": { + "hello.py": null + } + } + }, + "renameFile": { + "summary": "Renaming a gist file", + "value": { + "files": { + "hello.py": { + "filename": "goodbye.py" + } + } + } + }, + "updateGist": { + "summary": "Updating a gist", + "value": { + "description": "An updated gist description", + "files": { + "README.md": { + "content": "Hello World from GitHub" + } + } + } + } + }, + "schema": { + "nullable": true, + "properties": { + "description": { + "description": "The description of the gist.", + "example": "Example Ruby script", + "type": "string" + }, + "files": { + "additionalProperties": { + "nullable": true, + "properties": { + "content": { + "description": "The new content of the file.", + "type": "string" + }, + "filename": { + "description": "The new filename for the file.", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, + "description": "The gist files to be updated, renamed, or deleted. Each `key` must match the current filename\n(including extension) of the targeted gist file. For example: `hello.py`.\n\nTo delete a file, set the whole file to null. For example: `hello.py : null`. The file will also be\ndeleted if the specified object does not contain at least one of `content` or `filename`.", + "example": { + "hello.rb": { + "content": "blah", + "filename": "goodbye.rb" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "deleteFile": { + "$ref": "#/components/examples/delete-gist-file" + }, + "renameFile": { + "$ref": "#/components/examples/rename-gist-file" + }, + "updateGist": { + "$ref": "#/components/examples/gist" + } + }, + "schema": { + "$ref": "#/components/schemas/gist-simple" + } + } + }, + "description": "Response" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Update a gist", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + } + }, + "/gists/{gist_id}/comments": { + "get": { + "description": "Lists the comments on a gist.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/comments#list-gist-comments" + }, + "operationId": "gists/list-comments", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/gist-comment-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/gist-comment" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "List gist comments", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "comments" + } + }, + "post": { + "description": "Creates a comment on a gist.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/comments#create-a-gist-comment" + }, + "operationId": "gists/create-comment", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "summary": "Creating a comment in a gist", + "value": { + "body": "This is a comment to a gist" + } + } + }, + "schema": { + "properties": { + "body": { + "description": "The comment text.", + "example": "Body of the attachment", + "maxLength": 65535, + "type": "string" + } + }, + "required": [ + "body" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/gist-comment" + } + }, + "schema": { + "$ref": "#/components/schemas/gist-comment" + } + } + }, + "description": "Response", + "headers": { + "Location": { + "example": "https://api.github.com/gists/a6db0bec360bb87e9418/comments/1", + "schema": { + "type": "string" + } + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Create a gist comment", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "comments" + } + } + }, + "/gists/{gist_id}/comments/{comment_id}": { + "delete": { + "description": "", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/comments#delete-a-gist-comment" + }, + "operationId": "gists/delete-comment", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + }, + { + "$ref": "#/components/parameters/comment-id" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Delete a gist comment", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "comments" + } + }, + "get": { + "description": "Gets a comment on a gist.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/comments#get-a-gist-comment" + }, + "operationId": "gists/get-comment", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + }, + { + "$ref": "#/components/parameters/comment-id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/gist-comment" + } + }, + "schema": { + "$ref": "#/components/schemas/gist-comment" + } + } + }, + "description": "Response" + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden_gist" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Get a gist comment", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "comments" + } + }, + "patch": { + "description": "Updates a comment on a gist.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/comments#update-a-gist-comment" + }, + "operationId": "gists/update-comment", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + }, + { + "$ref": "#/components/parameters/comment-id" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "summary": "Updating a comment in a gist", + "value": { + "body": "This is an update to a comment in a gist" + } + } + }, + "schema": { + "properties": { + "body": { + "description": "The comment text.", + "example": "Body of the attachment", + "maxLength": 65535, + "type": "string" + } + }, + "required": [ + "body" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/gist-comment" + } + }, + "schema": { + "$ref": "#/components/schemas/gist-comment" + } + } + }, + "description": "Response" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Update a gist comment", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "comments" + } + } + }, + "/gists/{gist_id}/commits": { + "get": { + "description": "", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#list-gist-commits" + }, + "operationId": "gists/list-commits", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/gist-commit-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/gist-commit" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "example": "; rel=\"next\"", + "schema": { + "type": "string" + } + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "List gist commits", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + } + }, + "/gists/{gist_id}/forks": { + "get": { + "description": "", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#list-gist-forks" + }, + "operationId": "gists/list-forks", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/gist-fork-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/gist-simple" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "List gist forks", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + }, + "post": { + "description": "", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#fork-a-gist" + }, + "operationId": "gists/fork", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/base-gist" + } + }, + "schema": { + "$ref": "#/components/schemas/base-gist" + } + } + }, + "description": "Response", + "headers": { + "Location": { + "example": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "schema": { + "type": "string" + } + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Fork a gist", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + } + }, + "/gists/{gist_id}/star": { + "delete": { + "description": "", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#unstar-a-gist" + }, + "operationId": "gists/unstar", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Unstar a gist", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + }, + "get": { + "description": "", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#check-if-a-gist-is-starred" + }, + "operationId": "gists/check-is-starred", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + } + ], + "responses": { + "204": { + "description": "Response if gist is starred" + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "properties": {}, + "type": "object" + } + } + }, + "description": "Not Found if gist is not starred" + } + }, + "summary": "Check if a gist is starred", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + }, + "put": { + "description": "Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method).\"", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#star-a-gist" + }, + "operationId": "gists/star", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Star a gist", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + } + }, + "/gists/{gist_id}/{sha}": { + "get": { + "description": "Gets a specified gist revision.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown. This is the default if you do not pass any specific media type.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#get-a-gist-revision" + }, + "operationId": "gists/get-revision", + "parameters": [ + { + "$ref": "#/components/parameters/gist-id" + }, + { + "in": "path", + "name": "sha", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/gist" + } + }, + "schema": { + "$ref": "#/components/schemas/gist-simple" + } + } + }, + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Get a gist revision", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + } + }, + "/issues": { + "get": { + "description": "List issues assigned to the authenticated user across all visible repositories including owned repositories, member\nrepositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not\nnecessarily assigned to you.\n\n> [!NOTE]\n> GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull request id, use the \"[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)\" endpoint.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#list-issues-assigned-to-the-authenticated-user" + }, + "operationId": "issues/list", + "parameters": [ + { + "description": "Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation.", + "in": "query", + "name": "filter", + "required": false, + "schema": { + "default": "assigned", + "enum": [ + "assigned", + "created", + "mentioned", + "subscribed", + "repos", + "all" + ], + "type": "string" + } + }, + { + "description": "Indicates the state of the issues to return.", + "in": "query", + "name": "state", + "required": false, + "schema": { + "default": "open", + "enum": [ + "open", + "closed", + "all" + ], + "type": "string" + } + }, + { + "$ref": "#/components/parameters/labels" + }, + { + "description": "What to sort results by.", + "in": "query", + "name": "sort", + "required": false, + "schema": { + "default": "created", + "enum": [ + "created", + "updated", + "comments" + ], + "type": "string" + } + }, + { + "$ref": "#/components/parameters/direction" + }, + { + "$ref": "#/components/parameters/since" + }, + { + "in": "query", + "name": "collab", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "orgs", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "owned", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "pulls", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-with-repo-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "List issues assigned to the authenticated user", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "issues" + } + } + }, + "/orgs/{org}/issues": { + "get": { + "description": "List issues in an organization assigned to the authenticated user.\n\n> [!NOTE]\n> GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull request id, use the \"[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)\" endpoint.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#list-organization-issues-assigned-to-the-authenticated-user" + }, + "operationId": "issues/list-for-org", + "parameters": [ + { + "$ref": "#/components/parameters/org" + }, + { + "description": "Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation.", + "in": "query", + "name": "filter", + "required": false, + "schema": { + "default": "assigned", + "enum": [ + "assigned", + "created", + "mentioned", + "subscribed", + "repos", + "all" + ], + "type": "string" + } + }, + { + "description": "Indicates the state of the issues to return.", + "in": "query", + "name": "state", + "required": false, + "schema": { + "default": "open", + "enum": [ + "open", + "closed", + "all" + ], + "type": "string" + } + }, + { + "$ref": "#/components/parameters/labels" + }, + { + "description": "Can be the name of an issue type.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "What to sort results by.", + "in": "query", + "name": "sort", + "required": false, + "schema": { + "default": "created", + "enum": [ + "created", + "updated", + "comments" + ], + "type": "string" + } + }, + { + "$ref": "#/components/parameters/direction" + }, + { + "$ref": "#/components/parameters/since" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-with-repo-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "List organization issues assigned to the authenticated user", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "issues" + } + } + }, + "/repos/{owner}/{repo}/assignees": { + "get": { + "description": "Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/assignees#list-assignees" + }, + "operationId": "issues/list-assignees", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/simple-user-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/simple-user" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "List assignees", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "assignees" + } + } + }, + "/repos/{owner}/{repo}/assignees/{assignee}": { + "get": { + "description": "Checks if a user has permission to be assigned to an issue in this repository.\n\nIf the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned.\n\nOtherwise a `404` status code is returned.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/assignees#check-if-a-user-can-be-assigned" + }, + "operationId": "issues/check-user-can-be-assigned", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "in": "path", + "name": "assignee", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + }, + "description": "Otherwise a `404` status code is returned." + } + }, + "summary": "Check if a user can be assigned", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "assignees" + } + } + }, + "/repos/{owner}/{repo}/issues": { + "get": { + "description": "List issues in a repository. Only open issues will be listed.\n\n> [!NOTE]\n> GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull request id, use the \"[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)\" endpoint.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#list-repository-issues" + }, + "operationId": "issues/list-for-repo", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "description": "If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned.", + "in": "query", + "name": "milestone", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Indicates the state of the issues to return.", + "in": "query", + "name": "state", + "required": false, + "schema": { + "default": "open", + "enum": [ + "open", + "closed", + "all" + ], + "type": "string" + } + }, + { + "description": "Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user.", + "in": "query", + "name": "assignee", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Can be the name of an issue type. If the string `*` is passed, issues with any type are accepted. If the string `none` is passed, issues without type are returned.", + "in": "query", + "name": "type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The user that created the issue.", + "in": "query", + "name": "creator", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "A user that's mentioned in the issue.", + "in": "query", + "name": "mentioned", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "A comma-separated list of issue field filters in `field_slug:value` format.\nOnly issues matching all specified field values are returned.\nRequires issue fields to be enabled for the repository. Issue fields are\nnot available for user-owned repositories, and field availability for\norganization-owned public repositories depends on the organization's\nvisibility settings. For example, `priority:Urgent,severity:High` filters\nissues where the `priority` field is `Urgent` AND the `severity` field is\n`High`.", + "in": "query", + "name": "issue_field_values", + "required": false, + "schema": { + "type": "string" + } + }, + { + "$ref": "#/components/parameters/labels" + }, + { + "description": "What to sort results by.", + "in": "query", + "name": "sort", + "required": false, + "schema": { + "default": "created", + "enum": [ + "created", + "updated", + "comments" + ], + "type": "string" + } + }, + { + "$ref": "#/components/parameters/direction" + }, + { + "$ref": "#/components/parameters/since" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "List repository issues", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issues" + } + }, + "post": { + "description": "Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status.\n\nThis endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)\"\nand \"[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).\"\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#create-an-issue" + }, + "operationId": "issues/create", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "assignees": [ + "octocat" + ], + "body": "I'm having a problem with this.", + "labels": [ + "bug" + ], + "milestone": 1, + "title": "Found a bug" + } + } + }, + "schema": { + "properties": { + "assignee": { + "description": "Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is closing down.**_", + "nullable": true, + "type": "string" + }, + "assignees": { + "description": "Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._", + "items": { + "type": "string" + }, + "type": "array" + }, + "body": { + "description": "The contents of the issue.", + "type": "string" + }, + "issue_field_values": { + "description": "An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Issue fields are only available for organization-owned repositories with the feature enabled. Field values are silently dropped otherwise.", + "items": { + "additionalProperties": false, + "properties": { + "field_id": { + "description": "The ID of the issue field to set", + "type": "integer" + }, + "value": { + "description": "The value to set for the field. For multi-select fields, provide an array of option names.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + "required": [ + "field_id", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "labels": { + "description": "Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "properties": { + "color": { + "nullable": true, + "type": "string" + }, + "description": { + "nullable": true, + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "type": "array" + }, + "milestone": { + "nullable": true, + "oneOf": [ + { + "type": "string" + }, + { + "description": "The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._", + "type": "integer" + } + ] + }, + "title": { + "description": "The title of the issue.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": { + "description": "The name of the issue type to associate with this issue. _NOTE: Only users with push access can set the type for new issues. The type is silently dropped otherwise._", + "example": "Epic", + "nullable": true, + "type": "string" + } + }, + "required": [ + "title" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue" + } + }, + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "Response", + "headers": { + "Location": { + "example": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "schema": { + "type": "string" + } + } + } + }, + "400": { + "$ref": "#/components/responses/bad_request" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "summary": "Create an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issues", + "triggersNotification": true + }, + "x-github-breaking-changes": [ + { + "changeset": "remove_singular_assignee_from_issues_and_pull_requests", + "patch": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "assignee": null + } + } + } + } + } + }, + "version": "2026-03-10" + } + ] + } + }, + "/repos/{owner}/{repo}/issues/comments": { + "get": { + "description": "You can use the REST API to list comments on issues and pull requests for a repository. Every pull request is an issue, but not every issue is a pull request.\n\nBy default, issue comments are ordered by ascending ID.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/comments#list-issue-comments-for-a-repository" + }, + "operationId": "issues/list-comments-for-repo", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/sort" + }, + { + "description": "Either `asc` or `desc`. Ignored without the `sort` parameter.", + "in": "query", + "name": "direction", + "required": false, + "schema": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "$ref": "#/components/parameters/since" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-comment-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue-comment" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "List issue comments for a repository", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "comments" + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + "delete": { + "description": "You can use the REST API to delete comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/comments#delete-an-issue-comment" + }, + "operationId": "issues/delete-comment", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/comment-id" + } + ], + "responses": { + "204": { + "description": "Response" + } + }, + "summary": "Delete an issue comment", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "comments" + } + }, + "get": { + "description": "You can use the REST API to get comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/comments#get-an-issue-comment" + }, + "operationId": "issues/get-comment", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/comment-id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-comment" + } + }, + "schema": { + "$ref": "#/components/schemas/issue-comment" + } + } + }, + "description": "Response" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Get an issue comment", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "comments" + } + }, + "patch": { + "description": "You can use the REST API to update comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/comments#update-an-issue-comment" + }, + "operationId": "issues/update-comment", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/comment-id" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "body": "Me too" + } + } + }, + "schema": { + "properties": { + "body": { + "description": "The contents of the comment.", + "type": "string" + } + }, + "required": [ + "body" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-comment" + } + }, + "schema": { + "$ref": "#/components/schemas/issue-comment" + } + } + }, + "description": "Response" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Update an issue comment", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "comments" + } + } + }, + "/repos/{owner}/{repo}/issues/comments/{comment_id}/pin": { + "delete": { + "description": "You can use the REST API to unpin comments on issues.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/comments#unpin-an-issue-comment" + }, + "operationId": "issues/unpin-comment", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/comment-id" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/requires_authentication" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "summary": "Unpin an issue comment", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "comments" + } + }, + "put": { + "description": "You can use the REST API to pin comments on issues.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/comments#pin-an-issue-comment" + }, + "operationId": "issues/pin-comment", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/comment-id" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-comment-pinned" + } + }, + "schema": { + "$ref": "#/components/schemas/issue-comment" + } + } + }, + "description": "Response" + }, + "401": { + "$ref": "#/components/responses/requires_authentication" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Pin an issue comment", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "comments" + } + } + }, + "/repos/{owner}/{repo}/issues/events": { + "get": { + "description": "Lists events for a repository.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/events#list-issue-events-for-a-repository" + }, + "operationId": "issues/list-events-for-repo", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-event-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue-event" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "List issue events for a repository", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "events" + } + } + }, + "/repos/{owner}/{repo}/issues/events/{event_id}": { + "get": { + "description": "Gets a single event by the event id.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/events#get-an-issue-event" + }, + "operationId": "issues/get-event", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "in": "path", + "name": "event_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-event" + } + }, + "schema": { + "$ref": "#/components/schemas/issue-event" + } + } + }, + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "Get an issue event", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "events" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}": { + "get": { + "description": "The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api#follow-redirects) if the issue was\n[transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If\nthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API\nreturns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read\naccess, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe\nto the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook.\n\n> [!NOTE]\n> GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull request id, use the \"[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)\" endpoint.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#get-an-issue" + }, + "operationId": "issues/get", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "summary": "Issue", + "value": { + "$ref": "#/components/examples/issue" + } + }, + "pinned_comment": { + "summary": "Issue with pinned comment", + "value": { + "$ref": "#/components/examples/issue-with-pinned-comment" + } + } + }, + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "Response" + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "Get an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issues" + } + }, + "patch": { + "description": "Issue owners and users with push access or Triage role can edit an issue.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#update-an-issue" + }, + "operationId": "issues/update", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "assignees": [ + "octocat" + ], + "body": "I'm having a problem with this.", + "labels": [ + "bug" + ], + "milestone": 1, + "state": "open", + "title": "Found a bug" + } + } + }, + "schema": { + "properties": { + "assignee": { + "description": "Username to assign to this issue. **This field is closing down.**", + "nullable": true, + "type": "string" + }, + "assignees": { + "description": "Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped.", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "properties": { + "confidence": { + "description": "The confidence level for this assignee choice.", + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "login": { + "type": "string" + }, + "rationale": { + "description": "Optional reasoning for selecting this assignee.", + "type": "string" + }, + "suggest": { + "description": "If `true`, the change is stored as a pending suggestion for human review rather than applied directly.", + "type": "boolean" + } + }, + "type": "object" + } + ] + }, + "type": "array" + }, + "body": { + "description": "The contents of the issue.", + "nullable": true, + "type": "string" + }, + "duplicate_issue_id": { + "description": "The ID of the issue to mark as the canonical duplicate when `state_reason` is `duplicate`. The issue must exist and be accessible to the authenticated user. Ignored when `state_reason` is not `duplicate`.", + "type": "integer" + }, + "issue_field_values": { + "description": "An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Only users with push access can set field values for issues", + "items": { + "additionalProperties": false, + "properties": { + "confidence": { + "description": "The confidence level for this field value choice.", + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "field_id": { + "description": "The ID of the issue field to set", + "type": "integer" + }, + "rationale": { + "description": "Optional reasoning for setting this field value.", + "type": "string" + }, + "suggest": { + "description": "If `true`, the change is stored as a pending suggestion for human review rather than applied directly.", + "type": "boolean" + }, + "value": { + "description": "The value to set for the field. For multi-select fields, provide an array of option names.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + "required": [ + "field_id", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "labels": { + "description": "Labels to associate with this issue. Pass one or more labels to _replace_ the set of labels on this issue. Send an empty array (`[]`) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped.", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "properties": { + "color": { + "nullable": true, + "type": "string" + }, + "confidence": { + "description": "The confidence level for this label choice.", + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "description": { + "nullable": true, + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "rationale": { + "description": "Optional reasoning for selecting this label.", + "type": "string" + }, + "suggest": { + "description": "If `true`, the change is stored as a pending suggestion for human review rather than applied directly.", + "type": "boolean" + } + }, + "type": "object" + } + ] + }, + "type": "array" + }, + "milestone": { + "nullable": true, + "oneOf": [ + { + "type": "string" + }, + { + "description": "The `number` of the milestone to associate this issue with or use `null` to remove the current milestone. Only users with push access can set the milestone for issues. Without push access to the repository, milestone changes are silently dropped.", + "type": "integer" + } + ] + }, + "state": { + "description": "The open or closed state of the issue.", + "enum": [ + "open", + "closed" + ], + "type": "string" + }, + "state_reason": { + "description": "The reason for the state change. Ignored unless `state` is changed.", + "enum": [ + "completed", + "not_planned", + "duplicate", + "reopened" + ], + "example": "not_planned", + "nullable": true, + "type": "string" + }, + "title": { + "description": "The title of the issue.", + "nullable": true, + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": { + "description": "The issue type to associate with this issue. Only users with push access can set the type for issues. Without push access to the repository, type changes are silently dropped.", + "nullable": true, + "oneOf": [ + { + "description": "The name of the issue type.", + "example": "Epic", + "type": "string" + }, + { + "description": "The issue type with optional metadata.", + "properties": { + "confidence": { + "description": "The confidence level for this type choice.", + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "rationale": { + "description": "Optional reasoning for selecting this type.", + "type": "string" + }, + "suggest": { + "description": "If `true`, the change is stored as a pending suggestion for human review rather than applied directly.", + "type": "boolean" + }, + "value": { + "description": "The name of the issue type to associate with this issue, or `null` to remove the current issue type.", + "example": "Epic", + "nullable": true, + "type": "string" + } + }, + "type": "object" + } + ] + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue" + } + }, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/issue" + }, + { + "properties": { + "suggestions": { + "description": "Pending suggestions for each suggestible field (`type`,\n`issue_field_values`, `labels`, `assignees`, `state`) the\nrequest touched. Omitted for fields not in the request or\nwith no pending or ignored suggestions. Items tagged\n`ignored` are echoes of the current request's inputs that\nwere not persisted as pending suggestions.\n", + "properties": { + "assignees": { + "items": { + "properties": { + "confidence": { + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "ignored": { + "type": "boolean" + }, + "ignored_reason": { + "enum": [ + "already_applied", + "issue_already_closed" + ], + "type": "string" + }, + "login": { + "type": "string" + }, + "rationale": { + "type": "string" + }, + "suggest": { + "type": "boolean" + } + }, + "type": "object" + }, + "type": "array" + }, + "issue_field_values": { + "items": { + "properties": { + "confidence": { + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "field_id": { + "type": "integer" + }, + "ignored": { + "type": "boolean" + }, + "ignored_reason": { + "enum": [ + "already_applied", + "issue_already_closed" + ], + "type": "string" + }, + "rationale": { + "type": "string" + }, + "suggest": { + "type": "boolean" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + "type": "object" + }, + "type": "array" + }, + "labels": { + "items": { + "properties": { + "confidence": { + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "ignored": { + "type": "boolean" + }, + "ignored_reason": { + "enum": [ + "already_applied", + "issue_already_closed" + ], + "type": "string" + }, + "name": { + "type": "string" + }, + "rationale": { + "type": "string" + }, + "suggest": { + "type": "boolean" + } + }, + "type": "object" + }, + "type": "array" + }, + "state": { + "items": { + "properties": { + "confidence": { + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "duplicate_issue_id": { + "type": "integer" + }, + "ignored": { + "type": "boolean" + }, + "ignored_reason": { + "enum": [ + "already_applied", + "issue_already_closed" + ], + "type": "string" + }, + "rationale": { + "type": "string" + }, + "state_reason": { + "type": "string" + }, + "suggest": { + "type": "boolean" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "items": { + "properties": { + "confidence": { + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "ignored": { + "type": "boolean" + }, + "ignored_reason": { + "enum": [ + "already_applied", + "issue_already_closed" + ], + "type": "string" + }, + "rationale": { + "type": "string" + }, + "suggest": { + "type": "boolean" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "type": "object" + } + ] + } + } + }, + "description": "Response" + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "summary": "Update an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issues" + }, + "x-github-breaking-changes": [ + { + "changeset": "remove_singular_assignee_from_issues_and_pull_requests", + "patch": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "assignee": null + } + } + } + } + } + }, + "version": "2026-03-10" + } + ] + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + "delete": { + "description": "Removes one or more assignees from an issue.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/assignees#remove-assignees-from-an-issue" + }, + "operationId": "issues/remove-assignees", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "assignees": [ + "hubot", + "other_user" + ] + } + } + }, + "schema": { + "properties": { + "assignees": { + "description": "Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue" + } + }, + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "Response" + } + }, + "summary": "Remove assignees from an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "assignees" + } + }, + "post": { + "description": "Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/assignees#add-assignees-to-an-issue" + }, + "operationId": "issues/add-assignees", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "assignees": [ + "hubot", + "other_user" + ] + } + } + }, + "schema": { + "properties": { + "assignees": { + "description": "Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "properties": { + "confidence": { + "description": "The confidence level for this assignee choice.", + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "login": { + "description": "The login of the user to assign.", + "type": "string" + }, + "rationale": { + "description": "Optional reasoning for adding this assignee.", + "type": "string" + }, + "suggest": { + "description": "If `true`, the assignee is stored as a pending suggestion for human review rather than applied directly.", + "type": "boolean" + } + }, + "required": [ + "login" + ], + "type": "object" + } + ] + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue" + } + }, + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "Response" + } + }, + "summary": "Add assignees to an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "assignees" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}": { + "get": { + "description": "Checks if a user has permission to be assigned to a specific issue.\n\nIf the `assignee` can be assigned to this issue, a `204` status code with no content is returned.\n\nOtherwise a `404` status code is returned.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/assignees#check-if-a-user-can-be-assigned-to-a-issue" + }, + "operationId": "issues/check-user-can-be-assigned-to-issue", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "in": "path", + "name": "assignee", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response if `assignee` can be assigned to `issue_number`" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + }, + "description": "Response if `assignee` can not be assigned to `issue_number`" + } + }, + "summary": "Check if a user can be assigned to a issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "assignees" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + "get": { + "description": "You can use the REST API to list comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.\n\nIssue comments are ordered by ascending ID.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/comments#list-issue-comments" + }, + "operationId": "issues/list-comments", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "$ref": "#/components/parameters/since" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-comment-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue-comment" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "List issue comments", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "comments" + } + }, + "post": { + "description": "You can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.\n\nThis endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).\nCreating content too quickly using this endpoint may result in secondary rate limiting.\nFor more information, see \"[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)\"\nand \"[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).\"\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/comments#create-an-issue-comment" + }, + "operationId": "issues/create-comment", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "body": "Me too" + } + } + }, + "schema": { + "properties": { + "body": { + "description": "The contents of the comment.", + "type": "string" + } + }, + "required": [ + "body" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-comment" + } + }, + "schema": { + "$ref": "#/components/schemas/issue-comment" + } + } + }, + "description": "Response", + "headers": { + "Location": { + "example": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", + "schema": { + "type": "string" + } + } + } + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Create an issue comment", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "comments", + "triggersNotification": true + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by": { + "get": { + "description": "You can use the REST API to list the dependencies an issue is blocked by.\n\nThis endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\n\n- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issue-dependencies#list-dependencies-an-issue-is-blocked-by" + }, + "operationId": "issues/list-dependencies-blocked-by", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "List dependencies an issue is blocked by", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issue-dependencies" + } + }, + "post": { + "description": "You can use the REST API to add a 'blocked by' relationship to an issue.\n\nCreating content too quickly using this endpoint may result in secondary rate limiting.\nFor more information, see [Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)\nand [Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).\n\nThis endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\n\n- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issue-dependencies#add-a-dependency-an-issue-is-blocked-by" + }, + "operationId": "issues/add-blocked-by-dependency", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "issue_id": 1 + } + } + }, + "schema": { + "properties": { + "issue_id": { + "description": "The id of the issue that blocks the current issue", + "type": "integer" + } + }, + "required": [ + "issue_id" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue" + } + }, + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "Response", + "headers": { + "Location": { + "example": "https://api.github.com/repos/octocat/Hello-World/issues/1/dependencies/blocked_by", + "schema": { + "type": "string" + } + } + } + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Add a dependency an issue is blocked by", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issue-dependencies", + "triggersNotification": true + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}": { + "delete": { + "description": "You can use the REST API to remove a dependency that an issue is blocked by.\n\nRemoving content too quickly using this endpoint may result in secondary rate limiting.\nFor more information, see [Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)\nand [Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).\n\nThis endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\n- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass a specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issue-dependencies#remove-dependency-an-issue-is-blocked-by" + }, + "operationId": "issues/remove-dependency-blocked-by", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "description": "The id of the blocking issue to remove as a dependency", + "in": "path", + "name": "issue_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue" + } + }, + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "Response" + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "400": { + "$ref": "#/components/responses/bad_request" + }, + "401": { + "$ref": "#/components/responses/requires_authentication" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "Remove dependency an issue is blocked by", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issue-dependencies", + "triggersNotification": true + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking": { + "get": { + "description": "You can use the REST API to list the dependencies an issue is blocking.\n\nThis endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\n\n- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issue-dependencies#list-dependencies-an-issue-is-blocking" + }, + "operationId": "issues/list-dependencies-blocking", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "List dependencies an issue is blocking", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issue-dependencies" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/events": { + "get": { + "description": "Lists all events for an issue.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/events#list-issue-events" + }, + "operationId": "issues/list-events", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-event-for-issue-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue-event-for-issue" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "List issue events", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "events" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/issue-field-values": { + "get": { + "description": "Lists all issue field values for an issue.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issue-field-values#list-issue-field-values-for-an-issue" + }, + "operationId": "issues/list-issue-field-values-for-issue", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-field-value-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue-field-value" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "List issue field values for an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issue-field-values" + } + }, + "post": { + "description": "Add custom field values to an issue. You can set values for organization-level issue fields that have been defined for the repository's organization.\nAdding an empty array will clear all existing field values for the issue.\n\nThis endpoint supports the following field data types:\n- **`text`**: String values for text fields\n- **`single_select`**: Option names for single-select fields (must match an existing option name)\n- **`number`**: Numeric values for number fields\n- **`date`**: ISO 8601 date strings for date fields\n\nOnly users with push access to the repository can add issue field values. If you don't have the proper permissions, you'll receive a `403 Forbidden` response.\n\nThis endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)\"\nand \"[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).\"", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issue-field-values#add-issue-field-values-to-an-issue" + }, + "operationId": "issues/add-issue-field-values", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "summary": "Add multiple field values", + "value": { + "issue_field_values": [ + { + "field_id": 123, + "value": "Critical" + }, + { + "field_id": 456, + "value": 5 + }, + { + "field_id": 789, + "value": "2024-12-31" + } + ] + } + }, + "single-field": { + "summary": "Add a single field value", + "value": { + "issue_field_values": [ + { + "field_id": 123, + "value": "High Priority" + } + ] + } + } + }, + "schema": { + "properties": { + "issue_field_values": { + "description": "An array of issue field values to add to this issue. Each field value must include the field ID and the value to set.", + "items": { + "additionalProperties": false, + "properties": { + "field_id": { + "description": "The ID of the issue field to set", + "example": 123, + "type": "integer" + }, + "value": { + "description": "The value to set for the field. The type depends on the field's data type:\n- For text fields: provide a string value\n- For single_select fields: provide the option name as a string (must match an existing option)\n- For number fields: provide a numeric value\n- For multi_select fields: provide an array of option names (must match existing options)\n- For date fields: provide an ISO 8601 date string", + "example": "Critical", + "oneOf": [ + { + "description": "The value to set for text, single_select, or date fields", + "type": "string" + }, + { + "description": "The value to set for number fields", + "type": "number" + }, + { + "description": "The value to set for multi_select fields (array of option names)", + "items": { + "type": "string" + }, + "type": "array" + } + ] + } + }, + "required": [ + "field_id", + "value" + ], + "type": "object" + }, + "maxItems": 25, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-field-value-items" + } + }, + "schema": { + "description": "The current issue field values for this issue after adding the new values", + "items": { + "$ref": "#/components/schemas/issue-field-value" + }, + "type": "array" + } + } + }, + "description": "Response" + }, + "400": { + "$ref": "#/components/responses/bad_request" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "summary": "Add issue field values to an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issue-field-values", + "triggersNotification": true + } + }, + "put": { + "description": "Set custom field values for an issue, replacing any existing values. You can set values for organization-level issue fields that have been defined for the repository's organization.\n\nThis endpoint supports the following field data types:\n- **`text`**: String values for text fields\n- **`single_select`**: Option names for single-select fields (must match an existing option name)\n- **`number`**: Numeric values for number fields\n- **`date`**: ISO 8601 date strings for date fields\n\nThis operation will replace all existing field values with the provided ones. If you want to add field values without replacing existing ones, use the `POST` endpoint instead.\n\nOnly users with push access to the repository can set issue field values. If you don't have the proper permissions, you'll receive a `403 Forbidden` response.\n\nThis endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)\"\nand \"[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).\"", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issue-field-values#set-issue-field-values-for-an-issue" + }, + "operationId": "issues/set-issue-field-values", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "summary": "Set multiple field values", + "value": { + "issue_field_values": [ + { + "field_id": 123, + "value": "Critical" + }, + { + "field_id": 456, + "value": 5 + }, + { + "field_id": 789, + "value": "2024-12-31" + } + ] + } + }, + "single-field": { + "summary": "Set a single field value", + "value": { + "issue_field_values": [ + { + "field_id": 123, + "value": "High Priority" + } + ] + } + } + }, + "schema": { + "properties": { + "issue_field_values": { + "description": "An array of issue field values to set for this issue. Each field value must include the field ID and the value to set. All existing field values will be replaced.", + "items": { + "additionalProperties": false, + "properties": { + "field_id": { + "description": "The ID of the issue field to set", + "example": 123, + "type": "integer" + }, + "value": { + "description": "The value to set for the field. The type depends on the field's data type:\n- For text fields: provide a string value\n- For single_select fields: provide the option name as a string (must match an existing option)\n- For number fields: provide a numeric value\n- For date fields: provide an ISO 8601 date string", + "example": "Critical", + "oneOf": [ + { + "description": "The value to set for text, single_select, or date fields", + "type": "string" + }, + { + "description": "The value to set for number fields", + "type": "number" + } + ] + } + }, + "required": [ + "field_id", + "value" + ], + "type": "object" + }, + "maxItems": 25, + "type": "array" + } + }, + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-field-value-items" + } + }, + "schema": { + "description": "The current issue field values for this issue after setting the new values", + "items": { + "$ref": "#/components/schemas/issue-field-value" + }, + "type": "array" + } + } + }, + "description": "Response" + }, + "400": { + "$ref": "#/components/responses/bad_request" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "summary": "Set issue field values for an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issue-field-values", + "triggersNotification": true + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/issue-field-values/{issue_field_id}": { + "delete": { + "description": "Remove a specific custom field value from an issue.\n\nOnly users with push access to the repository can delete issue field values. If you don't have the proper permissions, you'll receive a `403 Forbidden` response.\n\nIf the specified field does not have a value set on the issue, this operation will return a `404` error.\n\nThis endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)\"\nand \"[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).\"", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issue-field-values#delete-an-issue-field-value-from-an-issue" + }, + "operationId": "issues/delete-issue-field-value", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "$ref": "#/components/parameters/issue-field-id" + } + ], + "responses": { + "204": { + "description": "Issue field value deleted successfully" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "summary": "Delete an issue field value from an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issue-field-values", + "triggersNotification": true + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + "delete": { + "description": "Removes all labels from an issue.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#remove-all-labels-from-an-issue" + }, + "operationId": "issues/remove-all-labels", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "Remove all labels from an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + }, + "get": { + "description": "Lists all labels for an issue.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#list-labels-for-an-issue" + }, + "operationId": "issues/list-labels-on-issue", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/label-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/label" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "List labels for an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + }, + "post": { + "description": "Adds labels to an issue.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#add-labels-to-an-issue" + }, + "operationId": "issues/add-labels", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "labels": [ + "bug", + "enhancement" + ] + } + } + }, + "schema": { + "oneOf": [ + { + "properties": { + "labels": { + "description": "The labels to add to the issue's existing labels. You can also pass an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. To replace all of the labels for an issue, use \"[Set labels for an issue](https://docs.github.com/rest/issues/labels#set-labels-for-an-issue).\"", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "properties": { + "confidence": { + "description": "The confidence level for this label choice.", + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "name": { + "description": "The name of the label to add.", + "type": "string" + }, + "rationale": { + "description": "Optional reasoning for adding this label.", + "type": "string" + }, + "suggest": { + "description": "If `true`, the label is stored as a pending suggestion for human review rather than applied directly.", + "type": "boolean" + } + }, + "required": [ + "name" + ], + "type": "object" + } + ] + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "items": { + "properties": { + "confidence": { + "description": "The confidence level for this label choice.", + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + }, + "name": { + "type": "string" + }, + "rationale": { + "description": "Optional reasoning for adding this label.", + "type": "string" + }, + "suggest": { + "description": "If `true`, the label is stored as a pending suggestion for human review rather than applied directly.", + "type": "boolean" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + } + ] + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/label-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/label" + }, + "type": "array" + } + } + }, + "description": "Response" + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Add labels to an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + }, + "put": { + "description": "Removes any previous labels and sets the new labels for an issue.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#set-labels-for-an-issue" + }, + "operationId": "issues/set-labels", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "labels": [ + "bug", + "enhancement" + ] + } + } + }, + "schema": { + "oneOf": [ + { + "properties": { + "labels": { + "description": "The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see \"[Add labels to an issue](https://docs.github.com/rest/issues/labels#add-labels-to-an-issue).\"", + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "properties": { + "labels": { + "items": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + } + }, + "type": "object" + }, + { + "items": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + }, + { + "type": "string" + } + ] + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/label-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/label" + }, + "type": "array" + } + } + }, + "description": "Response" + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Set labels for an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + "delete": { + "description": "Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#remove-a-label-from-an-issue" + }, + "operationId": "issues/remove-label", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/label-items-2" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/label" + }, + "type": "array" + } + } + }, + "description": "Response" + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "Remove a label from an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + "delete": { + "description": "Users with push access can unlock an issue's conversation.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#unlock-an-issue" + }, + "operationId": "issues/unlock", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Unlock an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issues" + } + }, + "put": { + "description": "Users with push access can lock an issue or pull request's conversation.\n\nNote that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method).\"", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#lock-an-issue" + }, + "operationId": "issues/lock", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "summary": "Example of locking an issue as off-topic", + "value": { + "lock_reason": "off-topic" + } + } + }, + "schema": { + "nullable": true, + "properties": { + "lock_reason": { + "description": "The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: \n * `off-topic` \n * `too heated` \n * `resolved` \n * `spam`", + "enum": [ + "off-topic", + "too heated", + "resolved", + "spam" + ], + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "204": { + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Lock an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issues" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/parent": { + "get": { + "description": "You can use the REST API to get the parent issue of a sub-issue.\n\nThis endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/sub-issues#get-parent-issue" + }, + "operationId": "issues/get-parent", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue" + } + }, + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "Response" + }, + "301": { + "$ref": "#/components/responses/moved_permanently" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "Get parent issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "sub-issues" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/sub_issue": { + "delete": { + "description": "You can use the REST API to remove a sub-issue from an issue.\nRemoving content too quickly using this endpoint may result in secondary rate limiting.\nFor more information, see \"[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)\"\nand \"[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).\"\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/sub-issues#remove-sub-issue" + }, + "operationId": "issues/remove-sub-issue", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "sub_issue_id": 6 + } + } + }, + "schema": { + "properties": { + "sub_issue_id": { + "description": "The id of the sub-issue to remove", + "type": "integer" + } + }, + "required": [ + "sub_issue_id" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue" + } + }, + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "Response", + "headers": { + "Location": { + "example": "https://api.github.com/repos/octocat/Hello-World/issues/1/sub-issue", + "schema": { + "type": "string" + } + } + } + }, + "400": { + "$ref": "#/components/responses/bad_request" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Remove sub-issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "sub-issues", + "triggersNotification": true + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/sub_issues": { + "get": { + "description": "You can use the REST API to list the sub-issues on an issue.\n\nThis endpoint supports the following custom media types. For more information, see [Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\n\n- **`application/vnd.github.raw+json`**: Returns the raw Markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the Markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's Markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/sub-issues#list-sub-issues" + }, + "operationId": "issues/list-sub-issues", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "List sub-issues", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "sub-issues" + } + }, + "post": { + "description": "You can use the REST API to add sub-issues to issues.\n\nCreating content too quickly using this endpoint may result in secondary rate limiting.\nFor more information, see \"[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)\"\nand \"[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api).\"\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/sub-issues#add-sub-issue" + }, + "operationId": "issues/add-sub-issue", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "sub_issue_id": 1 + } + } + }, + "schema": { + "properties": { + "replace_parent": { + "description": "Option that, when true, instructs the operation to replace the sub-issues current parent issue", + "type": "boolean" + }, + "sub_issue_id": { + "description": "The id of the sub-issue to add. The sub-issue must belong to the same repository owner as the parent issue", + "type": "integer" + } + }, + "required": [ + "sub_issue_id" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue" + } + }, + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "Response", + "headers": { + "Location": { + "example": "https://api.github.com/repos/octocat/Hello-World/issues/sub-issues/1", + "schema": { + "type": "string" + } + } + } + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Add sub-issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "sub-issues" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority": { + "patch": { + "description": "You can use the REST API to reprioritize a sub-issue to a different position in the parent list.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/sub-issues#reprioritize-sub-issue" + }, + "operationId": "issues/reprioritize-sub-issue", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "after_id": 5, + "sub_issue_id": 6 + } + } + }, + "schema": { + "properties": { + "after_id": { + "description": "The id of the sub-issue to be prioritized after (either positional argument after OR before should be specified).", + "type": "integer" + }, + "before_id": { + "description": "The id of the sub-issue to be prioritized before (either positional argument after OR before should be specified).", + "type": "integer" + }, + "sub_issue_id": { + "description": "The id of the sub-issue to reprioritize", + "type": "integer" + } + }, + "required": [ + "sub_issue_id" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue" + } + }, + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed_simple" + }, + "503": { + "$ref": "#/components/responses/service_unavailable" + } + }, + "summary": "Reprioritize sub-issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "sub-issues", + "triggersNotification": true + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/suggestions": { + "get": { + "description": "Lists the suggestions on an issue. A suggestion is an agent-proposed change to an issue's type, labels, fields, assignees, or closed state that a maintainer can approve or dismiss.\n\nBy default only pending suggestions are returned. Use `state=all` to return suggestions in every state, or `state=` to filter to a single state. Use `action=` to return only suggestions for a specific change.\n\nThis endpoint is only available while the issue suggestions feature is enabled for the repository, and only supports issues, not pull requests.\n\nRequires triage access to the repository.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#list-issue-suggestions" + }, + "operationId": "issues/list-suggestions", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "description": "Filter suggestions by their state.", + "in": "query", + "name": "state", + "required": false, + "schema": { + "default": "pending", + "enum": [ + "pending", + "applied", + "approved", + "dismissed", + "replaced", + "invalidated", + "all" + ], + "type": "string" + } + }, + { + "description": "Filter suggestions by the change they propose.", + "in": "query", + "name": "action", + "required": false, + "schema": { + "enum": [ + "set_type", + "add_label", + "add_field", + "add_assignee", + "close_issue" + ], + "type": "string" + } + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-suggestions" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue-suggestion" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "List issue suggestions", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issues" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/suggestions/{suggestion_id}/approve": { + "post": { + "description": "Approves a pending suggestion on an issue. Applies the proposed change (creating the corresponding timeline event), transitions the suggestion to `approved`, and dismisses any competing pending suggestions for the same change.\n\nRequires triage access to the repository. Approving a suggestion also requires permission to perform the change it applies (for example, setting the issue type, adding a label or assignee, or closing the issue); this only affects fine-grained access tokens and GitHub Apps whose permissions are narrower than the triage role. This endpoint only supports issues, not pull requests.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#approve-an-issue-suggestion" + }, + "operationId": "issues/approve-suggestion", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "description": "The unique identifier of the suggestion.", + "in": "path", + "name": "suggestion_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-suggestion" + } + }, + "schema": { + "$ref": "#/components/schemas/issue-suggestion" + } + } + }, + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Approve an issue suggestion", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issues" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/suggestions/{suggestion_id}/dismiss": { + "post": { + "description": "Dismisses a pending suggestion on an issue. Transitions the suggestion to `dismissed` without applying any change or creating a timeline event.\n\nRequires triage access to the repository. This endpoint only supports issues, not pull requests.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#dismiss-an-issue-suggestion" + }, + "operationId": "issues/dismiss-suggestion", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "description": "The unique identifier of the suggestion.", + "in": "path", + "name": "suggestion_id", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-suggestion" + } + }, + "schema": { + "$ref": "#/components/schemas/issue-suggestion" + } + } + }, + "description": "Response" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Dismiss an issue suggestion", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "issues" + } + } + }, + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + "get": { + "description": "List all timeline events for an issue.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/timeline#list-timeline-events-for-an-issue" + }, + "operationId": "issues/list-events-for-timeline", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/issue-number" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + }, + { + "$ref": "#/components/parameters/issue-timeline-exclude" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/timeline-issue-events" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/timeline-issue-events" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "400": { + "$ref": "#/components/responses/bad_request" + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "410": { + "$ref": "#/components/responses/gone" + } + }, + "summary": "List timeline events for an issue", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "timeline" + } + } + }, + "/repos/{owner}/{repo}/labels": { + "get": { + "description": "Lists all labels for a repository.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#list-labels-for-a-repository" + }, + "operationId": "issues/list-labels-for-repo", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/label-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/label" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "List labels for a repository", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + }, + "post": { + "description": "Creates a label for the specified repository with the given name and color. The name and color parameters are required. The color must be a valid [hexadecimal color code](http://www.color-hex.com/).", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#create-a-label" + }, + "operationId": "issues/create-label", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "color": "f29513", + "description": "Something isn't working", + "name": "bug" + } + } + }, + "schema": { + "properties": { + "color": { + "description": "The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`.", + "type": "string" + }, + "description": { + "description": "A short description of the label. Must be 100 characters or fewer.", + "type": "string" + }, + "name": { + "description": "The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png \":strawberry:\"). For a full list of available emoji and codes, see \"[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet).\"", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/label" + } + }, + "schema": { + "$ref": "#/components/schemas/label" + } + } + }, + "description": "Response", + "headers": { + "Location": { + "example": "https://api.github.com/repos/octocat/Hello-World/labels/bug", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Create a label", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + } + }, + "/repos/{owner}/{repo}/labels/{name}": { + "delete": { + "description": "Deletes a label using the given label name.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#delete-a-label" + }, + "operationId": "issues/delete-label", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Response" + } + }, + "summary": "Delete a label", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + }, + "get": { + "description": "Gets a label using the given name.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#get-a-label" + }, + "operationId": "issues/get-label", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/label" + } + }, + "schema": { + "$ref": "#/components/schemas/label" + } + } + }, + "description": "Response" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Get a label", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + }, + "patch": { + "description": "Updates a label using the given label name.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#update-a-label" + }, + "operationId": "issues/update-label", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "color": "b01f26", + "description": "Small bug fix required", + "new_name": "bug :bug:" + } + } + }, + "schema": { + "properties": { + "color": { + "description": "The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`.", + "type": "string" + }, + "description": { + "description": "A short description of the label. Must be 100 characters or fewer.", + "type": "string" + }, + "new_name": { + "description": "The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png \":strawberry:\"). For a full list of available emoji and codes, see \"[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet).\"", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/label-2" + } + }, + "schema": { + "$ref": "#/components/schemas/label" + } + } + }, + "description": "Response" + } + }, + "summary": "Update a label", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + } + }, + "/repos/{owner}/{repo}/milestones": { + "get": { + "description": "Lists milestones for a repository.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/milestones#list-milestones" + }, + "operationId": "issues/list-milestones", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "description": "The state of the milestone. Either `open`, `closed`, or `all`.", + "in": "query", + "name": "state", + "required": false, + "schema": { + "default": "open", + "enum": [ + "open", + "closed", + "all" + ], + "type": "string" + } + }, + { + "description": "What to sort results by. Either `due_on` or `completeness`.", + "in": "query", + "name": "sort", + "required": false, + "schema": { + "default": "due_on", + "enum": [ + "due_on", + "completeness" + ], + "type": "string" + } + }, + { + "description": "The direction of the sort. Either `asc` or `desc`.", + "in": "query", + "name": "direction", + "required": false, + "schema": { + "default": "asc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/milestone-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/milestone" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "List milestones", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "milestones" + } + }, + "post": { + "description": "Creates a milestone.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/milestones#create-a-milestone" + }, + "operationId": "issues/create-milestone", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z", + "state": "open", + "title": "v1.0" + } + } + }, + "schema": { + "properties": { + "description": { + "description": "A description of the milestone.", + "type": "string" + }, + "due_on": { + "description": "The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "format": "date-time", + "type": "string" + }, + "state": { + "default": "open", + "description": "The state of the milestone. Either `open` or `closed`.", + "enum": [ + "open", + "closed" + ], + "type": "string" + }, + "title": { + "description": "The title of the milestone.", + "type": "string" + } + }, + "required": [ + "title" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/milestone" + } + }, + "schema": { + "$ref": "#/components/schemas/milestone" + } + } + }, + "description": "Response", + "headers": { + "Location": { + "example": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "Create a milestone", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "milestones" + } + } + }, + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + "delete": { + "description": "Deletes a milestone using the given milestone number.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/milestones#delete-a-milestone" + }, + "operationId": "issues/delete-milestone", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/milestone-number" + } + ], + "responses": { + "204": { + "description": "Response" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Delete a milestone", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "milestones" + } + }, + "get": { + "description": "Gets a milestone using the given milestone number.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/milestones#get-a-milestone" + }, + "operationId": "issues/get-milestone", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/milestone-number" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/milestone" + } + }, + "schema": { + "$ref": "#/components/schemas/milestone" + } + } + }, + "description": "Response" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "Get a milestone", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "milestones" + } + }, + "patch": { + "description": "", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/milestones#update-a-milestone" + }, + "operationId": "issues/update-milestone", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/milestone-number" + } + ], + "requestBody": { + "content": { + "application/json": { + "examples": { + "default": { + "value": { + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z", + "state": "open", + "title": "v1.0" + } + } + }, + "schema": { + "properties": { + "description": { + "description": "A description of the milestone.", + "type": "string" + }, + "due_on": { + "description": "The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "format": "date-time", + "type": "string" + }, + "state": { + "default": "open", + "description": "The state of the milestone. Either `open` or `closed`.", + "enum": [ + "open", + "closed" + ], + "type": "string" + }, + "title": { + "description": "The title of the milestone.", + "type": "string" + } + }, + "type": "object" + } + } + }, + "required": false + }, + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/milestone" + } + }, + "schema": { + "$ref": "#/components/schemas/milestone" + } + } + }, + "description": "Response" + } + }, + "summary": "Update a milestone", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "milestones" + } + } + }, + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + "get": { + "description": "Lists labels for issues in a milestone.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/labels#list-labels-for-issues-in-a-milestone" + }, + "operationId": "issues/list-labels-for-milestone", + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/milestone-number" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/label-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/label" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + } + }, + "summary": "List labels for issues in a milestone", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": true, + "githubCloudOnly": false, + "subcategory": "labels" + } + } + }, + "/user/issues": { + "get": { + "description": "List issues across owned and member repositories assigned to the authenticated user.\n\n> [!NOTE]\n> GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from \"Issues\" endpoints will be an _issue id_. To find out the pull request id, use the \"[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)\" endpoint.\n\nThis endpoint supports the following custom media types. For more information, see \"[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types).\"\n\n- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.\n- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.\n- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.\n- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/issues/issues#list-user-account-issues-assigned-to-the-authenticated-user" + }, + "operationId": "issues/list-for-authenticated-user", + "parameters": [ + { + "description": "Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation.", + "in": "query", + "name": "filter", + "required": false, + "schema": { + "default": "assigned", + "enum": [ + "assigned", + "created", + "mentioned", + "subscribed", + "repos", + "all" + ], + "type": "string" + } + }, + { + "description": "Indicates the state of the issues to return.", + "in": "query", + "name": "state", + "required": false, + "schema": { + "default": "open", + "enum": [ + "open", + "closed", + "all" + ], + "type": "string" + } + }, + { + "$ref": "#/components/parameters/labels" + }, + { + "description": "What to sort results by.", + "in": "query", + "name": "sort", + "required": false, + "schema": { + "default": "created", + "enum": [ + "created", + "updated", + "comments" + ], + "type": "string" + } + }, + { + "$ref": "#/components/parameters/direction" + }, + { + "$ref": "#/components/parameters/since" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/issue-with-repo-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/issue" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "304": { + "$ref": "#/components/responses/not_modified" + }, + "404": { + "$ref": "#/components/responses/not_found" + } + }, + "summary": "List user account issues assigned to the authenticated user", + "tags": [ + "issues" + ], + "x-github": { + "category": "issues", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "issues" + } + } + }, + "/users/{username}/gists": { + "get": { + "description": "Lists public gists for the specified user:", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/gists/gists#list-gists-for-a-user" + }, + "operationId": "gists/list-for-user", + "parameters": [ + { + "$ref": "#/components/parameters/username" + }, + { + "$ref": "#/components/parameters/since" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/page" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "default": { + "$ref": "#/components/examples/base-gist-items" + } + }, + "schema": { + "items": { + "$ref": "#/components/schemas/base-gist" + }, + "type": "array" + } + } + }, + "description": "Response", + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "summary": "List gists for a user", + "tags": [ + "gists" + ], + "x-github": { + "category": "gists", + "enabledForGitHubApps": false, + "githubCloudOnly": false, + "subcategory": "gists" + } + } + } + }, + "components": { + "examples": { + "base-gist": { + "value": { + "comments": 0, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "created_at": "2010-04-14T02:15:15Z", + "description": "Hello World Examples", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167, + "type": "application/x-ruby" + } + }, + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "owner": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "public": true, + "truncated": false, + "updated_at": "2011-06-20T11:34:15Z", + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "user": null + }, + "x-github-breaking-changes": [ + { + "changeset": "deprecate_beta_media_type", + "patch": { + "value": { + "user": null + } + }, + "version": "2026-03-10" + } + ] + }, + "base-gist-items": { + "value": [ + { + "comments": 0, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "created_at": "2010-04-14T02:15:15Z", + "description": "Hello World Examples", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167, + "type": "application/x-ruby" + } + }, + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "owner": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "public": true, + "truncated": false, + "updated_at": "2011-06-20T11:34:15Z", + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "user": null + } + ] + }, + "delete-gist-file": { + "value": { + "comments": 0, + "comments_url": "https://api.github.com/gists/2decf6c462d9b4418f2/comments", + "commits_url": "https://api.github.com/gists/2decf6c462d9b4418f2/commits", + "created_at": "2022-09-20T12:11:58Z", + "description": "A gist description.", + "files": null, + "forks": [], + "forks_url": "https://api.github.com/gists/2decf6c462d9b4418f2/forks", + "git_pull_url": "https://gist.github.com/2decf6c462d9b4418f2.git", + "git_push_url": "https://gist.github.com/2decf6c462d9b4418f2.git", + "history": [ + { + "change_status": { + "additions": 0, + "deletions": 1, + "total": 1 + }, + "committed_at": "2022-09-21T10:28:06Z", + "url": "https://api.github.com/gists/8481a81af6b7a2d418f2/468aac8caed5f0c3b859b8286968", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/104456405?v=4", + "events_url": "https://api.github.com/users/monalisa/events{/privacy}", + "followers_url": "https://api.github.com/users/monalisa/followers", + "following_url": "https://api.github.com/users/monalisa/following{/other_user}", + "gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/monalisa", + "id": 104456405, + "login": "monalisa", + "node_id": "U_kgyLQ", + "organizations_url": "https://api.github.com/users/monalisa/orgs", + "received_events_url": "https://api.github.com/users/monalisa/received_events", + "repos_url": "https://api.github.com/users/monalisa/repos", + "site_admin": true, + "starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/monalisa/subscriptions", + "type": "User", + "url": "https://api.github.com/users/monalisa" + }, + "version": "9cc352a89178a6d4" + } + ], + "html_url": "https://gist.github.com/2decf6c462d9b4418f2", + "id": "2decf6c462d9b4418f2", + "node_id": "G_kwDOBhHyLdoAIDg0ODFZDliNDQxOGYy", + "owner": { + "avatar_url": "https://avatars.githubusercontent.com/u/104456405?v=4", + "events_url": "https://api.github.com/users/monalisa/events{/privacy}", + "followers_url": "https://api.github.com/users/monalisa/followers", + "following_url": "https://api.github.com/users/monalisa/following{/other_user}", + "gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/monalisa", + "id": 104456405, + "login": "monalisa", + "node_id": "U_kgDOBhHyLQ", + "organizations_url": "https://api.github.com/users/monalisa/orgs", + "received_events_url": "https://api.github.com/users/monalisa/received_events", + "repos_url": "https://api.github.com/users/monalisa/repos", + "site_admin": true, + "starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/monalisa/subscriptions", + "type": "User", + "url": "https://api.github.com/users/monalisa" + }, + "public": true, + "truncated": false, + "updated_at": "2022-09-21T10:28:06Z", + "url": "https://api.github.com/gists/2decf6c462d9b4418f2", + "user": null + } + }, + "gist": { + "value": { + "comments": 0, + "comments_enabled": true, + "comments_url": "https://api.github.com/gists/2decf6c462d9b4418f2/comments", + "commits_url": "https://api.github.com/gists/2decf6c462d9b4418f2/commits", + "created_at": "2022-09-20T12:11:58Z", + "description": "An updated gist description.", + "files": { + "README.md": { + "content": "Hello world from GitHub", + "encoding": "utf-8", + "filename": "README.md", + "language": "Markdown", + "raw_url": "https://gist.githubusercontent.com/monalisa/2decf6c462d9b4418f2/raw/ac3e6daf176fafe73609fd000cd188e4472010fb/README.md", + "size": 23, + "truncated": false, + "type": "text/markdown" + } + }, + "forks": [], + "forks_url": "https://api.github.com/gists/2decf6c462d9b4418f2/forks", + "git_pull_url": "https://gist.github.com/2decf6c462d9b4418f2.git", + "git_push_url": "https://gist.github.com/2decf6c462d9b4418f2.git", + "history": [ + { + "change_status": { + "additions": 1, + "deletions": 1, + "total": 2 + }, + "committed_at": "2022-09-21T10:28:06Z", + "url": "https://api.github.com/gists/8481a81af6b7a2d418f2/468aac8caed5f0c3b859b8286968", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/104456405?v=4", + "events_url": "https://api.github.com/users/monalisa/events{/privacy}", + "followers_url": "https://api.github.com/users/monalisa/followers", + "following_url": "https://api.github.com/users/monalisa/following{/other_user}", + "gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/monalisa", + "id": 104456405, + "login": "monalisa", + "node_id": "U_kgyLQ", + "organizations_url": "https://api.github.com/users/monalisa/orgs", + "received_events_url": "https://api.github.com/users/monalisa/received_events", + "repos_url": "https://api.github.com/users/monalisa/repos", + "site_admin": true, + "starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/monalisa/subscriptions", + "type": "User", + "url": "https://api.github.com/users/monalisa" + }, + "version": "468aac8caed5f0c3b859b8286968" + } + ], + "html_url": "https://gist.github.com/2decf6c462d9b4418f2", + "id": "2decf6c462d9b4418f2", + "node_id": "G_kwDOBhHyLdZDliNDQxOGYy", + "owner": { + "avatar_url": "https://avatars.githubusercontent.com/u/104456405?v=4", + "events_url": "https://api.github.com/users/monalisa/events{/privacy}", + "followers_url": "https://api.github.com/users/monalisa/followers", + "following_url": "https://api.github.com/users/monalisa/following{/other_user}", + "gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/monalisa", + "id": 104456405, + "login": "monalisa", + "node_id": "U_kgDOBhHyLQ", + "organizations_url": "https://api.github.com/users/monalisa/orgs", + "received_events_url": "https://api.github.com/users/monalisa/received_events", + "repos_url": "https://api.github.com/users/monalisa/repos", + "site_admin": true, + "starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/monalisa/subscriptions", + "type": "User", + "url": "https://api.github.com/users/monalisa" + }, + "public": true, + "truncated": false, + "updated_at": "2022-09-21T10:28:06Z", + "url": "https://api.github.com/gists/2decf6c462d9b4418f2", + "user": null + } + }, + "gist-comment": { + "value": { + "author_association": "COLLABORATOR", + "body": "Just commenting for the sake of commenting", + "created_at": "2011-04-18T23:23:56Z", + "id": 1, + "node_id": "MDExOkdpc3RDb21tZW50MQ==", + "updated_at": "2011-04-18T23:23:56Z", + "url": "https://api.github.com/gists/a6db0bec360bb87e9418/comments/1", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + } + }, + "gist-comment-items": { + "value": [ + { + "author_association": "COLLABORATOR", + "body": "Just commenting for the sake of commenting", + "created_at": "2011-04-18T23:23:56Z", + "id": 1, + "node_id": "MDExOkdpc3RDb21tZW50MQ==", + "updated_at": "2011-04-18T23:23:56Z", + "url": "https://api.github.com/gists/a6db0bec360bb87e9418/comments/1", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + } + ] + }, + "gist-commit-items": { + "value": [ + { + "change_status": { + "additions": 180, + "deletions": 0, + "total": 180 + }, + "committed_at": "2010-04-14T02:15:15Z", + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "version": "57a7f021a713b1c5a6a199b54cc514735d2d462f" + } + ] + }, + "gist-fork-items": { + "value": [ + { + "comments": 1, + "comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/", + "commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits", + "created_at": "2010-04-14T02:15:15Z", + "description": "Hello World Examples", + "files": { + "hello_world.rb": { + "filename": "hello_world.rb", + "language": "Ruby", + "raw_url": "https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb", + "size": 167, + "type": "application/x-ruby" + } + }, + "forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks", + "git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git", + "html_url": "https://gist.github.com/aa5a315d61ae9438b18d", + "id": "aa5a315d61ae9438b18d", + "node_id": "MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk", + "owner": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "public": true, + "updated_at": "2011-06-20T11:34:15Z", + "url": "https://api.github.com/gists/aa5a315d61ae9438b18d", + "user": null + } + ] + }, + "issue": { + "value": { + "active_lock_reason": "too heated", + "assignee": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "assignees": [ + { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + ], + "author_association": "COLLABORATOR", + "body": "I'm having a problem with this.", + "closed_at": null, + "closed_by": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "comments": 0, + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "created_at": "2011-04-22T13:33:48Z", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "id": 1, + "labels": [ + { + "color": "f29513", + "default": true, + "description": "Something isn't working", + "id": 208045946, + "name": "bug", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug" + } + ], + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "locked": true, + "milestone": { + "closed_at": "2013-02-12T13:22:01Z", + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "creator": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "id": 1002604, + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "open_issues": 4, + "state": "open", + "title": "v1.0", + "updated_at": "2014-03-03T18:58:10Z", + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1" + }, + "node_id": "MDU6SXNzdWUx", + "number": 1347, + "pinned_comment": null, + "pull_request": { + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "state": "open", + "state_reason": "completed", + "title": "Found a bug", + "updated_at": "2011-04-22T13:33:48Z", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + }, + "x-github-breaking-changes": [ + { + "changeset": "remove_singular_assignee_from_issues_and_pull_requests", + "patch": [ + { + "op": "remove", + "path": "/value/assignee" + } + ], + "version": "2026-03-10" + } + ] + }, + "issue-comment": { + "value": { + "author_association": "COLLABORATOR", + "body": "Me too", + "created_at": "2011-04-14T16:00:49Z", + "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", + "id": 1, + "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "minimized": null, + "node_id": "MDEyOklzc3VlQ29tbWVudDE=", + "pin": null, + "updated_at": "2011-04-14T16:00:49Z", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + } + }, + "issue-comment-items": { + "value": [ + { + "author_association": "COLLABORATOR", + "body": "Me too", + "created_at": "2011-04-14T16:00:49Z", + "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", + "id": 1, + "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "minimized": null, + "node_id": "MDEyOklzc3VlQ29tbWVudDE=", + "updated_at": "2011-04-14T16:00:49Z", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + } + ] + }, + "issue-comment-pinned": { + "value": { + "author_association": "COLLABORATOR", + "body": "Me too", + "created_at": "2011-04-14T16:00:49Z", + "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", + "id": 1, + "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "node_id": "MDEyOklzc3VlQ29tbWVudDE=", + "pin": { + "pinned_at": "2021-01-01T00:00:00Z", + "pinned_by": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + }, + "updated_at": "2011-04-14T16:00:49Z", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + } + }, + "issue-event": { + "value": { + "actor": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "commit_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "created_at": "2011-04-14T16:00:49Z", + "event": "closed", + "id": 1, + "issue": { + "assignee": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "assignees": [ + { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + ], + "author_association": "COLLABORATOR", + "body": "I'm having a problem with this.", + "closed_at": null, + "comments": 0, + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "created_at": "2011-04-22T13:33:48Z", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "id": 1, + "labels": [ + { + "color": "f29513", + "default": true, + "description": "Something isn't working", + "id": 208045946, + "name": "bug", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug" + } + ], + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "locked": true, + "milestone": { + "closed_at": "2013-02-12T13:22:01Z", + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "creator": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "id": 1002604, + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "open_issues": 4, + "state": "open", + "title": "v1.0", + "updated_at": "2014-03-03T18:58:10Z", + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1" + }, + "node_id": "MDU6SXNzdWUx", + "number": 1347, + "performed_via_github_app": { + "created_at": "2017-07-08T16:18:44-04:00", + "description": "", + "events": [ + "push", + "pull_request" + ], + "external_url": "https://example.com", + "html_url": "https://github.com/apps/octoapp", + "id": 1, + "name": "Octocat App", + "node_id": "MDExOkludGVncmF0aW9uMQ==", + "owner": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/orgs/github/events", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "github", + "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/orgs/github/repos", + "site_admin": true, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/orgs/github" + }, + "permissions": { + "contents": "read", + "issues": "write", + "metadata": "read" + }, + "slug": "octoapp", + "updated_at": "2017-07-08T16:18:44-04:00" + }, + "pinned_comment": null, + "pull_request": { + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "state": "open", + "state_reason": "completed", + "title": "Found a bug", + "updated_at": "2011-04-22T13:33:48Z", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + }, + "node_id": "MDEwOklzc3VlRXZlbnQx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/events/1" + } + }, + "issue-event-for-issue-items": { + "value": [ + { + "actor": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "commit_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "created_at": "2011-04-14T16:00:49Z", + "event": "closed", + "id": 1, + "label": { + "color": "red", + "name": "label" + }, + "node_id": "MDEwOklzc3VlRXZlbnQx", + "performed_via_github_app": null, + "url": "https://api.github.com/repos/octocat/Hello-World/issues/events/1" + } + ] + }, + "issue-event-items": { + "value": [ + { + "actor": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "commit_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "created_at": "2011-04-14T16:00:49Z", + "event": "closed", + "id": 1, + "issue": { + "active_lock_reason": "too heated", + "assignee": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "assignees": [ + { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + ], + "author_association": "COLLABORATOR", + "body": "I'm having a problem with this.", + "closed_at": null, + "comments": 0, + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "created_at": "2011-04-22T13:33:48Z", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "id": 1, + "labels": [ + { + "color": "f29513", + "default": true, + "description": "Something isn't working", + "id": 208045946, + "name": "bug", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug" + } + ], + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "locked": true, + "milestone": { + "closed_at": "2013-02-12T13:22:01Z", + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "creator": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "id": 1002604, + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "open_issues": 4, + "state": "open", + "title": "v1.0", + "updated_at": "2014-03-03T18:58:10Z", + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1" + }, + "node_id": "MDU6SXNzdWUx", + "number": 1347, + "pinned_comment": null, + "pull_request": { + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "state": "open", + "state_reason": "completed", + "title": "Found a bug", + "updated_at": "2011-04-22T13:33:48Z", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + }, + "node_id": "MDEwOklzc3VlRXZlbnQx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/events/1" + } + ] + }, + "issue-field-value-items": { + "value": [ + { + "data_type": "text", + "issue_field_id": 1, + "issue_field_name": "DRI", + "node_id": "IFT_GDKND", + "value": "DRI" + }, + { + "data_type": "single_select", + "issue_field_id": 2, + "issue_field_name": "Priority", + "node_id": "IFSS_SADMS", + "single_select_option": { + "color": "red", + "id": 1, + "name": "High" + }, + "value": 1 + }, + { + "data_type": "number", + "issue_field_id": 3, + "issue_field_name": "Points", + "node_id": "IFN_POINTS", + "value": 42 + }, + { + "data_type": "date", + "issue_field_id": 4, + "issue_field_name": "Due Date", + "node_id": "IFD_DUEDATE", + "value": "2025-12-25" + }, + { + "data_type": "multi_select", + "issue_field_id": 5, + "issue_field_name": "Labels", + "multi_select_options": [ + { + "color": "blue", + "id": 1, + "name": "Frontend" + }, + { + "color": "green", + "id": 2, + "name": "Backend" + } + ], + "node_id": "IFMS_LABELS", + "value": "Frontend,Backend" + } + ] + }, + "issue-items": { + "value": [ + { + "active_lock_reason": "too heated", + "assignee": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "assignees": [ + { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + ], + "author_association": "COLLABORATOR", + "body": "I'm having a problem with this.", + "closed_at": null, + "closed_by": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "comments": 0, + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "created_at": "2011-04-22T13:33:48Z", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "id": 1, + "labels": [ + { + "color": "f29513", + "default": true, + "description": "Something isn't working", + "id": 208045946, + "name": "bug", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug" + } + ], + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "locked": true, + "milestone": { + "closed_at": "2013-02-12T13:22:01Z", + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "creator": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "id": 1002604, + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "open_issues": 4, + "state": "open", + "title": "v1.0", + "updated_at": "2014-03-03T18:58:10Z", + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1" + }, + "node_id": "MDU6SXNzdWUx", + "number": 1347, + "pinned_comment": null, + "pull_request": { + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "state": "open", + "state_reason": "completed", + "title": "Found a bug", + "updated_at": "2011-04-22T13:33:48Z", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + } + ] + }, + "issue-suggestion": { + "value": { + "action": "add_label", + "actor_id": 41898282, + "confidence": "HIGH", + "created_at": "2026-06-01T14:20:00Z", + "id": 12, + "issue_event_id": 6430295168, + "issue_id": 4567, + "rationale": "This looks like a bug report based on the stack trace in the description.", + "resolved_by": 583231, + "state": "approved", + "target_id": 208045946, + "target_value": null, + "updated_at": "2026-06-01T15:05:00Z" + } + }, + "issue-suggestions": { + "value": [ + { + "action": "add_label", + "actor_id": 41898282, + "confidence": "HIGH", + "created_at": "2026-06-01T14:20:00Z", + "id": 12, + "issue_event_id": null, + "issue_id": 4567, + "rationale": "This looks like a bug report based on the stack trace in the description.", + "resolved_by": null, + "state": "pending", + "target_id": 208045946, + "target_value": null, + "updated_at": "2026-06-01T14:20:00Z" + }, + { + "action": "set_type", + "actor_id": 41898282, + "confidence": "MEDIUM", + "created_at": "2026-06-01T14:21:00Z", + "id": 13, + "issue_event_id": null, + "issue_id": 4567, + "rationale": "The report describes unexpected behaviour with reproduction steps.", + "resolved_by": null, + "state": "pending", + "target_id": 3, + "target_value": "Bug", + "updated_at": "2026-06-01T14:21:00Z" + } + ] + }, + "issue-with-pinned-comment": { + "value": { + "active_lock_reason": "too heated", + "assignee": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "assignees": [ + { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + ], + "author_association": "COLLABORATOR", + "body": "I'm having a problem with this.", + "closed_at": null, + "closed_by": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "comments": 1, + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "created_at": "2011-04-22T13:33:48Z", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "id": 1, + "labels": [ + { + "color": "f29513", + "default": true, + "description": "Something isn't working", + "id": 208045946, + "name": "bug", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug" + } + ], + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "locked": true, + "milestone": { + "closed_at": "2013-02-12T13:22:01Z", + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "creator": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "id": 1002604, + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "open_issues": 4, + "state": "open", + "title": "v1.0", + "updated_at": "2014-03-03T18:58:10Z", + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1" + }, + "node_id": "MDU6SXNzdWUx", + "number": 1347, + "pinned_comment": { + "author_association": "COLLABORATOR", + "body": "Me too", + "created_at": "2011-04-14T16:00:49Z", + "html_url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1", + "id": 1, + "issue_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "node_id": "MDEyOklzc3VlQ29tbWVudDE=", + "pin": { + "pinned_at": "2021-01-01T00:00:00Z", + "pinned_by": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + }, + "updated_at": "2011-04-14T16:00:49Z", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/comments/1", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + }, + "pull_request": { + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "state": "open", + "state_reason": "completed", + "title": "Found a bug", + "updated_at": "2011-04-22T13:33:48Z", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + }, + "x-github-breaking-changes": [ + { + "changeset": "remove_singular_assignee_from_issues_and_pull_requests", + "patch": [ + { + "op": "remove", + "path": "/value/assignee" + } + ], + "version": "2026-03-10" + } + ] + }, + "issue-with-repo-items": { + "value": [ + { + "active_lock_reason": "too heated", + "assignee": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "assignees": [ + { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + ], + "author_association": "COLLABORATOR", + "body": "I'm having a problem with this.", + "closed_at": null, + "comments": 0, + "comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments", + "created_at": "2011-04-22T13:33:48Z", + "events_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/events", + "html_url": "https://github.com/octocat/Hello-World/issues/1347", + "id": 1, + "labels": [ + { + "color": "f29513", + "default": true, + "description": "Something isn't working", + "id": 208045946, + "name": "bug", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug" + } + ], + "labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}", + "locked": true, + "milestone": { + "closed_at": "2013-02-12T13:22:01Z", + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "creator": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "id": 1002604, + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "open_issues": 4, + "state": "open", + "title": "v1.0", + "updated_at": "2014-03-03T18:58:10Z", + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1" + }, + "node_id": "MDU6SXNzdWUx", + "number": 1347, + "pinned_comment": null, + "pull_request": { + "diff_url": "https://github.com/octocat/Hello-World/pull/1347.diff", + "html_url": "https://github.com/octocat/Hello-World/pull/1347", + "patch_url": "https://github.com/octocat/Hello-World/pull/1347.patch", + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/1347" + }, + "repository": { + "allow_auto_merge": false, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_squash_merge": true, + "archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "clone_url": "https://github.com/octocat/Hello-World.git", + "collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}", + "commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors", + "created_at": "2011-01-26T19:01:12Z", + "default_branch": "master", + "delete_branch_on_merge": true, + "deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments", + "description": "This your first repo!", + "disabled": false, + "downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads", + "events_url": "https://api.github.com/repos/octocat/Hello-World/events", + "fork": false, + "forks": 1, + "forks_count": 9, + "forks_url": "https://api.github.com/repos/octocat/Hello-World/forks", + "full_name": "octocat/Hello-World", + "git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "git_url": "git:github.com/octocat/Hello-World.git", + "has_downloads": true, + "has_issues": true, + "has_pages": false, + "has_projects": true, + "has_wiki": true, + "homepage": "https://github.com", + "hooks_url": "https://api.github.com/repos/octocat/Hello-World/hooks", + "html_url": "https://github.com/octocat/Hello-World", + "id": 1296269, + "is_template": true, + "issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}", + "keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}", + "language": null, + "languages_url": "https://api.github.com/repos/octocat/Hello-World/languages", + "license": { + "html_url": "https://github.com/licenses/mit", + "key": "mit", + "name": "MIT License", + "node_id": "MDc6TGljZW5zZW1pdA==", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit" + }, + "merges_url": "https://api.github.com/repos/octocat/Hello-World/merges", + "milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "mirror_url": "git:git.example.com/octocat/Hello-World", + "name": "Hello-World", + "network_count": 0, + "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 0, + "owner": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "permissions": { + "admin": false, + "pull": true, + "push": false + }, + "private": false, + "pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "pushed_at": "2011-01-26T19:06:43Z", + "releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}", + "size": 108, + "ssh_url": "git@github.com:octocat/Hello-World.git", + "stargazers_count": 80, + "stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers", + "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "subscribers_count": 42, + "subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers", + "subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription", + "svn_url": "https://svn.github.com/octocat/Hello-World", + "tags_url": "https://api.github.com/repos/octocat/Hello-World/tags", + "teams_url": "https://api.github.com/repos/octocat/Hello-World/teams", + "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", + "topics": [ + "octocat", + "atom", + "electron", + "api" + ], + "trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "updated_at": "2011-01-26T19:14:43Z", + "url": "https://api.github.com/repos/octocat/Hello-World", + "visibility": "public", + "watchers": 1, + "watchers_count": 80 + }, + "repository_url": "https://api.github.com/repos/octocat/Hello-World", + "state": "open", + "title": "Found a bug", + "updated_at": "2011-04-22T13:33:48Z", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/1347", + "user": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + } + ] + }, + "label": { + "value": { + "color": "f29513", + "default": true, + "description": "Something isn't working", + "id": 208045946, + "name": "bug", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug" + } + }, + "label-2": { + "value": { + "color": "b01f26", + "default": true, + "description": "Small bug fix required", + "id": 208045946, + "name": "bug :bug:", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug%20:bug:" + } + }, + "label-items": { + "value": [ + { + "color": "f29513", + "default": true, + "description": "Something isn't working", + "id": 208045946, + "name": "bug", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug" + }, + { + "color": "a2eeef", + "default": false, + "description": "New feature or request", + "id": 208045947, + "name": "enhancement", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDc=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/enhancement" + } + ] + }, + "label-items-2": { + "value": [ + { + "color": "f29513", + "default": true, + "description": "Something isn't working", + "id": 208045946, + "name": "bug", + "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=", + "url": "https://api.github.com/repos/octocat/Hello-World/labels/bug" + } + ] + }, + "milestone": { + "value": { + "closed_at": "2013-02-12T13:22:01Z", + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "creator": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "id": 1002604, + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "open_issues": 4, + "state": "open", + "title": "v1.0", + "updated_at": "2014-03-03T18:58:10Z", + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1" + } + }, + "milestone-items": { + "value": [ + { + "closed_at": "2013-02-12T13:22:01Z", + "closed_issues": 8, + "created_at": "2011-04-10T20:09:31Z", + "creator": { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "description": "Tracking milestone for version 1.0", + "due_on": "2012-10-09T23:39:01Z", + "html_url": "https://github.com/octocat/Hello-World/milestones/v1.0", + "id": 1002604, + "labels_url": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "node_id": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "number": 1, + "open_issues": 4, + "state": "open", + "title": "v1.0", + "updated_at": "2014-03-03T18:58:10Z", + "url": "https://api.github.com/repos/octocat/Hello-World/milestones/1" + } + ] + }, + "rename-gist-file": { + "value": { + "comments": 0, + "comments_url": "https://api.github.com/gists/2decf6c462d9b4418f2/comments", + "commits_url": "https://api.github.com/gists/2decf6c462d9b4418f2/commits", + "created_at": "2022-09-20T12:11:58Z", + "description": "A gist description.", + "files": { + "goodbye.py": { + "content": "# Hello world", + "filename": "goodbye.py", + "language": "Python", + "raw_url": "https://gist.githubusercontent.com/monalisa/8481a81af6b7a2decf6c462d9b4418f2/raw/ac3e6daf176fafe73609fd000cd188e4472010fb/goodbye.py", + "size": 4, + "truncated": false, + "type": "application/x-python" + } + }, + "forks": [], + "forks_url": "https://api.github.com/gists/2decf6c462d9b4418f2/forks", + "git_pull_url": "https://gist.github.com/2decf6c462d9b4418f2.git", + "git_push_url": "https://gist.github.com/2decf6c462d9b4418f2.git", + "history": [ + { + "change_status": { + "additions": 0, + "deletions": 0, + "total": 0 + }, + "committed_at": "2022-09-21T10:28:06Z", + "url": "https://api.github.com/gists/8481a81af6b7a2d418f2/468aac8caed5f0c3b859b8286968", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/104456405?v=4", + "events_url": "https://api.github.com/users/monalisa/events{/privacy}", + "followers_url": "https://api.github.com/users/monalisa/followers", + "following_url": "https://api.github.com/users/monalisa/following{/other_user}", + "gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/monalisa", + "id": 104456405, + "login": "monalisa", + "node_id": "U_kgyLQ", + "organizations_url": "https://api.github.com/users/monalisa/orgs", + "received_events_url": "https://api.github.com/users/monalisa/received_events", + "repos_url": "https://api.github.com/users/monalisa/repos", + "site_admin": true, + "starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/monalisa/subscriptions", + "type": "User", + "url": "https://api.github.com/users/monalisa" + }, + "version": "468aac8caed5f0c3b859b8286968" + } + ], + "html_url": "https://gist.github.com/2decf6c462d9b4418f2", + "id": "2decf6c462d9b4418f2", + "node_id": "G_kwDOBhHyLdoAIDg0ODFZDliNDQxOGYy", + "owner": { + "avatar_url": "https://avatars.githubusercontent.com/u/104456405?v=4", + "events_url": "https://api.github.com/users/monalisa/events{/privacy}", + "followers_url": "https://api.github.com/users/monalisa/followers", + "following_url": "https://api.github.com/users/monalisa/following{/other_user}", + "gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/monalisa", + "id": 104456405, + "login": "monalisa", + "node_id": "U_kgDOBhHyLQ", + "organizations_url": "https://api.github.com/users/monalisa/orgs", + "received_events_url": "https://api.github.com/users/monalisa/received_events", + "repos_url": "https://api.github.com/users/monalisa/repos", + "site_admin": true, + "starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/monalisa/subscriptions", + "type": "User", + "url": "https://api.github.com/users/monalisa" + }, + "public": true, + "truncated": false, + "updated_at": "2022-09-21T10:28:06Z", + "url": "https://api.github.com/gists/2decf6c462d9b4418f2", + "user": null + } + }, + "simple-user-items": { + "value": [ + { + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 1, + "login": "octocat", + "node_id": "MDQ6VXNlcjE=", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + ] + }, + "timeline-issue-events": { + "value": [ + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/github", + "id": 9919, + "login": "github", + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "organizations_url": "https://api.github.com/users/github/orgs", + "received_events_url": "https://api.github.com/users/github/received_events", + "repos_url": "https://api.github.com/users/github/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "type": "Organization", + "url": "https://api.github.com/users/github" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-04-13T20:49:13Z", + "event": "locked", + "id": 6430295168, + "lock_reason": null, + "node_id": "LOE_lADODwFebM5HwC0kzwAAAAF_RoSA", + "performed_via_github_app": null, + "url": "https://api.github.com/repos/github/roadmap/issues/events/6430295168" + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/67656570?v=4", + "events_url": "https://api.github.com/users/github-product-roadmap/events{/privacy}", + "followers_url": "https://api.github.com/users/github-product-roadmap/followers", + "following_url": "https://api.github.com/users/github-product-roadmap/following{/other_user}", + "gists_url": "https://api.github.com/users/github-product-roadmap/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/github-product-roadmap", + "id": 67656570, + "login": "github-product-roadmap", + "node_id": "MDQ6VXNlcjY3NjU2NTcw", + "organizations_url": "https://api.github.com/users/github-product-roadmap/orgs", + "received_events_url": "https://api.github.com/users/github-product-roadmap/received_events", + "repos_url": "https://api.github.com/users/github-product-roadmap/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/github-product-roadmap/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-product-roadmap/subscriptions", + "type": "User", + "url": "https://api.github.com/users/github-product-roadmap" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-04-13T20:49:34Z", + "event": "labeled", + "id": 6430296748, + "label": { + "color": "99dd88", + "name": "beta" + }, + "node_id": "LE_lADODwFebM5HwC0kzwAAAAF_Roqs", + "performed_via_github_app": null, + "url": "https://api.github.com/repos/github/roadmap/issues/events/6430296748" + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/67656570?v=4", + "events_url": "https://api.github.com/users/github-product-roadmap/events{/privacy}", + "followers_url": "https://api.github.com/users/github-product-roadmap/followers", + "following_url": "https://api.github.com/users/github-product-roadmap/following{/other_user}", + "gists_url": "https://api.github.com/users/github-product-roadmap/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/github-product-roadmap", + "id": 67656570, + "login": "github-product-roadmap", + "node_id": "MDQ6VXNlcjY3NjU2NTcw", + "organizations_url": "https://api.github.com/users/github-product-roadmap/orgs", + "received_events_url": "https://api.github.com/users/github-product-roadmap/received_events", + "repos_url": "https://api.github.com/users/github-product-roadmap/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/github-product-roadmap/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-product-roadmap/subscriptions", + "type": "User", + "url": "https://api.github.com/users/github-product-roadmap" + }, + "commit_id": null, + "commit_url": null, + "created_at": "2022-05-18T19:29:01Z", + "event": "renamed", + "id": 6635165802, + "node_id": "RTE_lADODwFebM5HwC0kzwAAAAGLfJhq", + "performed_via_github_app": null, + "rename": { + "from": "Secret scanning: dry-runs for enterprise-level custom patterns (cloud)", + "to": "Secret scanning: dry-runs for enterprise-level custom patterns" + }, + "url": "https://api.github.com/repos/github/roadmap/issues/events/6635165802" + }, + { + "actor": { + "avatar_url": "https://avatars.githubusercontent.com/u/94867353?v=4", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 94867353, + "login": "octocat", + "node_id": "U_kgDOBaePmQ", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": true, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + }, + "author_association": "COLLABORATOR", + "body": "🚢 Shipped to the cloud: https://github.blog/changelog/2022-05-12-secret-scanning-dry-runs-for-enterprise-level-custom-patterns/", + "created_at": "2022-05-19T00:52:15Z", + "event": "commented", + "html_url": "https://github.com/github/roadmap/issues/493#issuecomment-1130876857", + "id": 1130876857, + "issue_url": "https://api.github.com/repos/github/roadmap/issues/493", + "node_id": "IC_kwDODwFebM5DZ8-5", + "performed_via_github_app": null, + "reactions": { + "+1": 0, + "-1": 0, + "confused": 0, + "eyes": 0, + "heart": 0, + "hooray": 0, + "laugh": 0, + "rocket": 0, + "total_count": 0, + "url": "https://api.github.com/repos/github/roadmap/issues/comments/1130876857/reactions" + }, + "updated_at": "2022-05-19T00:52:15Z", + "url": "https://api.github.com/repos/github/roadmap/issues/comments/1130876857", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/94867353?v=4", + "events_url": "https://api.github.com/users/octocat/events{/privacy}", + "followers_url": "https://api.github.com/users/octocat/followers", + "following_url": "https://api.github.com/users/octocat/following{/other_user}", + "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/octocat", + "id": 94867353, + "login": "octocat", + "node_id": "U_kgDOBaePmQ", + "organizations_url": "https://api.github.com/users/octocat/orgs", + "received_events_url": "https://api.github.com/users/octocat/received_events", + "repos_url": "https://api.github.com/users/octocat/repos", + "site_admin": true, + "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", + "type": "User", + "url": "https://api.github.com/users/octocat" + } + } + ] + } + }, + "headers": { + "link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } + }, + "parameters": { + "comment-id": { + "description": "The unique identifier of the comment.", + "in": "path", + "name": "comment_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + }, + "direction": { + "description": "The direction to sort the results by.", + "in": "query", + "name": "direction", + "required": false, + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "gist-id": { + "description": "The unique identifier of the gist.", + "in": "path", + "name": "gist_id", + "required": true, + "schema": { + "type": "string" + } + }, + "issue-field-id": { + "description": "The unique identifier of the issue field.", + "in": "path", + "name": "issue_field_id", + "required": true, + "schema": { + "type": "integer" + } + }, + "issue-number": { + "description": "The number that identifies the issue.", + "in": "path", + "name": "issue_number", + "required": true, + "schema": { + "type": "integer" + } + }, + "issue-timeline-exclude": { + "description": "A comma-separated list of timeline event names to exclude from the response.", + "in": "query", + "name": "exclude", + "schema": { + "type": "string" + } + }, + "labels": { + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "in": "query", + "name": "labels", + "required": false, + "schema": { + "type": "string" + } + }, + "milestone-number": { + "description": "The number that identifies the milestone.", + "in": "path", + "name": "milestone_number", + "required": true, + "schema": { + "type": "integer" + } + }, + "org": { + "description": "The organization name. The name is not case sensitive.", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + }, + "owner": { + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + "page": { + "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "name": "page", + "schema": { + "default": 1, + "type": "integer" + } + }, + "per-page": { + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "name": "per_page", + "schema": { + "default": 30, + "type": "integer" + } + }, + "repo": { + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + "since": { + "description": "Only show results that were last updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "in": "query", + "name": "since", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + }, + "sort": { + "description": "The property to sort the results by.", + "in": "query", + "name": "sort", + "required": false, + "schema": { + "default": "created", + "enum": [ + "created", + "updated" + ], + "type": "string" + } + }, + "username": { + "description": "The handle for the GitHub user account.", + "in": "path", + "name": "username", + "required": true, + "schema": { + "type": "string" + } + } + }, + "responses": { + "bad_request": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + }, + "application/scim+json": { + "schema": { + "$ref": "#/components/schemas/scim-error" + } + } + }, + "description": "Bad Request" + }, + "forbidden": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + }, + "description": "Forbidden" + }, + "forbidden_gist": { + "content": { + "application/json": { + "schema": { + "properties": { + "block": { + "properties": { + "created_at": { + "type": "string" + }, + "html_url": { + "nullable": true, + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "type": "object" + }, + "documentation_url": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Forbidden Gist" + }, + "gone": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + }, + "description": "Gone" + }, + "moved_permanently": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + }, + "description": "Moved permanently" + }, + "not_found": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + }, + "description": "Resource not found" + }, + "not_modified": { + "description": "Not modified" + }, + "requires_authentication": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/basic-error" + } + } + }, + "description": "Requires authentication" + }, + "service_unavailable": { + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Service unavailable" + }, + "validation_failed": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/validation-error" + } + } + }, + "description": "Validation failed, or the endpoint has been spammed." + }, + "validation_failed_simple": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/validation-error-simple" + } + } + }, + "description": "Validation failed, or the endpoint has been spammed." + } + }, + "schemas": { + "added-to-project-issue-event": { + "description": "Added to Project Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "project_card": { + "properties": { + "column_name": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "previous_column_name": { + "type": "string" + }, + "project_id": { + "type": "integer" + }, + "project_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "id", + "url", + "project_id", + "project_url", + "column_name" + ], + "type": "object" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Added to Project Issue Event", + "type": "object" + }, + "assigned-issue-event": { + "description": "Assigned Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "assignee": { + "$ref": "#/components/schemas/simple-user" + }, + "assigner": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "intent": { + "$ref": "#/components/schemas/nullable-issue-event-intent" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app", + "assignee", + "assigner" + ], + "title": "Assigned Issue Event", + "type": "object" + }, + "author-association": { + "description": "How the author is associated with the repository.", + "enum": [ + "COLLABORATOR", + "CONTRIBUTOR", + "FIRST_TIMER", + "FIRST_TIME_CONTRIBUTOR", + "MANNEQUIN", + "MEMBER", + "NONE", + "OWNER" + ], + "example": "OWNER", + "title": "author_association", + "type": "string" + }, + "base-gist": { + "description": "Base Gist", + "properties": { + "comments": { + "type": "integer" + }, + "comments_enabled": { + "type": "boolean" + }, + "comments_url": { + "format": "uri", + "type": "string" + }, + "commits_url": { + "format": "uri", + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "description": { + "nullable": true, + "type": "string" + }, + "files": { + "additionalProperties": { + "properties": { + "encoding": { + "default": "utf-8", + "description": "The encoding used for `content`. Currently, `\"utf-8\"` and `\"base64\"` are supported.", + "type": "string" + }, + "filename": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "object" + }, + "forks": { + "items": {}, + "type": "array" + }, + "forks_url": { + "format": "uri", + "type": "string" + }, + "git_pull_url": { + "format": "uri", + "type": "string" + }, + "git_push_url": { + "format": "uri", + "type": "string" + }, + "history": { + "items": {}, + "type": "array" + }, + "html_url": { + "format": "uri", + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "$ref": "#/components/schemas/simple-user" + }, + "public": { + "type": "boolean" + }, + "truncated": { + "type": "boolean" + }, + "updated_at": { + "format": "date-time", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + } + }, + "required": [ + "id", + "node_id", + "url", + "forks_url", + "commits_url", + "git_pull_url", + "git_push_url", + "html_url", + "comments_url", + "public", + "description", + "comments", + "user", + "files", + "created_at", + "updated_at" + ], + "title": "Base Gist", + "type": "object", + "x-github-breaking-changes": [ + { + "changeset": "deprecate_beta_media_type", + "patch": { + "properties": { + "user": null + }, + "required": [ + "id", + "node_id", + "url", + "forks_url", + "commits_url", + "git_pull_url", + "git_push_url", + "html_url", + "comments_url", + "public", + "description", + "comments", + "files", + "created_at", + "updated_at" + ] + }, + "version": "2026-03-10" + }, + { + "changeset": "remove_forks_history_from_base_gist", + "patch": [ + { + "op": "remove", + "path": "/properties/forks" + }, + { + "op": "remove", + "path": "/properties/history" + } + ], + "version": "2026-03-10" + } + ] + }, + "basic-error": { + "description": "Basic Error", + "properties": { + "documentation_url": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "title": "Basic Error", + "type": "object" + }, + "blocked-by-added-issue-event": { + "description": "Blocked-by Added Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "blocked_by": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "blocked_by", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Blocked-by Added Issue Event", + "type": "object" + }, + "blocked-by-removed-issue-event": { + "description": "Blocked-by Removed Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "blocked_by": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "blocked_by", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Blocked-by Removed Issue Event", + "type": "object" + }, + "blocking-added-issue-event": { + "description": "Blocking Added Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "blocking": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "blocking", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Blocking Added Issue Event", + "type": "object" + }, + "blocking-removed-issue-event": { + "description": "Blocking Removed Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "blocking": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "blocking", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Blocking Removed Issue Event", + "type": "object" + }, + "commit-comment": { + "description": "Commit Comment", + "properties": { + "author_association": { + "$ref": "#/components/schemas/author-association" + }, + "body": { + "type": "string" + }, + "commit_id": { + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "html_url": { + "format": "uri", + "type": "string" + }, + "id": { + "type": "integer" + }, + "line": { + "nullable": true, + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "path": { + "nullable": true, + "type": "string" + }, + "position": { + "nullable": true, + "type": "integer" + }, + "reactions": { + "$ref": "#/components/schemas/reaction-rollup" + }, + "updated_at": { + "format": "date-time", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + } + }, + "required": [ + "url", + "html_url", + "id", + "node_id", + "user", + "position", + "line", + "path", + "commit_id", + "body", + "author_association", + "created_at", + "updated_at" + ], + "title": "Commit Comment", + "type": "object" + }, + "converted-note-to-issue-issue-event": { + "description": "Converted Note to Issue Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/integration" + }, + "project_card": { + "properties": { + "column_name": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "previous_column_name": { + "type": "string" + }, + "project_id": { + "type": "integer" + }, + "project_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "id", + "url", + "project_id", + "project_url", + "column_name" + ], + "type": "object" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Converted Note to Issue Issue Event", + "type": "object" + }, + "demilestoned-issue-event": { + "description": "Demilestoned Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "milestone": { + "properties": { + "title": { + "type": "string" + } + }, + "required": [ + "title" + ], + "type": "object" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "milestone", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Demilestoned Issue Event", + "type": "object" + }, + "enterprise": { + "description": "An enterprise on GitHub.", + "properties": { + "avatar_url": { + "format": "uri", + "type": "string" + }, + "created_at": { + "example": "2019-01-26T19:01:12Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "description": { + "description": "A short description of the enterprise.", + "nullable": true, + "type": "string" + }, + "html_url": { + "example": "https://github.com/enterprises/octo-business", + "format": "uri", + "type": "string" + }, + "id": { + "description": "Unique identifier of the enterprise", + "example": 42, + "type": "integer" + }, + "name": { + "description": "The name of the enterprise.", + "example": "Octo Business", + "type": "string" + }, + "node_id": { + "example": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "type": "string" + }, + "slug": { + "description": "The slug url identifier for the enterprise.", + "example": "octo-business", + "type": "string" + }, + "updated_at": { + "example": "2019-01-26T19:14:43Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "website_url": { + "description": "The enterprise's website URL.", + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "name", + "slug", + "html_url", + "created_at", + "updated_at", + "avatar_url" + ], + "title": "Enterprise", + "type": "object" + }, + "gist-comment": { + "description": "A comment made to a gist.", + "properties": { + "author_association": { + "$ref": "#/components/schemas/author-association" + }, + "body": { + "description": "The comment text.", + "example": "Body of the attachment", + "maxLength": 65535, + "type": "string" + }, + "created_at": { + "example": "2011-04-18T23:23:56Z", + "format": "date-time", + "type": "string" + }, + "id": { + "example": 1, + "type": "integer" + }, + "node_id": { + "example": "MDExOkdpc3RDb21tZW50MQ==", + "type": "string" + }, + "updated_at": { + "example": "2011-04-18T23:23:56Z", + "format": "date-time", + "type": "string" + }, + "url": { + "example": "https://api.github.com/gists/a6db0bec360bb87e9418/comments/1", + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + } + }, + "required": [ + "url", + "id", + "node_id", + "user", + "body", + "author_association", + "created_at", + "updated_at" + ], + "title": "Gist Comment", + "type": "object" + }, + "gist-commit": { + "description": "Gist Commit", + "properties": { + "change_status": { + "properties": { + "additions": { + "type": "integer" + }, + "deletions": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, + "type": "object" + }, + "committed_at": { + "example": "2010-04-14T02:15:15Z", + "format": "date-time", + "type": "string" + }, + "url": { + "example": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f", + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "version": { + "example": "57a7f021a713b1c5a6a199b54cc514735d2d462f", + "type": "string" + } + }, + "required": [ + "url", + "user", + "version", + "committed_at", + "change_status" + ], + "title": "Gist Commit", + "type": "object" + }, + "gist-history": { + "description": "Gist History", + "properties": { + "change_status": { + "properties": { + "additions": { + "type": "integer" + }, + "deletions": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, + "type": "object" + }, + "committed_at": { + "format": "date-time", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "version": { + "type": "string" + } + }, + "title": "Gist History", + "type": "object" + }, + "gist-simple": { + "description": "Gist Simple", + "properties": { + "comments": { + "type": "integer" + }, + "comments_enabled": { + "type": "boolean" + }, + "comments_url": { + "type": "string" + }, + "commits_url": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "description": { + "nullable": true, + "type": "string" + }, + "files": { + "additionalProperties": { + "nullable": true, + "properties": { + "content": { + "type": "string" + }, + "encoding": { + "default": "utf-8", + "description": "The encoding used for `content`. Currently, `\"utf-8\"` and `\"base64\"` are supported.", + "type": "string" + }, + "filename": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "truncated": { + "type": "boolean" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "object" + }, + "fork_of": { + "description": "Gist", + "nullable": true, + "properties": { + "comments": { + "type": "integer" + }, + "comments_enabled": { + "type": "boolean" + }, + "comments_url": { + "format": "uri", + "type": "string" + }, + "commits_url": { + "format": "uri", + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "description": { + "nullable": true, + "type": "string" + }, + "files": { + "additionalProperties": { + "properties": { + "filename": { + "type": "string" + }, + "language": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "object" + }, + "forks": { + "items": {}, + "type": "array" + }, + "forks_url": { + "format": "uri", + "type": "string" + }, + "git_pull_url": { + "format": "uri", + "type": "string" + }, + "git_push_url": { + "format": "uri", + "type": "string" + }, + "history": { + "items": {}, + "type": "array" + }, + "html_url": { + "format": "uri", + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "public": { + "type": "boolean" + }, + "truncated": { + "type": "boolean" + }, + "updated_at": { + "format": "date-time", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + } + }, + "required": [ + "id", + "node_id", + "url", + "forks_url", + "commits_url", + "git_pull_url", + "git_push_url", + "html_url", + "comments_url", + "public", + "description", + "comments", + "user", + "files", + "created_at", + "updated_at" + ], + "title": "Gist", + "type": "object" + }, + "forks": { + "deprecated": true, + "items": { + "properties": { + "created_at": { + "format": "date-time", + "type": "string" + }, + "id": { + "type": "string" + }, + "updated_at": { + "format": "date-time", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/public-user" + } + }, + "type": "object" + }, + "nullable": true, + "type": "array" + }, + "forks_url": { + "type": "string" + }, + "git_pull_url": { + "type": "string" + }, + "git_push_url": { + "type": "string" + }, + "history": { + "deprecated": true, + "items": { + "$ref": "#/components/schemas/gist-history" + }, + "nullable": true, + "type": "array" + }, + "html_url": { + "type": "string" + }, + "id": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "owner": { + "$ref": "#/components/schemas/simple-user" + }, + "public": { + "type": "boolean" + }, + "truncated": { + "type": "boolean" + }, + "updated_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "user": { + "nullable": true, + "type": "string" + } + }, + "title": "Gist Simple", + "type": "object", + "x-github-breaking-changes": [ + { + "changeset": "remove_forks_history_from_base_gist", + "patch": [ + { + "op": "remove", + "path": "/properties/forks" + }, + { + "op": "remove", + "path": "/properties/history" + } + ], + "version": "2026-03-10" + } + ] + }, + "integration": { + "description": "GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.", + "nullable": true, + "properties": { + "client_id": { + "example": "\"Iv1.25b5d1e65ffc4022\"", + "type": "string" + }, + "created_at": { + "example": "2017-07-08T16:18:44-04:00", + "format": "date-time", + "type": "string" + }, + "description": { + "example": "The description of the app.", + "nullable": true, + "type": "string" + }, + "events": { + "description": "The list of events for the GitHub app. Note that the `installation_target`, `security_advisory`, and `meta` events are not included because they are global events and not specific to an installation.", + "example": [ + "label", + "deployment" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "external_url": { + "example": "https://example.com", + "format": "uri", + "type": "string" + }, + "html_url": { + "example": "https://github.com/apps/super-ci", + "format": "uri", + "type": "string" + }, + "id": { + "description": "Unique identifier of the GitHub app", + "example": 37, + "type": "integer" + }, + "installations_count": { + "description": "The number of installations associated with the GitHub app. Only returned when the integration is requesting details about itself.", + "example": 5, + "type": "integer" + }, + "name": { + "description": "The name of the GitHub app", + "example": "Probot Owners", + "type": "string" + }, + "node_id": { + "example": "MDExOkludGVncmF0aW9uMQ==", + "type": "string" + }, + "owner": { + "oneOf": [ + { + "$ref": "#/components/schemas/simple-user" + }, + { + "$ref": "#/components/schemas/enterprise" + } + ] + }, + "permissions": { + "additionalProperties": { + "type": "string" + }, + "description": "The set of permissions for the GitHub app", + "example": { + "deployments": "write", + "issues": "read" + }, + "properties": { + "checks": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "deployments": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "metadata": { + "type": "string" + } + }, + "type": "object" + }, + "slug": { + "description": "The slug name of the GitHub app", + "example": "probot-owners", + "type": "string" + }, + "updated_at": { + "example": "2017-07-08T16:18:44-04:00", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "owner", + "name", + "description", + "external_url", + "html_url", + "created_at", + "updated_at", + "permissions", + "events" + ], + "title": "GitHub app", + "type": "object" + }, + "issue": { + "description": "Issues are a great way to keep track of tasks, enhancements, and bugs for your projects.", + "properties": { + "active_lock_reason": { + "nullable": true, + "type": "string" + }, + "assignee": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "assignees": { + "items": { + "$ref": "#/components/schemas/simple-user" + }, + "type": "array" + }, + "author_association": { + "$ref": "#/components/schemas/author-association" + }, + "body": { + "description": "Contents of the issue", + "example": "It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug?", + "nullable": true, + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_text": { + "type": "string" + }, + "closed_at": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "closed_by": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "comments": { + "type": "integer" + }, + "comments_url": { + "format": "uri", + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "events_url": { + "format": "uri", + "type": "string" + }, + "html_url": { + "format": "uri", + "type": "string" + }, + "id": { + "format": "int64", + "type": "integer" + }, + "issue_dependencies_summary": { + "$ref": "#/components/schemas/issue-dependencies-summary" + }, + "issue_field_values": { + "items": { + "$ref": "#/components/schemas/issue-field-value" + }, + "type": "array" + }, + "labels": { + "description": "Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository", + "example": [ + "bug", + "registration" + ], + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "properties": { + "color": { + "nullable": true, + "type": "string" + }, + "default": { + "type": "boolean" + }, + "description": { + "nullable": true, + "type": "string" + }, + "id": { + "format": "int64", + "type": "integer" + }, + "name": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + ] + }, + "type": "array" + }, + "labels_url": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "milestone": { + "$ref": "#/components/schemas/nullable-milestone" + }, + "node_id": { + "type": "string" + }, + "number": { + "description": "Number uniquely identifying the issue within its repository", + "example": 42, + "type": "integer" + }, + "parent_issue_url": { + "description": "URL to get the parent issue of this issue, if it is a sub-issue", + "format": "uri", + "nullable": true, + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "pinned_comment": { + "$ref": "#/components/schemas/nullable-issue-comment" + }, + "pull_request": { + "properties": { + "diff_url": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "html_url": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "merged_at": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "patch_url": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "url": { + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "required": [ + "diff_url", + "html_url", + "patch_url", + "url" + ], + "type": "object" + }, + "reactions": { + "$ref": "#/components/schemas/reaction-rollup" + }, + "repository": { + "$ref": "#/components/schemas/repository" + }, + "repository_url": { + "format": "uri", + "type": "string" + }, + "state": { + "description": "State of the issue; either 'open' or 'closed'", + "example": "open", + "type": "string" + }, + "state_reason": { + "description": "The reason for the current state", + "enum": [ + "completed", + "reopened", + "not_planned", + "duplicate" + ], + "example": "not_planned", + "nullable": true, + "type": "string" + }, + "sub_issues_summary": { + "$ref": "#/components/schemas/sub-issues-summary" + }, + "timeline_url": { + "format": "uri", + "type": "string" + }, + "title": { + "description": "Title of the issue", + "example": "Widget creation fails in Safari on OS X 10.8", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/issue-type" + }, + "updated_at": { + "format": "date-time", + "type": "string" + }, + "url": { + "description": "URL for the issue", + "example": "https://api.github.com/repositories/42/issues/1", + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + } + }, + "required": [ + "assignee", + "closed_at", + "comments", + "comments_url", + "events_url", + "html_url", + "id", + "node_id", + "labels", + "labels_url", + "milestone", + "number", + "repository_url", + "state", + "locked", + "title", + "url", + "user", + "created_at", + "updated_at" + ], + "title": "Issue", + "type": "object", + "x-github-breaking-changes": [ + { + "changeset": "deprecate_beta_media_type", + "patch": { + "properties": { + "pull_request": { + "properties": { + "diff_url": { + "nullable": false + }, + "html_url": { + "nullable": false + }, + "merged_at": { + "nullable": false + }, + "patch_url": { + "nullable": false + }, + "url": { + "nullable": false + } + }, + "type": "object" + } + } + }, + "version": "2026-03-10" + }, + { + "changeset": "remove_singular_assignee_from_issues_and_pull_requests", + "patch": { + "properties": { + "assignee": null + }, + "required": [ + "closed_at", + "comments", + "comments_url", + "events_url", + "html_url", + "id", + "node_id", + "labels", + "labels_url", + "milestone", + "number", + "repository_url", + "state", + "locked", + "title", + "url", + "user", + "created_at", + "updated_at" + ] + }, + "version": "2026-03-10" + } + ] + }, + "issue-comment": { + "description": "Comments provide a way for people to collaborate on an issue.", + "properties": { + "author_association": { + "$ref": "#/components/schemas/author-association" + }, + "body": { + "description": "Contents of the issue comment", + "example": "What version of Safari were you using when you observed this bug?", + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_text": { + "type": "string" + }, + "created_at": { + "example": "2011-04-14T16:00:49Z", + "format": "date-time", + "type": "string" + }, + "html_url": { + "format": "uri", + "type": "string" + }, + "id": { + "description": "Unique identifier of the issue comment", + "example": 42, + "format": "int64", + "type": "integer" + }, + "issue_url": { + "format": "uri", + "type": "string" + }, + "minimized": { + "$ref": "#/components/schemas/nullable-issue-comment-minimized" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "pin": { + "$ref": "#/components/schemas/nullable-pinned-issue-comment" + }, + "reactions": { + "$ref": "#/components/schemas/reaction-rollup" + }, + "updated_at": { + "example": "2011-04-14T16:00:49Z", + "format": "date-time", + "type": "string" + }, + "url": { + "description": "URL for the issue comment", + "example": "https://api.github.com/repositories/42/issues/comments/1", + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + } + }, + "required": [ + "id", + "node_id", + "html_url", + "issue_url", + "user", + "url", + "created_at", + "updated_at" + ], + "title": "Issue Comment", + "type": "object" + }, + "issue-dependencies-summary": { + "properties": { + "blocked_by": { + "type": "integer" + }, + "blocking": { + "type": "integer" + }, + "total_blocked_by": { + "type": "integer" + }, + "total_blocking": { + "type": "integer" + } + }, + "required": [ + "blocked_by", + "blocking", + "total_blocked_by", + "total_blocking" + ], + "title": "Issue Dependencies Summary", + "type": "object" + }, + "issue-event": { + "description": "Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "assignee": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "assigner": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "author_association": { + "$ref": "#/components/schemas/author-association" + }, + "blocked_by": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "blocking": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "commit_id": { + "example": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "nullable": true, + "type": "string" + }, + "commit_url": { + "example": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "nullable": true, + "type": "string" + }, + "created_at": { + "example": "2011-04-14T16:00:49Z", + "format": "date-time", + "type": "string" + }, + "dismissed_review": { + "$ref": "#/components/schemas/issue-event-dismissed-review" + }, + "event": { + "example": "closed", + "type": "string" + }, + "id": { + "example": 1, + "format": "int64", + "type": "integer" + }, + "intent": { + "$ref": "#/components/schemas/nullable-issue-event-intent" + }, + "issue": { + "$ref": "#/components/schemas/nullable-issue" + }, + "issue_type": { + "$ref": "#/components/schemas/issue-type-webhook" + }, + "label": { + "$ref": "#/components/schemas/issue-event-label" + }, + "lock_reason": { + "nullable": true, + "type": "string" + }, + "milestone": { + "$ref": "#/components/schemas/issue-event-milestone" + }, + "node_id": { + "example": "MDEwOklzc3VlRXZlbnQx", + "type": "string" + }, + "parent_issue": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "prev_issue_type": { + "$ref": "#/components/schemas/issue-type-webhook" + }, + "project_card": { + "$ref": "#/components/schemas/issue-event-project-card" + }, + "rename": { + "$ref": "#/components/schemas/issue-event-rename" + }, + "requested_reviewer": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "requested_team": { + "$ref": "#/components/schemas/team" + }, + "review_requester": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "sub_issue": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "url": { + "example": "https://api.github.com/repos/octocat/Hello-World/issues/events/1", + "format": "uri", + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at" + ], + "title": "Issue Event", + "type": "object" + }, + "issue-event-dismissed-review": { + "properties": { + "dismissal_commit_id": { + "nullable": true, + "type": "string" + }, + "dismissal_message": { + "nullable": true, + "type": "string" + }, + "review_id": { + "type": "integer" + }, + "state": { + "type": "string" + } + }, + "required": [ + "state", + "review_id", + "dismissal_message" + ], + "title": "Issue Event Dismissed Review", + "type": "object" + }, + "issue-event-for-issue": { + "anyOf": [ + { + "$ref": "#/components/schemas/labeled-issue-event" + }, + { + "$ref": "#/components/schemas/unlabeled-issue-event" + }, + { + "$ref": "#/components/schemas/assigned-issue-event" + }, + { + "$ref": "#/components/schemas/unassigned-issue-event" + }, + { + "$ref": "#/components/schemas/milestoned-issue-event" + }, + { + "$ref": "#/components/schemas/demilestoned-issue-event" + }, + { + "$ref": "#/components/schemas/renamed-issue-event" + }, + { + "$ref": "#/components/schemas/review-requested-issue-event" + }, + { + "$ref": "#/components/schemas/review-request-removed-issue-event" + }, + { + "$ref": "#/components/schemas/review-dismissed-issue-event" + }, + { + "$ref": "#/components/schemas/locked-issue-event" + }, + { + "$ref": "#/components/schemas/added-to-project-issue-event" + }, + { + "$ref": "#/components/schemas/moved-column-in-project-issue-event" + }, + { + "$ref": "#/components/schemas/removed-from-project-issue-event" + }, + { + "$ref": "#/components/schemas/converted-note-to-issue-issue-event" + }, + { + "$ref": "#/components/schemas/issue-type-added-issue-event" + }, + { + "$ref": "#/components/schemas/issue-type-removed-issue-event" + }, + { + "$ref": "#/components/schemas/issue-type-changed-issue-event" + }, + { + "$ref": "#/components/schemas/sub-issue-added-issue-event" + }, + { + "$ref": "#/components/schemas/sub-issue-removed-issue-event" + }, + { + "$ref": "#/components/schemas/parent-issue-added-issue-event" + }, + { + "$ref": "#/components/schemas/parent-issue-removed-issue-event" + }, + { + "$ref": "#/components/schemas/blocked-by-added-issue-event" + }, + { + "$ref": "#/components/schemas/blocked-by-removed-issue-event" + }, + { + "$ref": "#/components/schemas/blocking-added-issue-event" + }, + { + "$ref": "#/components/schemas/blocking-removed-issue-event" + } + ], + "description": "Issue Event for Issue", + "title": "Issue Event for Issue" + }, + "issue-event-label": { + "description": "Issue Event Label", + "properties": { + "color": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "name", + "color" + ], + "title": "Issue Event Label", + "type": "object" + }, + "issue-event-milestone": { + "description": "Issue Event Milestone", + "properties": { + "title": { + "type": "string" + } + }, + "required": [ + "title" + ], + "title": "Issue Event Milestone", + "type": "object" + }, + "issue-event-project-card": { + "description": "Issue Event Project Card", + "properties": { + "column_name": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "previous_column_name": { + "type": "string" + }, + "project_id": { + "type": "integer" + }, + "project_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "url", + "id", + "project_url", + "project_id", + "column_name" + ], + "title": "Issue Event Project Card", + "type": "object" + }, + "issue-event-rename": { + "description": "Issue Event Rename", + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + }, + "required": [ + "from", + "to" + ], + "title": "Issue Event Rename", + "type": "object" + }, + "issue-field-value": { + "description": "A value assigned to an issue field", + "properties": { + "data_type": { + "description": "The data type of the issue field", + "enum": [ + "text", + "single_select", + "multi_select", + "number", + "date" + ], + "example": "text", + "type": "string" + }, + "issue_field_id": { + "description": "Unique identifier for the issue field.", + "example": 1, + "format": "int64", + "type": "integer" + }, + "issue_field_name": { + "description": "The human-readable name of the issue field.", + "example": "Priority", + "type": "string" + }, + "multi_select_options": { + "description": "Details about the selected options", + "items": { + "properties": { + "color": { + "description": "The color of the option", + "example": "red", + "type": "string" + }, + "id": { + "description": "Unique identifier for the option.", + "example": 1, + "format": "int64", + "type": "integer" + }, + "name": { + "description": "The name of the option", + "example": "High", + "type": "string" + } + }, + "required": [ + "id", + "name", + "color" + ], + "type": "object" + }, + "nullable": true, + "type": "array" + }, + "node_id": { + "example": "IFT_GDKND", + "type": "string" + }, + "single_select_option": { + "description": "Details about the selected option (only present for single_select fields)", + "nullable": true, + "properties": { + "color": { + "description": "The color of the option", + "example": "red", + "type": "string" + }, + "id": { + "description": "Unique identifier for the option.", + "example": 1, + "format": "int64", + "type": "integer" + }, + "name": { + "description": "The name of the option", + "example": "High", + "type": "string" + } + }, + "required": [ + "id", + "name", + "color" + ], + "type": "object" + }, + "value": { + "anyOf": [ + { + "example": "Sample text", + "type": "string" + }, + { + "example": 42.5, + "type": "number" + }, + { + "example": 1, + "type": "integer" + } + ], + "description": "The value of the issue field", + "nullable": true + } + }, + "required": [ + "issue_field_id", + "node_id", + "data_type", + "value" + ], + "title": "Issue Field Value", + "type": "object" + }, + "issue-suggestion": { + "description": "An agent-proposed change to an issue that a maintainer can approve or dismiss.", + "properties": { + "action": { + "description": "The kind of change proposed.", + "enum": [ + "set_type", + "add_label", + "add_field", + "add_assignee", + "close_issue" + ], + "type": "string" + }, + "actor_id": { + "description": "The unique identifier of the actor that proposed the suggestion.", + "nullable": true, + "type": "integer" + }, + "confidence": { + "description": "The actor's confidence level in the suggestion.", + "enum": [ + "LOW", + "MEDIUM", + "HIGH" + ], + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time the suggestion was created.", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "The unique identifier of the suggestion.", + "type": "integer" + }, + "issue_event_id": { + "description": "The identifier of the timeline event created when the suggestion was approved, when applicable.", + "nullable": true, + "type": "integer" + }, + "issue_id": { + "description": "The unique identifier of the issue the suggestion applies to.", + "type": "integer" + }, + "rationale": { + "description": "The rationale the actor provided for the suggestion.", + "nullable": true, + "type": "string" + }, + "resolved_by": { + "description": "The unique identifier of the user who approved or dismissed the suggestion.", + "nullable": true, + "type": "integer" + }, + "state": { + "description": "The suggestion's lifecycle state.", + "enum": [ + "pending", + "applied", + "approved", + "dismissed", + "replaced", + "invalidated" + ], + "type": "string" + }, + "target_id": { + "description": "The identifier of the target the change applies to (issue type, label, field, assignee, or duplicate issue), when applicable.", + "nullable": true, + "type": "integer" + }, + "target_value": { + "description": "The proposed value, when applicable. An array for multi-select field suggestions.", + "nullable": true, + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "items": { + "type": "string" + }, + "type": "array" + } + ] + }, + "updated_at": { + "description": "The time the suggestion was last updated.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id", + "issue_id", + "action", + "state", + "target_id", + "target_value", + "rationale", + "confidence", + "actor_id", + "issue_event_id", + "resolved_by", + "created_at", + "updated_at" + ], + "title": "Issue Suggestion", + "type": "object" + }, + "issue-type": { + "description": "The type assigned to the issue. This is only present for issues in repositories where issue types are supported.", + "nullable": true, + "properties": { + "color": { + "description": "The color of the issue type.", + "enum": [ + "gray", + "blue", + "green", + "yellow", + "orange", + "red", + "pink", + "purple" + ], + "nullable": true, + "type": "string" + }, + "created_at": { + "description": "The time the issue type created.", + "format": "date-time", + "type": "string" + }, + "description": { + "description": "The description of the issue type.", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The unique identifier of the issue type.", + "type": "integer" + }, + "is_enabled": { + "description": "The enabled state of the issue type.", + "type": "boolean" + }, + "name": { + "description": "The name of the issue type.", + "type": "string" + }, + "node_id": { + "description": "The node identifier of the issue type.", + "type": "string" + }, + "updated_at": { + "description": "The time the issue type last updated.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "name", + "description" + ], + "title": "Issue Type", + "type": "object" + }, + "issue-type-added-issue-event": { + "description": "Issue Type Added Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "intent": { + "$ref": "#/components/schemas/nullable-issue-event-intent" + }, + "issue_type": { + "$ref": "#/components/schemas/issue-type-webhook" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "issue_type", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Issue Type Added Issue Event", + "type": "object" + }, + "issue-type-changed-issue-event": { + "description": "Issue Type Changed Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "intent": { + "$ref": "#/components/schemas/nullable-issue-event-intent" + }, + "issue_type": { + "$ref": "#/components/schemas/issue-type-webhook" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "prev_issue_type": { + "$ref": "#/components/schemas/issue-type-webhook" + }, + "url": { + "type": "string" + } + }, + "required": [ + "issue_type", + "prev_issue_type", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Issue Type Changed Issue Event", + "type": "object" + }, + "issue-type-removed-issue-event": { + "description": "Issue Type Removed Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "intent": { + "$ref": "#/components/schemas/nullable-issue-event-intent" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "prev_issue_type": { + "$ref": "#/components/schemas/issue-type-webhook" + }, + "url": { + "type": "string" + } + }, + "required": [ + "prev_issue_type", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Issue Type Removed Issue Event", + "type": "object" + }, + "issue-type-webhook": { + "description": "The type of issue.", + "nullable": true, + "properties": { + "color": { + "description": "The color of the issue type.", + "enum": [ + "gray", + "blue", + "green", + "yellow", + "orange", + "red", + "pink", + "purple" + ], + "nullable": true, + "type": "string" + }, + "id": { + "description": "The unique identifier of the issue type.", + "type": "integer" + }, + "name": { + "description": "The name of the issue type.", + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "title": "Issue Type", + "type": "object" + }, + "label": { + "description": "Color-coded labels help you categorize and filter your issues (just like labels in Gmail).", + "properties": { + "color": { + "description": "6-character hex code, without the leading #, identifying the color", + "example": "FFFFFF", + "type": "string" + }, + "default": { + "description": "Whether this label comes by default in a new repository.", + "example": true, + "type": "boolean" + }, + "description": { + "description": "Optional description of the label, such as its purpose.", + "example": "Something isn't working", + "nullable": true, + "type": "string" + }, + "id": { + "description": "Unique identifier for the label.", + "example": 208045946, + "format": "int64", + "type": "integer" + }, + "name": { + "description": "The name of the label.", + "example": "bug", + "type": "string" + }, + "node_id": { + "example": "MDU6TGFiZWwyMDgwNDU5NDY=", + "type": "string" + }, + "url": { + "description": "URL for the label", + "example": "https://api.github.com/repositories/42/labels/bug", + "format": "uri", + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "name", + "description", + "color", + "default" + ], + "title": "Label", + "type": "object" + }, + "labeled-issue-event": { + "description": "Labeled Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "intent": { + "$ref": "#/components/schemas/nullable-issue-event-intent" + }, + "label": { + "properties": { + "color": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name", + "color" + ], + "type": "object" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "label", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Labeled Issue Event", + "type": "object" + }, + "locked-issue-event": { + "description": "Locked Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "lock_reason": { + "example": "\"off-topic\"", + "nullable": true, + "type": "string" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "lock_reason", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Locked Issue Event", + "type": "object" + }, + "milestone": { + "description": "A collection of related issues and pull requests.", + "properties": { + "closed_at": { + "example": "2013-02-12T13:22:01Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "closed_issues": { + "example": 8, + "type": "integer" + }, + "created_at": { + "example": "2011-04-10T20:09:31Z", + "format": "date-time", + "type": "string" + }, + "creator": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "description": { + "example": "Tracking milestone for version 1.0", + "nullable": true, + "type": "string" + }, + "due_on": { + "example": "2012-10-09T23:39:01Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "html_url": { + "example": "https://github.com/octocat/Hello-World/milestones/v1.0", + "format": "uri", + "type": "string" + }, + "id": { + "example": 1002604, + "type": "integer" + }, + "labels_url": { + "example": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "format": "uri", + "type": "string" + }, + "node_id": { + "example": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "type": "string" + }, + "number": { + "description": "The number of the milestone.", + "example": 42, + "type": "integer" + }, + "open_issues": { + "example": 4, + "type": "integer" + }, + "state": { + "default": "open", + "description": "The state of the milestone.", + "enum": [ + "open", + "closed" + ], + "example": "open", + "type": "string" + }, + "title": { + "description": "The title of the milestone.", + "example": "v1.0", + "type": "string" + }, + "updated_at": { + "example": "2014-03-03T18:58:10Z", + "format": "date-time", + "type": "string" + }, + "url": { + "example": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "format": "uri", + "type": "string" + } + }, + "required": [ + "closed_issues", + "creator", + "description", + "due_on", + "closed_at", + "id", + "node_id", + "labels_url", + "html_url", + "number", + "open_issues", + "state", + "title", + "url", + "created_at", + "updated_at" + ], + "title": "Milestone", + "type": "object" + }, + "milestoned-issue-event": { + "description": "Milestoned Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "milestone": { + "properties": { + "title": { + "type": "string" + } + }, + "required": [ + "title" + ], + "type": "object" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "milestone", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Milestoned Issue Event", + "type": "object" + }, + "moved-column-in-project-issue-event": { + "description": "Moved Column in Project Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "project_card": { + "properties": { + "column_name": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "previous_column_name": { + "type": "string" + }, + "project_id": { + "type": "integer" + }, + "project_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "id", + "url", + "project_id", + "project_url", + "column_name" + ], + "type": "object" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Moved Column in Project Issue Event", + "type": "object" + }, + "nullable-integration": { + "description": "GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.", + "nullable": true, + "properties": { + "client_id": { + "example": "\"Iv1.25b5d1e65ffc4022\"", + "type": "string" + }, + "created_at": { + "example": "2017-07-08T16:18:44-04:00", + "format": "date-time", + "type": "string" + }, + "description": { + "example": "The description of the app.", + "nullable": true, + "type": "string" + }, + "events": { + "description": "The list of events for the GitHub app. Note that the `installation_target`, `security_advisory`, and `meta` events are not included because they are global events and not specific to an installation.", + "example": [ + "label", + "deployment" + ], + "items": { + "type": "string" + }, + "type": "array" + }, + "external_url": { + "example": "https://example.com", + "format": "uri", + "type": "string" + }, + "html_url": { + "example": "https://github.com/apps/super-ci", + "format": "uri", + "type": "string" + }, + "id": { + "description": "Unique identifier of the GitHub app", + "example": 37, + "type": "integer" + }, + "installations_count": { + "description": "The number of installations associated with the GitHub app. Only returned when the integration is requesting details about itself.", + "example": 5, + "type": "integer" + }, + "name": { + "description": "The name of the GitHub app", + "example": "Probot Owners", + "type": "string" + }, + "node_id": { + "example": "MDExOkludGVncmF0aW9uMQ==", + "type": "string" + }, + "owner": { + "oneOf": [ + { + "$ref": "#/components/schemas/simple-user" + }, + { + "$ref": "#/components/schemas/enterprise" + } + ] + }, + "permissions": { + "additionalProperties": { + "type": "string" + }, + "description": "The set of permissions for the GitHub app", + "example": { + "deployments": "write", + "issues": "read" + }, + "properties": { + "checks": { + "type": "string" + }, + "contents": { + "type": "string" + }, + "deployments": { + "type": "string" + }, + "issues": { + "type": "string" + }, + "metadata": { + "type": "string" + } + }, + "type": "object" + }, + "slug": { + "description": "The slug name of the GitHub app", + "example": "probot-owners", + "type": "string" + }, + "updated_at": { + "example": "2017-07-08T16:18:44-04:00", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "owner", + "name", + "description", + "external_url", + "html_url", + "created_at", + "updated_at", + "permissions", + "events" + ], + "title": "GitHub app", + "type": "object" + }, + "nullable-issue": { + "description": "Issues are a great way to keep track of tasks, enhancements, and bugs for your projects.", + "nullable": true, + "properties": { + "active_lock_reason": { + "nullable": true, + "type": "string" + }, + "assignee": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "assignees": { + "items": { + "$ref": "#/components/schemas/simple-user" + }, + "type": "array" + }, + "author_association": { + "$ref": "#/components/schemas/author-association" + }, + "body": { + "description": "Contents of the issue", + "example": "It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug?", + "nullable": true, + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_text": { + "type": "string" + }, + "closed_at": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "closed_by": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "comments": { + "type": "integer" + }, + "comments_url": { + "format": "uri", + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "draft": { + "type": "boolean" + }, + "events_url": { + "format": "uri", + "type": "string" + }, + "html_url": { + "format": "uri", + "type": "string" + }, + "id": { + "format": "int64", + "type": "integer" + }, + "issue_dependencies_summary": { + "$ref": "#/components/schemas/issue-dependencies-summary" + }, + "issue_field_values": { + "items": { + "$ref": "#/components/schemas/issue-field-value" + }, + "type": "array" + }, + "labels": { + "description": "Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository", + "example": [ + "bug", + "registration" + ], + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "properties": { + "color": { + "nullable": true, + "type": "string" + }, + "default": { + "type": "boolean" + }, + "description": { + "nullable": true, + "type": "string" + }, + "id": { + "format": "int64", + "type": "integer" + }, + "name": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + } + ] + }, + "type": "array" + }, + "labels_url": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "milestone": { + "$ref": "#/components/schemas/nullable-milestone" + }, + "node_id": { + "type": "string" + }, + "number": { + "description": "Number uniquely identifying the issue within its repository", + "example": 42, + "type": "integer" + }, + "parent_issue_url": { + "description": "URL to get the parent issue of this issue, if it is a sub-issue", + "format": "uri", + "nullable": true, + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "pinned_comment": { + "$ref": "#/components/schemas/nullable-issue-comment" + }, + "pull_request": { + "properties": { + "diff_url": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "html_url": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "merged_at": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "patch_url": { + "format": "uri", + "nullable": true, + "type": "string" + }, + "url": { + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "required": [ + "diff_url", + "html_url", + "patch_url", + "url" + ], + "type": "object" + }, + "reactions": { + "$ref": "#/components/schemas/reaction-rollup" + }, + "repository": { + "$ref": "#/components/schemas/repository" + }, + "repository_url": { + "format": "uri", + "type": "string" + }, + "state": { + "description": "State of the issue; either 'open' or 'closed'", + "example": "open", + "type": "string" + }, + "state_reason": { + "description": "The reason for the current state", + "enum": [ + "completed", + "reopened", + "not_planned", + "duplicate" + ], + "example": "not_planned", + "nullable": true, + "type": "string" + }, + "sub_issues_summary": { + "$ref": "#/components/schemas/sub-issues-summary" + }, + "timeline_url": { + "format": "uri", + "type": "string" + }, + "title": { + "description": "Title of the issue", + "example": "Widget creation fails in Safari on OS X 10.8", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/issue-type" + }, + "updated_at": { + "format": "date-time", + "type": "string" + }, + "url": { + "description": "URL for the issue", + "example": "https://api.github.com/repositories/42/issues/1", + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + } + }, + "required": [ + "assignee", + "closed_at", + "comments", + "comments_url", + "events_url", + "html_url", + "id", + "node_id", + "labels", + "labels_url", + "milestone", + "number", + "repository_url", + "state", + "locked", + "title", + "url", + "user", + "created_at", + "updated_at" + ], + "title": "Issue", + "type": "object", + "x-github-breaking-changes": [ + { + "changeset": "deprecate_beta_media_type", + "patch": { + "properties": { + "pull_request": { + "properties": { + "diff_url": { + "nullable": false + }, + "html_url": { + "nullable": false + }, + "merged_at": { + "nullable": false + }, + "patch_url": { + "nullable": false + }, + "url": { + "nullable": false + } + }, + "type": "object" + } + } + }, + "version": "2026-03-10" + }, + { + "changeset": "remove_singular_assignee_from_issues_and_pull_requests", + "patch": { + "properties": { + "assignee": null + }, + "required": [ + "closed_at", + "comments", + "comments_url", + "events_url", + "html_url", + "id", + "node_id", + "labels", + "labels_url", + "milestone", + "number", + "repository_url", + "state", + "locked", + "title", + "url", + "user", + "created_at", + "updated_at" + ] + }, + "version": "2026-03-10" + } + ] + }, + "nullable-issue-comment": { + "description": "Comments provide a way for people to collaborate on an issue.", + "nullable": true, + "properties": { + "author_association": { + "$ref": "#/components/schemas/author-association" + }, + "body": { + "description": "Contents of the issue comment", + "example": "What version of Safari were you using when you observed this bug?", + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_text": { + "type": "string" + }, + "created_at": { + "example": "2011-04-14T16:00:49Z", + "format": "date-time", + "type": "string" + }, + "html_url": { + "format": "uri", + "type": "string" + }, + "id": { + "description": "Unique identifier of the issue comment", + "example": 42, + "format": "int64", + "type": "integer" + }, + "issue_url": { + "format": "uri", + "type": "string" + }, + "minimized": { + "$ref": "#/components/schemas/nullable-issue-comment-minimized" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "pin": { + "$ref": "#/components/schemas/nullable-pinned-issue-comment" + }, + "reactions": { + "$ref": "#/components/schemas/reaction-rollup" + }, + "updated_at": { + "example": "2011-04-14T16:00:49Z", + "format": "date-time", + "type": "string" + }, + "url": { + "description": "URL for the issue comment", + "example": "https://api.github.com/repositories/42/issues/comments/1", + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + } + }, + "required": [ + "id", + "node_id", + "html_url", + "issue_url", + "user", + "url", + "created_at", + "updated_at" + ], + "title": "Issue Comment", + "type": "object" + }, + "nullable-issue-comment-minimized": { + "description": "Details about why an issue comment was minimized.", + "nullable": true, + "properties": { + "reason": { + "description": "The reason the comment was minimized.", + "example": "low-quality", + "nullable": true, + "type": "string" + } + }, + "required": [ + "reason" + ], + "title": "Minimized Issue Comment", + "type": "object" + }, + "nullable-issue-event-intent": { + "description": "The intent behind an agent's action on an issue, including the rationale and confidence. Present (and `null` when the event carried no agent intent) on supported event types while the issue suggestions feature is enabled for the repository; the property is omitted entirely when the feature is disabled or the event type does not support intent.", + "nullable": true, + "properties": { + "confidence": { + "description": "The confidence level the agent had when performing this action.", + "enum": [ + "LOW", + "MEDIUM", + "HIGH" + ], + "nullable": true, + "type": "string" + }, + "rationale": { + "description": "The reasoning the agent provided for the change.", + "nullable": true, + "type": "string" + } + }, + "title": "Issue Event Intent", + "type": "object" + }, + "nullable-issue-reference": { + "description": "A minimal reference to an issue linked from a timeline event (e.g. sub-issue, parent-issue, or dependency events).", + "nullable": true, + "properties": { + "issue_type": { + "description": "The type of the referenced issue.", + "nullable": true, + "properties": { + "color": { + "description": "The color of the issue type.", + "nullable": true, + "type": "string" + }, + "id": { + "description": "The unique identifier of the issue type.", + "type": "integer" + }, + "name": { + "description": "The name of the issue type.", + "type": "string" + }, + "node_id": { + "description": "The node identifier of the issue type.", + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "name" + ], + "title": "Issue Type", + "type": "object" + }, + "number": { + "description": "The number of the referenced issue.", + "type": "integer" + }, + "repository": { + "$ref": "#/components/schemas/simple-repository" + }, + "state": { + "description": "The state of the referenced issue.", + "type": "string" + }, + "state_reason": { + "description": "The reason for the referenced issue's state.", + "nullable": true, + "type": "string" + }, + "title": { + "description": "The title of the referenced issue.", + "type": "string" + } + }, + "required": [ + "number", + "title", + "state", + "repository", + "issue_type" + ], + "title": "Issue Reference", + "type": "object" + }, + "nullable-license-simple": { + "description": "License Simple", + "nullable": true, + "properties": { + "html_url": { + "format": "uri", + "type": "string" + }, + "key": { + "example": "mit", + "type": "string" + }, + "name": { + "example": "MIT License", + "type": "string" + }, + "node_id": { + "example": "MDc6TGljZW5zZW1pdA==", + "type": "string" + }, + "spdx_id": { + "example": "MIT", + "nullable": true, + "type": "string" + }, + "url": { + "example": "https://api.github.com/licenses/mit", + "format": "uri", + "nullable": true, + "type": "string" + } + }, + "required": [ + "key", + "name", + "url", + "spdx_id", + "node_id" + ], + "title": "License Simple", + "type": "object" + }, + "nullable-milestone": { + "description": "A collection of related issues and pull requests.", + "nullable": true, + "properties": { + "closed_at": { + "example": "2013-02-12T13:22:01Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "closed_issues": { + "example": 8, + "type": "integer" + }, + "created_at": { + "example": "2011-04-10T20:09:31Z", + "format": "date-time", + "type": "string" + }, + "creator": { + "$ref": "#/components/schemas/nullable-simple-user" + }, + "description": { + "example": "Tracking milestone for version 1.0", + "nullable": true, + "type": "string" + }, + "due_on": { + "example": "2012-10-09T23:39:01Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "html_url": { + "example": "https://github.com/octocat/Hello-World/milestones/v1.0", + "format": "uri", + "type": "string" + }, + "id": { + "example": 1002604, + "type": "integer" + }, + "labels_url": { + "example": "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels", + "format": "uri", + "type": "string" + }, + "node_id": { + "example": "MDk6TWlsZXN0b25lMTAwMjYwNA==", + "type": "string" + }, + "number": { + "description": "The number of the milestone.", + "example": 42, + "type": "integer" + }, + "open_issues": { + "example": 4, + "type": "integer" + }, + "state": { + "default": "open", + "description": "The state of the milestone.", + "enum": [ + "open", + "closed" + ], + "example": "open", + "type": "string" + }, + "title": { + "description": "The title of the milestone.", + "example": "v1.0", + "type": "string" + }, + "updated_at": { + "example": "2014-03-03T18:58:10Z", + "format": "date-time", + "type": "string" + }, + "url": { + "example": "https://api.github.com/repos/octocat/Hello-World/milestones/1", + "format": "uri", + "type": "string" + } + }, + "required": [ + "closed_issues", + "creator", + "description", + "due_on", + "closed_at", + "id", + "node_id", + "labels_url", + "html_url", + "number", + "open_issues", + "state", + "title", + "url", + "created_at", + "updated_at" + ], + "title": "Milestone", + "type": "object" + }, + "nullable-pinned-issue-comment": { + "description": "Context around who pinned an issue comment and when it was pinned.", + "nullable": true, + "properties": { + "pinned_at": { + "example": "2011-04-14T16:00:49Z", + "format": "date-time", + "type": "string" + }, + "pinned_by": { + "$ref": "#/components/schemas/nullable-simple-user" + } + }, + "required": [ + "pinned_at", + "pinned_by" + ], + "title": "Pinned Issue Comment", + "type": "object" + }, + "nullable-simple-user": { + "description": "A GitHub user.", + "nullable": true, + "properties": { + "avatar_url": { + "example": "https://github.com/images/error/octocat_happy.gif", + "format": "uri", + "type": "string" + }, + "email": { + "nullable": true, + "type": "string" + }, + "events_url": { + "example": "https://api.github.com/users/octocat/events{/privacy}", + "type": "string" + }, + "followers_url": { + "example": "https://api.github.com/users/octocat/followers", + "format": "uri", + "type": "string" + }, + "following_url": { + "example": "https://api.github.com/users/octocat/following{/other_user}", + "type": "string" + }, + "gists_url": { + "example": "https://api.github.com/users/octocat/gists{/gist_id}", + "type": "string" + }, + "gravatar_id": { + "example": "41d064eb2195891e12d0413f63227ea7", + "nullable": true, + "type": "string" + }, + "html_url": { + "example": "https://github.com/octocat", + "format": "uri", + "type": "string" + }, + "id": { + "example": 1, + "format": "int64", + "type": "integer" + }, + "login": { + "example": "octocat", + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "node_id": { + "example": "MDQ6VXNlcjE=", + "type": "string" + }, + "organizations_url": { + "example": "https://api.github.com/users/octocat/orgs", + "format": "uri", + "type": "string" + }, + "received_events_url": { + "example": "https://api.github.com/users/octocat/received_events", + "format": "uri", + "type": "string" + }, + "repos_url": { + "example": "https://api.github.com/users/octocat/repos", + "format": "uri", + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "example": "\"2020-07-09T00:17:55Z\"", + "type": "string" + }, + "starred_url": { + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "type": "string" + }, + "subscriptions_url": { + "example": "https://api.github.com/users/octocat/subscriptions", + "format": "uri", + "type": "string" + }, + "type": { + "example": "User", + "type": "string" + }, + "url": { + "example": "https://api.github.com/users/octocat", + "format": "uri", + "type": "string" + }, + "user_view_type": { + "example": "public", + "type": "string" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "title": "Simple User", + "type": "object" + }, + "nullable-team-simple": { + "description": "Groups of organization members that gives permissions on specified repositories.", + "nullable": true, + "properties": { + "description": { + "description": "Description of the team", + "example": "A great team.", + "nullable": true, + "type": "string" + }, + "enterprise_id": { + "description": "Unique identifier of the enterprise to which this team belongs", + "example": 42, + "type": "integer" + }, + "html_url": { + "example": "https://github.com/orgs/rails/teams/core", + "format": "uri", + "type": "string" + }, + "id": { + "description": "Unique identifier of the team", + "example": 1, + "type": "integer" + }, + "ldap_dn": { + "description": "Distinguished Name (DN) that team maps to within LDAP environment", + "example": "uid=example,ou=users,dc=github,dc=com", + "type": "string" + }, + "members_url": { + "example": "https://api.github.com/organizations/1/team/1/members{/member}", + "type": "string" + }, + "name": { + "description": "Name of the team", + "example": "Justice League", + "type": "string" + }, + "node_id": { + "example": "MDQ6VGVhbTE=", + "type": "string" + }, + "notification_setting": { + "description": "The notification setting the team has set", + "example": "notifications_enabled", + "type": "string" + }, + "organization_id": { + "description": "Unique identifier of the organization to which this team belongs", + "example": 37, + "type": "integer" + }, + "permission": { + "description": "Permission that the team will have for its repositories", + "example": "admin", + "type": "string" + }, + "privacy": { + "description": "The level of privacy this team should have", + "example": "closed", + "type": "string" + }, + "repositories_url": { + "example": "https://api.github.com/organizations/1/team/1/repos", + "format": "uri", + "type": "string" + }, + "slug": { + "example": "justice-league", + "type": "string" + }, + "type": { + "description": "The ownership type of the team", + "enum": [ + "enterprise", + "organization" + ], + "type": "string" + }, + "url": { + "description": "URL for the team", + "example": "https://api.github.com/organizations/1/team/1", + "format": "uri", + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "members_url", + "name", + "description", + "permission", + "html_url", + "repositories_url", + "slug", + "type" + ], + "title": "Team Simple", + "type": "object" + }, + "parent-issue-added-issue-event": { + "description": "Parent-issue Added Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "parent_issue": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "parent_issue", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Parent-issue Added Issue Event", + "type": "object" + }, + "parent-issue-removed-issue-event": { + "description": "Parent-issue Removed Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "parent_issue": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "parent_issue", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Parent-issue Removed Issue Event", + "type": "object" + }, + "public-user": { + "additionalProperties": false, + "description": "Public User", + "properties": { + "avatar_url": { + "format": "uri", + "type": "string" + }, + "bio": { + "nullable": true, + "type": "string" + }, + "blog": { + "nullable": true, + "type": "string" + }, + "collaborators": { + "example": 3, + "type": "integer" + }, + "company": { + "nullable": true, + "type": "string" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "disk_usage": { + "example": 1, + "type": "integer" + }, + "email": { + "format": "email", + "nullable": true, + "type": "string" + }, + "events_url": { + "type": "string" + }, + "followers": { + "type": "integer" + }, + "followers_url": { + "format": "uri", + "type": "string" + }, + "following": { + "type": "integer" + }, + "following_url": { + "type": "string" + }, + "gists_url": { + "type": "string" + }, + "gravatar_id": { + "nullable": true, + "type": "string" + }, + "hireable": { + "nullable": true, + "type": "boolean" + }, + "html_url": { + "format": "uri", + "type": "string" + }, + "id": { + "format": "int64", + "type": "integer" + }, + "location": { + "nullable": true, + "type": "string" + }, + "login": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "node_id": { + "type": "string" + }, + "notification_email": { + "format": "email", + "nullable": true, + "type": "string" + }, + "organizations_url": { + "format": "uri", + "type": "string" + }, + "owned_private_repos": { + "example": 2, + "type": "integer" + }, + "plan": { + "properties": { + "collaborators": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "private_repos": { + "type": "integer" + }, + "space": { + "type": "integer" + } + }, + "required": [ + "collaborators", + "name", + "space", + "private_repos" + ], + "type": "object" + }, + "private_gists": { + "example": 1, + "type": "integer" + }, + "public_gists": { + "type": "integer" + }, + "public_repos": { + "type": "integer" + }, + "received_events_url": { + "format": "uri", + "type": "string" + }, + "repos_url": { + "format": "uri", + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "starred_url": { + "type": "string" + }, + "subscriptions_url": { + "format": "uri", + "type": "string" + }, + "total_private_repos": { + "example": 2, + "type": "integer" + }, + "twitter_username": { + "nullable": true, + "type": "string" + }, + "type": { + "type": "string" + }, + "updated_at": { + "format": "date-time", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + }, + "user_view_type": { + "type": "string" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url", + "bio", + "blog", + "company", + "email", + "followers", + "following", + "hireable", + "location", + "name", + "public_gists", + "public_repos", + "created_at", + "updated_at" + ], + "title": "Public User", + "type": "object" + }, + "pull-request-review-comment": { + "description": "Pull Request Review Comments are comments on a portion of the Pull Request's diff.", + "properties": { + "_links": { + "properties": { + "html": { + "properties": { + "href": { + "example": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1", + "format": "uri", + "type": "string" + } + }, + "required": [ + "href" + ], + "type": "object" + }, + "pull_request": { + "properties": { + "href": { + "example": "https://api.github.com/repos/octocat/Hello-World/pulls/1", + "format": "uri", + "type": "string" + } + }, + "required": [ + "href" + ], + "type": "object" + }, + "self": { + "properties": { + "href": { + "example": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "format": "uri", + "type": "string" + } + }, + "required": [ + "href" + ], + "type": "object" + } + }, + "required": [ + "self", + "html", + "pull_request" + ], + "type": "object" + }, + "author_association": { + "$ref": "#/components/schemas/author-association" + }, + "body": { + "description": "The text of the comment.", + "example": "We should probably include a check for null values here.", + "type": "string" + }, + "body_html": { + "example": "\"

comment body

\"", + "type": "string" + }, + "body_text": { + "example": "\"comment body\"", + "type": "string" + }, + "commit_id": { + "description": "The SHA of the commit to which the comment applies.", + "example": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "type": "string" + }, + "created_at": { + "example": "2011-04-14T16:00:49Z", + "format": "date-time", + "type": "string" + }, + "diff_hunk": { + "description": "The diff of the line that the comment refers to.", + "example": "@@ -16,33 +16,40 @@ public class Connection : IConnection...", + "type": "string" + }, + "html_url": { + "description": "HTML URL for the pull request review comment.", + "example": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1", + "format": "uri", + "type": "string" + }, + "id": { + "description": "The ID of the pull request review comment.", + "example": 1, + "format": "int64", + "type": "integer" + }, + "in_reply_to_id": { + "description": "The comment ID to reply to.", + "example": 8, + "type": "integer" + }, + "line": { + "description": "The line of the blob to which the comment applies. The last line of the range for a multi-line comment", + "example": 2, + "type": "integer" + }, + "node_id": { + "description": "The node ID of the pull request review comment.", + "example": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "type": "string" + }, + "original_commit_id": { + "description": "The SHA of the original commit to which the comment applies.", + "example": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840", + "type": "string" + }, + "original_line": { + "description": "The line of the blob to which the comment applies. The last line of the range for a multi-line comment", + "example": 2, + "type": "integer" + }, + "original_position": { + "description": "The index of the original line in the diff to which the comment applies. This field is closing down; use `original_line` instead.", + "example": 4, + "type": "integer" + }, + "original_start_line": { + "description": "The first line of the range for a multi-line comment.", + "example": 2, + "nullable": true, + "type": "integer" + }, + "path": { + "description": "The relative path of the file to which the comment applies.", + "example": "config/database.yaml", + "type": "string" + }, + "position": { + "description": "The line index in the diff to which the comment applies. This field is closing down; use `line` instead.", + "example": 1, + "type": "integer" + }, + "pull_request_review_id": { + "description": "The ID of the pull request review to which the comment belongs.", + "example": 42, + "format": "int64", + "nullable": true, + "type": "integer" + }, + "pull_request_url": { + "description": "URL for the pull request that the review comment belongs to.", + "example": "https://api.github.com/repos/octocat/Hello-World/pulls/1", + "format": "uri", + "type": "string" + }, + "reactions": { + "$ref": "#/components/schemas/reaction-rollup" + }, + "side": { + "default": "RIGHT", + "description": "The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment", + "enum": [ + "LEFT", + "RIGHT" + ], + "type": "string" + }, + "start_line": { + "description": "The first line of the range for a multi-line comment.", + "example": 2, + "nullable": true, + "type": "integer" + }, + "start_side": { + "default": "RIGHT", + "description": "The side of the first line of the range for a multi-line comment.", + "enum": [ + "LEFT", + "RIGHT" + ], + "nullable": true, + "type": "string" + }, + "subject_type": { + "description": "The level at which the comment is targeted, can be a diff line or a file.", + "enum": [ + "line", + "file" + ], + "type": "string" + }, + "updated_at": { + "example": "2011-04-14T16:00:49Z", + "format": "date-time", + "type": "string" + }, + "url": { + "description": "URL for the pull request review comment", + "example": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/nullable-simple-user" + } + }, + "required": [ + "url", + "id", + "node_id", + "pull_request_review_id", + "diff_hunk", + "path", + "commit_id", + "original_commit_id", + "user", + "body", + "created_at", + "updated_at", + "html_url", + "pull_request_url", + "author_association", + "_links" + ], + "title": "Pull Request Review Comment", + "type": "object" + }, + "reaction-rollup": { + "properties": { + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "rocket": { + "type": "integer" + }, + "total_count": { + "type": "integer" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "url", + "total_count", + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "eyes", + "rocket" + ], + "title": "Reaction Rollup", + "type": "object" + }, + "removed-from-project-issue-event": { + "description": "Removed from Project Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "project_card": { + "properties": { + "column_name": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "previous_column_name": { + "type": "string" + }, + "project_id": { + "type": "integer" + }, + "project_url": { + "format": "uri", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "id", + "url", + "project_id", + "project_url", + "column_name" + ], + "type": "object" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Removed from Project Issue Event", + "type": "object" + }, + "renamed-issue-event": { + "description": "Renamed Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "rename": { + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + }, + "required": [ + "from", + "to" + ], + "type": "object" + }, + "url": { + "type": "string" + } + }, + "required": [ + "rename", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Renamed Issue Event", + "type": "object" + }, + "repository": { + "description": "A repository on GitHub.", + "properties": { + "allow_auto_merge": { + "default": false, + "description": "Whether to allow Auto-merge to be used on pull requests.", + "example": false, + "type": "boolean" + }, + "allow_forking": { + "description": "Whether to allow forking this repo", + "type": "boolean" + }, + "allow_merge_commit": { + "default": true, + "description": "Whether to allow merge commits for pull requests.", + "example": true, + "type": "boolean" + }, + "allow_rebase_merge": { + "default": true, + "description": "Whether to allow rebase merges for pull requests.", + "example": true, + "type": "boolean" + }, + "allow_squash_merge": { + "default": true, + "description": "Whether to allow squash merges for pull requests.", + "example": true, + "type": "boolean" + }, + "allow_update_branch": { + "default": false, + "description": "Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.", + "example": false, + "type": "boolean" + }, + "anonymous_access_enabled": { + "description": "Whether anonymous git access is enabled for this repository", + "type": "boolean" + }, + "archive_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "type": "string" + }, + "archived": { + "default": false, + "description": "Whether the repository is archived.", + "type": "boolean" + }, + "assignees_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "type": "string" + }, + "blobs_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "type": "string" + }, + "branches_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "type": "string" + }, + "clone_url": { + "example": "https://github.com/octocat/Hello-World.git", + "type": "string" + }, + "code_search_index_status": { + "description": "The status of the code search index for this repository", + "properties": { + "lexical_commit_sha": { + "type": "string" + }, + "lexical_search_ok": { + "type": "boolean" + } + }, + "type": "object" + }, + "collaborators_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "type": "string" + }, + "comments_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/comments{/number}", + "type": "string" + }, + "commits_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "type": "string" + }, + "compare_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "type": "string" + }, + "contents_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "type": "string" + }, + "contributors_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/contributors", + "format": "uri", + "type": "string" + }, + "created_at": { + "example": "2011-01-26T19:01:12Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "default_branch": { + "description": "The default branch of the repository.", + "example": "master", + "type": "string" + }, + "delete_branch_on_merge": { + "default": false, + "description": "Whether to delete head branches when pull requests are merged", + "example": false, + "type": "boolean" + }, + "deployments_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/deployments", + "format": "uri", + "type": "string" + }, + "description": { + "example": "This your first repo!", + "nullable": true, + "type": "string" + }, + "disabled": { + "description": "Returns whether or not this repository disabled.", + "type": "boolean" + }, + "downloads_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/downloads", + "format": "uri", + "type": "string" + }, + "events_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/events", + "format": "uri", + "type": "string" + }, + "fork": { + "type": "boolean" + }, + "forks": { + "type": "integer" + }, + "forks_count": { + "example": 9, + "type": "integer" + }, + "forks_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/forks", + "format": "uri", + "type": "string" + }, + "full_name": { + "example": "octocat/Hello-World", + "type": "string" + }, + "git_commits_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "type": "string" + }, + "git_refs_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "type": "string" + }, + "git_tags_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "type": "string" + }, + "git_url": { + "example": "git:github.com/octocat/Hello-World.git", + "type": "string" + }, + "has_discussions": { + "default": false, + "description": "Whether discussions are enabled.", + "example": true, + "type": "boolean" + }, + "has_downloads": { + "default": true, + "deprecated": true, + "description": "Whether downloads are enabled.", + "example": true, + "type": "boolean" + }, + "has_issues": { + "default": true, + "description": "Whether issues are enabled.", + "example": true, + "type": "boolean" + }, + "has_pages": { + "type": "boolean" + }, + "has_projects": { + "default": true, + "description": "Whether projects are enabled.", + "example": true, + "type": "boolean" + }, + "has_pull_requests": { + "default": true, + "description": "Whether pull requests are enabled.", + "example": true, + "type": "boolean" + }, + "has_wiki": { + "default": true, + "description": "Whether the wiki is enabled.", + "example": true, + "type": "boolean" + }, + "homepage": { + "example": "https://github.com", + "format": "uri", + "nullable": true, + "type": "string" + }, + "hooks_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/hooks", + "format": "uri", + "type": "string" + }, + "html_url": { + "example": "https://github.com/octocat/Hello-World", + "format": "uri", + "type": "string" + }, + "id": { + "description": "Unique identifier of the repository", + "example": 42, + "format": "int64", + "type": "integer" + }, + "is_template": { + "default": false, + "description": "Whether this repository acts as a template that can be used to generate new repositories.", + "example": true, + "type": "boolean" + }, + "issue_comment_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "type": "string" + }, + "issue_events_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "type": "string" + }, + "issues_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/issues{/number}", + "type": "string" + }, + "keys_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "type": "string" + }, + "labels_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/labels{/name}", + "type": "string" + }, + "language": { + "nullable": true, + "type": "string" + }, + "languages_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/languages", + "format": "uri", + "type": "string" + }, + "license": { + "$ref": "#/components/schemas/nullable-license-simple" + }, + "master_branch": { + "type": "string" + }, + "merge_commit_message": { + "description": "The default value for a merge commit message.\n\n- `PR_TITLE` - default to the pull request's title.\n- `PR_BODY` - default to the pull request's body.\n- `BLANK` - default to a blank commit message.", + "enum": [ + "PR_BODY", + "PR_TITLE", + "BLANK" + ], + "type": "string" + }, + "merge_commit_title": { + "description": "The default value for a merge commit title.\n\n- `PR_TITLE` - default to the pull request's title.\n- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).", + "enum": [ + "PR_TITLE", + "MERGE_MESSAGE" + ], + "type": "string" + }, + "merges_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/merges", + "format": "uri", + "type": "string" + }, + "milestones_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "type": "string" + }, + "mirror_url": { + "example": "git:git.example.com/octocat/Hello-World", + "format": "uri", + "nullable": true, + "type": "string" + }, + "name": { + "description": "The name of the repository.", + "example": "Team Environment", + "type": "string" + }, + "node_id": { + "example": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "type": "string" + }, + "notifications_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "type": "string" + }, + "open_issues": { + "type": "integer" + }, + "open_issues_count": { + "example": 0, + "type": "integer" + }, + "owner": { + "$ref": "#/components/schemas/simple-user" + }, + "permissions": { + "properties": { + "admin": { + "type": "boolean" + }, + "maintain": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "triage": { + "type": "boolean" + } + }, + "required": [ + "admin", + "pull", + "push" + ], + "type": "object" + }, + "private": { + "default": false, + "description": "Whether the repository is private or public.", + "type": "boolean" + }, + "pull_request_creation_policy": { + "description": "The policy controlling who can create pull requests: all or collaborators_only.", + "enum": [ + "all", + "collaborators_only" + ], + "example": "all", + "type": "string" + }, + "pulls_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "type": "string" + }, + "pushed_at": { + "example": "2011-01-26T19:06:43Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "releases_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/releases{/id}", + "type": "string" + }, + "size": { + "description": "The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.", + "example": 108, + "type": "integer" + }, + "squash_merge_commit_message": { + "description": "The default value for a squash merge commit message:\n\n- `PR_BODY` - default to the pull request's body.\n- `COMMIT_MESSAGES` - default to the branch's commit messages.\n- `BLANK` - default to a blank commit message.", + "enum": [ + "PR_BODY", + "COMMIT_MESSAGES", + "BLANK" + ], + "type": "string" + }, + "squash_merge_commit_title": { + "description": "The default value for a squash merge commit title:\n\n- `PR_TITLE` - default to the pull request's title.\n- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit).", + "enum": [ + "PR_TITLE", + "COMMIT_OR_PR_TITLE" + ], + "type": "string" + }, + "ssh_url": { + "example": "git@github.com:octocat/Hello-World.git", + "type": "string" + }, + "stargazers_count": { + "example": 80, + "type": "integer" + }, + "stargazers_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/stargazers", + "format": "uri", + "type": "string" + }, + "starred_at": { + "example": "\"2020-07-09T00:17:42Z\"", + "type": "string" + }, + "statuses_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "type": "string" + }, + "subscribers_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/subscribers", + "format": "uri", + "type": "string" + }, + "subscription_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/subscription", + "format": "uri", + "type": "string" + }, + "svn_url": { + "example": "https://svn.github.com/octocat/Hello-World", + "format": "uri", + "type": "string" + }, + "tags_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/tags", + "format": "uri", + "type": "string" + }, + "teams_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/teams", + "format": "uri", + "type": "string" + }, + "temp_clone_token": { + "type": "string" + }, + "topics": { + "items": { + "type": "string" + }, + "type": "array" + }, + "trees_url": { + "example": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "type": "string" + }, + "updated_at": { + "example": "2011-01-26T19:14:43Z", + "format": "date-time", + "nullable": true, + "type": "string" + }, + "url": { + "example": "https://api.github.com/repos/octocat/Hello-World", + "format": "uri", + "type": "string" + }, + "use_squash_pr_title_as_default": { + "default": false, + "deprecated": true, + "description": "Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use `squash_merge_commit_title` instead.", + "type": "boolean" + }, + "visibility": { + "default": "public", + "description": "The repository visibility: public, private, or internal.", + "type": "string" + }, + "watchers": { + "type": "integer" + }, + "watchers_count": { + "example": 80, + "type": "integer" + }, + "web_commit_signoff_required": { + "default": false, + "description": "Whether to require contributors to sign off on web-based commits", + "type": "boolean" + } + }, + "required": [ + "archive_url", + "assignees_url", + "blobs_url", + "branches_url", + "collaborators_url", + "comments_url", + "commits_url", + "compare_url", + "contents_url", + "contributors_url", + "deployments_url", + "description", + "downloads_url", + "events_url", + "fork", + "forks_url", + "full_name", + "git_commits_url", + "git_refs_url", + "git_tags_url", + "hooks_url", + "html_url", + "id", + "node_id", + "issue_comment_url", + "issue_events_url", + "issues_url", + "keys_url", + "labels_url", + "languages_url", + "merges_url", + "milestones_url", + "name", + "notifications_url", + "owner", + "private", + "pulls_url", + "releases_url", + "stargazers_url", + "statuses_url", + "subscribers_url", + "subscription_url", + "tags_url", + "teams_url", + "trees_url", + "url", + "clone_url", + "default_branch", + "forks", + "forks_count", + "git_url", + "has_downloads", + "has_issues", + "has_projects", + "has_wiki", + "has_pages", + "homepage", + "language", + "archived", + "disabled", + "mirror_url", + "open_issues", + "open_issues_count", + "license", + "pushed_at", + "size", + "ssh_url", + "stargazers_count", + "svn_url", + "watchers", + "watchers_count", + "created_at", + "updated_at" + ], + "title": "Repository", + "type": "object", + "x-github-breaking-changes": [ + { + "changeset": "remove_use_squash_pr_title_as_default", + "patch": { + "properties": { + "use_squash_pr_title_as_default": null + } + }, + "version": "2026-03-10" + }, + { + "changeset": "deprecate_beta_media_type", + "patch": { + "properties": { + "master_branch": null + } + }, + "version": "2026-03-10" + }, + { + "changeset": "remove_has_downloads", + "patch": { + "properties": { + "has_downloads": null + }, + "required": [ + "archive_url", + "assignees_url", + "blobs_url", + "branches_url", + "collaborators_url", + "comments_url", + "commits_url", + "compare_url", + "contents_url", + "contributors_url", + "deployments_url", + "description", + "downloads_url", + "events_url", + "fork", + "forks_url", + "full_name", + "git_commits_url", + "git_refs_url", + "git_tags_url", + "hooks_url", + "html_url", + "id", + "node_id", + "issue_comment_url", + "issue_events_url", + "issues_url", + "keys_url", + "labels_url", + "languages_url", + "merges_url", + "milestones_url", + "name", + "notifications_url", + "owner", + "private", + "pulls_url", + "releases_url", + "stargazers_url", + "statuses_url", + "subscribers_url", + "subscription_url", + "tags_url", + "teams_url", + "trees_url", + "url", + "clone_url", + "default_branch", + "forks", + "forks_count", + "git_url", + "has_issues", + "has_projects", + "has_wiki", + "has_pages", + "homepage", + "language", + "archived", + "disabled", + "mirror_url", + "open_issues", + "open_issues_count", + "license", + "pushed_at", + "size", + "ssh_url", + "stargazers_count", + "svn_url", + "watchers", + "watchers_count", + "created_at", + "updated_at" + ] + }, + "version": "2026-03-10" + } + ] + }, + "review-dismissed-issue-event": { + "description": "Review Dismissed Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "dismissed_review": { + "properties": { + "dismissal_commit_id": { + "type": "string" + }, + "dismissal_message": { + "nullable": true, + "type": "string" + }, + "review_id": { + "type": "integer" + }, + "state": { + "type": "string" + } + }, + "required": [ + "state", + "review_id", + "dismissal_message" + ], + "type": "object" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "dismissed_review", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Review Dismissed Issue Event", + "type": "object" + }, + "review-request-removed-issue-event": { + "description": "Review Request Removed Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "requested_reviewer": { + "$ref": "#/components/schemas/simple-user" + }, + "requested_team": { + "$ref": "#/components/schemas/team" + }, + "review_requester": { + "$ref": "#/components/schemas/simple-user" + }, + "url": { + "type": "string" + } + }, + "required": [ + "review_requester", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Review Request Removed Issue Event", + "type": "object" + }, + "review-requested-issue-event": { + "description": "Review Requested Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "requested_reviewer": { + "$ref": "#/components/schemas/simple-user" + }, + "requested_team": { + "$ref": "#/components/schemas/team" + }, + "review_requester": { + "$ref": "#/components/schemas/simple-user" + }, + "url": { + "type": "string" + } + }, + "required": [ + "review_requester", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Review Requested Issue Event", + "type": "object" + }, + "scim-error": { + "description": "Scim Error", + "properties": { + "detail": { + "nullable": true, + "type": "string" + }, + "documentation_url": { + "nullable": true, + "type": "string" + }, + "message": { + "nullable": true, + "type": "string" + }, + "schemas": { + "items": { + "type": "string" + }, + "type": "array" + }, + "scimType": { + "nullable": true, + "type": "string" + }, + "status": { + "type": "integer" + } + }, + "title": "Scim Error", + "type": "object" + }, + "simple-repository": { + "description": "A GitHub repository.", + "properties": { + "archive_url": { + "description": "A template for the API URL to download the repository as an archive.", + "example": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", + "type": "string" + }, + "assignees_url": { + "description": "A template for the API URL to list the available assignees for issues in the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}", + "type": "string" + }, + "blobs_url": { + "description": "A template for the API URL to create or retrieve a raw Git blob in the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", + "type": "string" + }, + "branches_url": { + "description": "A template for the API URL to get information about branches in the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}", + "type": "string" + }, + "collaborators_url": { + "description": "A template for the API URL to get information about collaborators of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", + "type": "string" + }, + "comments_url": { + "description": "A template for the API URL to get information about comments on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/comments{/number}", + "type": "string" + }, + "commits_url": { + "description": "A template for the API URL to get information about commits on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}", + "type": "string" + }, + "compare_url": { + "description": "A template for the API URL to compare two commits or refs.", + "example": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", + "type": "string" + }, + "contents_url": { + "description": "A template for the API URL to get the contents of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}", + "type": "string" + }, + "contributors_url": { + "description": "A template for the API URL to list the contributors to the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/contributors", + "format": "uri", + "type": "string" + }, + "deployments_url": { + "description": "The API URL to list the deployments of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/deployments", + "format": "uri", + "type": "string" + }, + "description": { + "description": "The repository description.", + "example": "This your first repo!", + "nullable": true, + "type": "string" + }, + "downloads_url": { + "description": "The API URL to list the downloads on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/downloads", + "format": "uri", + "type": "string" + }, + "events_url": { + "description": "The API URL to list the events of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/events", + "format": "uri", + "type": "string" + }, + "fork": { + "description": "Whether the repository is a fork.", + "type": "boolean" + }, + "forks_url": { + "description": "The API URL to list the forks of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/forks", + "format": "uri", + "type": "string" + }, + "full_name": { + "description": "The full, globally unique, name of the repository.", + "example": "octocat/Hello-World", + "type": "string" + }, + "git_commits_url": { + "description": "A template for the API URL to get information about Git commits of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", + "type": "string" + }, + "git_refs_url": { + "description": "A template for the API URL to get information about Git refs of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", + "type": "string" + }, + "git_tags_url": { + "description": "A template for the API URL to get information about Git tags of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", + "type": "string" + }, + "hooks_url": { + "description": "The API URL to list the hooks on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/hooks", + "format": "uri", + "type": "string" + }, + "html_url": { + "description": "The URL to view the repository on GitHub.com.", + "example": "https://github.com/octocat/Hello-World", + "format": "uri", + "type": "string" + }, + "id": { + "description": "A unique identifier of the repository.", + "example": 1296269, + "format": "int64", + "type": "integer" + }, + "issue_comment_url": { + "description": "A template for the API URL to get information about issue comments on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", + "type": "string" + }, + "issue_events_url": { + "description": "A template for the API URL to get information about issue events on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}", + "type": "string" + }, + "issues_url": { + "description": "A template for the API URL to get information about issues on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/issues{/number}", + "type": "string" + }, + "keys_url": { + "description": "A template for the API URL to get information about deploy keys on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}", + "type": "string" + }, + "labels_url": { + "description": "A template for the API URL to get information about labels of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/labels{/name}", + "type": "string" + }, + "languages_url": { + "description": "The API URL to get information about the languages of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/languages", + "format": "uri", + "type": "string" + }, + "merges_url": { + "description": "The API URL to merge branches in the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/merges", + "format": "uri", + "type": "string" + }, + "milestones_url": { + "description": "A template for the API URL to get information about milestones of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}", + "type": "string" + }, + "name": { + "description": "The name of the repository.", + "example": "Hello-World", + "type": "string" + }, + "node_id": { + "description": "The GraphQL identifier of the repository.", + "example": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", + "type": "string" + }, + "notifications_url": { + "description": "A template for the API URL to get information about notifications on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", + "type": "string" + }, + "owner": { + "$ref": "#/components/schemas/simple-user" + }, + "private": { + "description": "Whether the repository is private.", + "type": "boolean" + }, + "pulls_url": { + "description": "A template for the API URL to get information about pull requests on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}", + "type": "string" + }, + "releases_url": { + "description": "A template for the API URL to get information about releases on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/releases{/id}", + "type": "string" + }, + "stargazers_url": { + "description": "The API URL to list the stargazers on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/stargazers", + "format": "uri", + "type": "string" + }, + "statuses_url": { + "description": "A template for the API URL to get information about statuses of a commit.", + "example": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}", + "type": "string" + }, + "subscribers_url": { + "description": "The API URL to list the subscribers on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/subscribers", + "format": "uri", + "type": "string" + }, + "subscription_url": { + "description": "The API URL to subscribe to notifications for this repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/subscription", + "format": "uri", + "type": "string" + }, + "tags_url": { + "description": "The API URL to get information about tags on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/tags", + "format": "uri", + "type": "string" + }, + "teams_url": { + "description": "The API URL to list the teams on the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/teams", + "format": "uri", + "type": "string" + }, + "trees_url": { + "description": "A template for the API URL to create or retrieve a raw Git tree of the repository.", + "example": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", + "type": "string" + }, + "url": { + "description": "The URL to get more information about the repository from the GitHub API.", + "example": "https://api.github.com/repos/octocat/Hello-World", + "format": "uri", + "type": "string" + } + }, + "required": [ + "archive_url", + "assignees_url", + "blobs_url", + "branches_url", + "collaborators_url", + "comments_url", + "commits_url", + "compare_url", + "contents_url", + "contributors_url", + "deployments_url", + "description", + "downloads_url", + "events_url", + "fork", + "forks_url", + "full_name", + "git_commits_url", + "git_refs_url", + "git_tags_url", + "hooks_url", + "html_url", + "id", + "node_id", + "issue_comment_url", + "issue_events_url", + "issues_url", + "keys_url", + "labels_url", + "languages_url", + "merges_url", + "milestones_url", + "name", + "notifications_url", + "owner", + "private", + "pulls_url", + "releases_url", + "stargazers_url", + "statuses_url", + "subscribers_url", + "subscription_url", + "tags_url", + "teams_url", + "trees_url", + "url" + ], + "title": "Simple Repository", + "type": "object" + }, + "simple-user": { + "description": "A GitHub user.", + "properties": { + "avatar_url": { + "example": "https://github.com/images/error/octocat_happy.gif", + "format": "uri", + "type": "string" + }, + "email": { + "nullable": true, + "type": "string" + }, + "events_url": { + "example": "https://api.github.com/users/octocat/events{/privacy}", + "type": "string" + }, + "followers_url": { + "example": "https://api.github.com/users/octocat/followers", + "format": "uri", + "type": "string" + }, + "following_url": { + "example": "https://api.github.com/users/octocat/following{/other_user}", + "type": "string" + }, + "gists_url": { + "example": "https://api.github.com/users/octocat/gists{/gist_id}", + "type": "string" + }, + "gravatar_id": { + "example": "41d064eb2195891e12d0413f63227ea7", + "nullable": true, + "type": "string" + }, + "html_url": { + "example": "https://github.com/octocat", + "format": "uri", + "type": "string" + }, + "id": { + "example": 1, + "format": "int64", + "type": "integer" + }, + "login": { + "example": "octocat", + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "node_id": { + "example": "MDQ6VXNlcjE=", + "type": "string" + }, + "organizations_url": { + "example": "https://api.github.com/users/octocat/orgs", + "format": "uri", + "type": "string" + }, + "received_events_url": { + "example": "https://api.github.com/users/octocat/received_events", + "format": "uri", + "type": "string" + }, + "repos_url": { + "example": "https://api.github.com/users/octocat/repos", + "format": "uri", + "type": "string" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "example": "\"2020-07-09T00:17:55Z\"", + "type": "string" + }, + "starred_url": { + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}", + "type": "string" + }, + "subscriptions_url": { + "example": "https://api.github.com/users/octocat/subscriptions", + "format": "uri", + "type": "string" + }, + "type": { + "example": "User", + "type": "string" + }, + "url": { + "example": "https://api.github.com/users/octocat", + "format": "uri", + "type": "string" + }, + "user_view_type": { + "example": "public", + "type": "string" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "title": "Simple User", + "type": "object" + }, + "state-change-issue-event": { + "description": "State Change Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "intent": { + "$ref": "#/components/schemas/nullable-issue-event-intent" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "state_reason": { + "nullable": true, + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "State Change Issue Event", + "type": "object" + }, + "sub-issue-added-issue-event": { + "description": "Sub-issue Added Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "sub_issue": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "url": { + "type": "string" + } + }, + "required": [ + "sub_issue", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Sub-issue Added Issue Event", + "type": "object" + }, + "sub-issue-removed-issue-event": { + "description": "Sub-issue Removed Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "sub_issue": { + "$ref": "#/components/schemas/nullable-issue-reference" + }, + "url": { + "type": "string" + } + }, + "required": [ + "sub_issue", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Sub-issue Removed Issue Event", + "type": "object" + }, + "sub-issues-summary": { + "properties": { + "completed": { + "type": "integer" + }, + "percent_completed": { + "type": "integer" + }, + "total": { + "type": "integer" + } + }, + "required": [ + "total", + "completed", + "percent_completed" + ], + "title": "Sub-issues Summary", + "type": "object" + }, + "team": { + "description": "Groups of organization members that gives permissions on specified repositories.", + "properties": { + "access_source": { + "description": "How the team's access to the repository was granted. This property is only\npresent when the team is returned in a repository context, such as\n`GET /repos/{owner}/{repo}/teams`.", + "enum": [ + "direct", + "organization", + "enterprise" + ], + "example": "direct", + "type": "string" + }, + "description": { + "nullable": true, + "type": "string" + }, + "enterprise_id": { + "description": "Unique identifier of the enterprise to which this team belongs", + "example": 42, + "type": "integer" + }, + "html_url": { + "example": "https://github.com/orgs/rails/teams/core", + "format": "uri", + "type": "string" + }, + "id": { + "type": "integer" + }, + "members_url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "notification_setting": { + "type": "string" + }, + "organization_id": { + "description": "Unique identifier of the organization to which this team belongs", + "example": 37, + "type": "integer" + }, + "parent": { + "$ref": "#/components/schemas/nullable-team-simple" + }, + "permission": { + "type": "string" + }, + "permissions": { + "properties": { + "admin": { + "type": "boolean" + }, + "maintain": { + "type": "boolean" + }, + "pull": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "triage": { + "type": "boolean" + } + }, + "required": [ + "pull", + "triage", + "push", + "maintain", + "admin" + ], + "type": "object" + }, + "privacy": { + "type": "string" + }, + "repositories_url": { + "format": "uri", + "type": "string" + }, + "slug": { + "type": "string" + }, + "type": { + "description": "The ownership type of the team", + "enum": [ + "enterprise", + "organization" + ], + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "members_url", + "name", + "description", + "permission", + "html_url", + "repositories_url", + "slug", + "parent", + "type" + ], + "title": "Team", + "type": "object" + }, + "timeline-assigned-issue-event": { + "description": "Timeline Assigned Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "assignee": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "intent": { + "$ref": "#/components/schemas/nullable-issue-event-intent" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app", + "assignee" + ], + "title": "Timeline Assigned Issue Event", + "type": "object" + }, + "timeline-comment-event": { + "description": "Timeline Comment Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "author_association": { + "$ref": "#/components/schemas/author-association" + }, + "body": { + "description": "Contents of the issue comment", + "example": "What version of Safari were you using when you observed this bug?", + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_text": { + "type": "string" + }, + "created_at": { + "example": "2011-04-14T16:00:49Z", + "format": "date-time", + "type": "string" + }, + "event": { + "type": "string" + }, + "html_url": { + "format": "uri", + "type": "string" + }, + "id": { + "description": "Unique identifier of the issue comment", + "example": 42, + "type": "integer" + }, + "issue_url": { + "format": "uri", + "type": "string" + }, + "minimized": { + "$ref": "#/components/schemas/nullable-issue-comment-minimized" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "pin": { + "$ref": "#/components/schemas/nullable-pinned-issue-comment" + }, + "reactions": { + "$ref": "#/components/schemas/reaction-rollup" + }, + "updated_at": { + "example": "2011-04-14T16:00:49Z", + "format": "date-time", + "type": "string" + }, + "url": { + "description": "URL for the issue comment", + "example": "https://api.github.com/repositories/42/issues/comments/1", + "format": "uri", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/simple-user" + } + }, + "required": [ + "event", + "actor", + "id", + "node_id", + "html_url", + "issue_url", + "author_association", + "user", + "url", + "created_at", + "updated_at" + ], + "title": "Timeline Comment Event", + "type": "object" + }, + "timeline-commit-commented-event": { + "description": "Timeline Commit Commented Event", + "properties": { + "comments": { + "items": { + "$ref": "#/components/schemas/commit-comment" + }, + "type": "array" + }, + "commit_id": { + "type": "string" + }, + "event": { + "type": "string" + }, + "node_id": { + "type": "string" + } + }, + "title": "Timeline Commit Commented Event", + "type": "object" + }, + "timeline-committed-event": { + "description": "Timeline Committed Event", + "properties": { + "author": { + "description": "Identifying information for the git-user", + "properties": { + "date": { + "description": "Timestamp of the commit", + "example": "2014-08-09T08:02:04+12:00", + "format": "date-time", + "type": "string" + }, + "email": { + "description": "Git email address of the user", + "example": "monalisa.octocat@example.com", + "type": "string" + }, + "name": { + "description": "Name of the git user", + "example": "Monalisa Octocat", + "type": "string" + } + }, + "required": [ + "email", + "name", + "date" + ], + "type": "object" + }, + "committer": { + "description": "Identifying information for the git-user", + "properties": { + "date": { + "description": "Timestamp of the commit", + "example": "2014-08-09T08:02:04+12:00", + "format": "date-time", + "type": "string" + }, + "email": { + "description": "Git email address of the user", + "example": "monalisa.octocat@example.com", + "type": "string" + }, + "name": { + "description": "Name of the git user", + "example": "Monalisa Octocat", + "type": "string" + } + }, + "required": [ + "email", + "name", + "date" + ], + "type": "object" + }, + "event": { + "type": "string" + }, + "html_url": { + "format": "uri", + "type": "string" + }, + "message": { + "description": "Message describing the purpose of the commit", + "example": "Fix #42", + "type": "string" + }, + "node_id": { + "type": "string" + }, + "parents": { + "items": { + "properties": { + "html_url": { + "format": "uri", + "type": "string" + }, + "sha": { + "description": "SHA for the commit", + "example": "7638417db6d59f3c431d3e1f261cc637155684cd", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "sha", + "url", + "html_url" + ], + "type": "object" + }, + "type": "array" + }, + "sha": { + "description": "SHA for the commit", + "example": "7638417db6d59f3c431d3e1f261cc637155684cd", + "type": "string" + }, + "tree": { + "properties": { + "sha": { + "description": "SHA for the commit", + "example": "7638417db6d59f3c431d3e1f261cc637155684cd", + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "sha", + "url" + ], + "type": "object" + }, + "url": { + "format": "uri", + "type": "string" + }, + "verification": { + "properties": { + "payload": { + "nullable": true, + "type": "string" + }, + "reason": { + "type": "string" + }, + "signature": { + "nullable": true, + "type": "string" + }, + "verified": { + "type": "boolean" + }, + "verified_at": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "verified", + "reason", + "signature", + "payload", + "verified_at" + ], + "type": "object" + } + }, + "required": [ + "sha", + "node_id", + "url", + "html_url", + "author", + "committer", + "tree", + "message", + "parents", + "verification" + ], + "title": "Timeline Committed Event", + "type": "object" + }, + "timeline-cross-referenced-event": { + "description": "Timeline Cross Referenced Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "created_at": { + "format": "date-time", + "type": "string" + }, + "event": { + "type": "string" + }, + "source": { + "properties": { + "issue": { + "$ref": "#/components/schemas/issue" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "updated_at": { + "format": "date-time", + "type": "string" + } + }, + "required": [ + "event", + "created_at", + "updated_at", + "source" + ], + "title": "Timeline Cross Referenced Event", + "type": "object" + }, + "timeline-issue-events": { + "anyOf": [ + { + "$ref": "#/components/schemas/labeled-issue-event" + }, + { + "$ref": "#/components/schemas/unlabeled-issue-event" + }, + { + "$ref": "#/components/schemas/milestoned-issue-event" + }, + { + "$ref": "#/components/schemas/demilestoned-issue-event" + }, + { + "$ref": "#/components/schemas/renamed-issue-event" + }, + { + "$ref": "#/components/schemas/review-requested-issue-event" + }, + { + "$ref": "#/components/schemas/review-request-removed-issue-event" + }, + { + "$ref": "#/components/schemas/review-dismissed-issue-event" + }, + { + "$ref": "#/components/schemas/locked-issue-event" + }, + { + "$ref": "#/components/schemas/added-to-project-issue-event" + }, + { + "$ref": "#/components/schemas/moved-column-in-project-issue-event" + }, + { + "$ref": "#/components/schemas/removed-from-project-issue-event" + }, + { + "$ref": "#/components/schemas/converted-note-to-issue-issue-event" + }, + { + "$ref": "#/components/schemas/timeline-comment-event" + }, + { + "$ref": "#/components/schemas/timeline-cross-referenced-event" + }, + { + "$ref": "#/components/schemas/timeline-committed-event" + }, + { + "$ref": "#/components/schemas/timeline-reviewed-event" + }, + { + "$ref": "#/components/schemas/timeline-line-commented-event" + }, + { + "$ref": "#/components/schemas/timeline-commit-commented-event" + }, + { + "$ref": "#/components/schemas/timeline-assigned-issue-event" + }, + { + "$ref": "#/components/schemas/timeline-unassigned-issue-event" + }, + { + "$ref": "#/components/schemas/state-change-issue-event" + }, + { + "$ref": "#/components/schemas/issue-type-added-issue-event" + }, + { + "$ref": "#/components/schemas/issue-type-removed-issue-event" + }, + { + "$ref": "#/components/schemas/issue-type-changed-issue-event" + }, + { + "$ref": "#/components/schemas/sub-issue-added-issue-event" + }, + { + "$ref": "#/components/schemas/sub-issue-removed-issue-event" + }, + { + "$ref": "#/components/schemas/parent-issue-added-issue-event" + }, + { + "$ref": "#/components/schemas/parent-issue-removed-issue-event" + }, + { + "$ref": "#/components/schemas/blocked-by-added-issue-event" + }, + { + "$ref": "#/components/schemas/blocked-by-removed-issue-event" + }, + { + "$ref": "#/components/schemas/blocking-added-issue-event" + }, + { + "$ref": "#/components/schemas/blocking-removed-issue-event" + } + ], + "description": "Timeline Event", + "title": "Timeline Event", + "type": "object" + }, + "timeline-line-commented-event": { + "description": "Timeline Line Commented Event", + "properties": { + "comments": { + "items": { + "$ref": "#/components/schemas/pull-request-review-comment" + }, + "type": "array" + }, + "event": { + "type": "string" + }, + "node_id": { + "type": "string" + } + }, + "title": "Timeline Line Commented Event", + "type": "object" + }, + "timeline-reviewed-event": { + "description": "Timeline Reviewed Event", + "properties": { + "_links": { + "properties": { + "html": { + "properties": { + "href": { + "type": "string" + } + }, + "required": [ + "href" + ], + "type": "object" + }, + "pull_request": { + "properties": { + "href": { + "type": "string" + } + }, + "required": [ + "href" + ], + "type": "object" + } + }, + "required": [ + "html", + "pull_request" + ], + "type": "object" + }, + "author_association": { + "$ref": "#/components/schemas/author-association" + }, + "body": { + "description": "The text of the review.", + "example": "This looks great.", + "nullable": true, + "type": "string" + }, + "body_html": { + "type": "string" + }, + "body_text": { + "type": "string" + }, + "commit_id": { + "description": "A commit SHA for the review.", + "example": "54bb654c9e6025347f57900a4a5c2313a96b8035", + "type": "string" + }, + "event": { + "type": "string" + }, + "html_url": { + "example": "https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80", + "format": "uri", + "type": "string" + }, + "id": { + "description": "Unique identifier of the review", + "example": 42, + "type": "integer" + }, + "node_id": { + "example": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=", + "type": "string" + }, + "pull_request_url": { + "example": "https://api.github.com/repos/octocat/Hello-World/pulls/12", + "format": "uri", + "type": "string" + }, + "state": { + "example": "CHANGES_REQUESTED", + "type": "string" + }, + "submitted_at": { + "format": "date-time", + "type": "string" + }, + "updated_at": { + "format": "date-time", + "nullable": true, + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/simple-user" + } + }, + "required": [ + "event", + "id", + "node_id", + "user", + "body", + "state", + "commit_id", + "html_url", + "pull_request_url", + "_links", + "author_association" + ], + "title": "Timeline Reviewed Event", + "type": "object" + }, + "timeline-unassigned-issue-event": { + "description": "Timeline Unassigned Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "assignee": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app", + "assignee" + ], + "title": "Timeline Unassigned Issue Event", + "type": "object" + }, + "unassigned-issue-event": { + "description": "Unassigned Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "assignee": { + "$ref": "#/components/schemas/simple-user" + }, + "assigner": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app", + "assignee", + "assigner" + ], + "title": "Unassigned Issue Event", + "type": "object" + }, + "unlabeled-issue-event": { + "description": "Unlabeled Issue Event", + "properties": { + "actor": { + "$ref": "#/components/schemas/simple-user" + }, + "commit_id": { + "nullable": true, + "type": "string" + }, + "commit_url": { + "nullable": true, + "type": "string" + }, + "created_at": { + "type": "string" + }, + "event": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "intent": { + "$ref": "#/components/schemas/nullable-issue-event-intent" + }, + "label": { + "properties": { + "color": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name", + "color" + ], + "type": "object" + }, + "node_id": { + "type": "string" + }, + "performed_via_github_app": { + "$ref": "#/components/schemas/nullable-integration" + }, + "url": { + "type": "string" + } + }, + "required": [ + "label", + "id", + "node_id", + "url", + "actor", + "event", + "commit_id", + "commit_url", + "created_at", + "performed_via_github_app" + ], + "title": "Unlabeled Issue Event", + "type": "object" + }, + "validation-error": { + "description": "Validation Error", + "properties": { + "documentation_url": { + "type": "string" + }, + "errors": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "field": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "resource": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "nullable": true, + "type": "string" + }, + { + "nullable": true, + "type": "integer" + }, + { + "items": { + "type": "string" + }, + "nullable": true, + "type": "array" + } + ] + } + }, + "required": [ + "code" + ], + "type": "object" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "required": [ + "message", + "documentation_url" + ], + "title": "Validation Error", + "type": "object" + }, + "validation-error-simple": { + "description": "Validation Error Simple", + "properties": { + "documentation_url": { + "type": "string" + }, + "errors": { + "items": { + "type": "string" + }, + "type": "array" + }, + "message": { + "type": "string" + } + }, + "required": [ + "message", + "documentation_url" + ], + "title": "Validation Error Simple", + "type": "object" + } + } + } +} diff --git a/e2e/fixtures/petstore-3.0.yaml b/e2e/fixtures/petstore-3.0.yaml new file mode 100644 index 0000000..63c1543 --- /dev/null +++ b/e2e/fixtures/petstore-3.0.yaml @@ -0,0 +1,839 @@ +openapi: 3.0.4 +info: + title: Swagger Petstore - OpenAPI 3.0 + description: |- + This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about + Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach! + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in OAS3. + + Some useful links: + - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore) + - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml) + termsOfService: https://swagger.io/terms/ + contact: + email: apiteam@swagger.io + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html + version: 1.0.27 +externalDocs: + description: Find out more about Swagger + url: https://swagger.io +servers: + - url: https://petstore3.swagger.io/api/v3 +tags: + - name: pet + description: Everything about your Pets + externalDocs: + description: Find out more + url: https://swagger.io + - name: store + description: Access to Petstore orders + externalDocs: + description: Find out more about our store + url: https://swagger.io + - name: user + description: Operations about user +paths: + /pet: + put: + tags: + - pet + summary: Update an existing pet. + description: Update an existing pet by Id. + operationId: updatePet + requestBody: + description: Update an existent pet in the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Pet' + required: true + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '422': + description: Validation exception + default: + description: Unexpected error + security: + - petstore_auth: + - write:pets + - read:pets + post: + tags: + - pet + summary: Add a new pet to the store. + description: Add a new pet to the store. + operationId: addPet + requestBody: + description: Create a new pet in the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Pet' + required: true + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid input + '422': + description: Validation exception + default: + description: Unexpected error + security: + - petstore_auth: + - write:pets + - read:pets + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status. + description: Multiple status values can be provided with comma separated strings. + operationId: findPetsByStatus + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + explode: true + schema: + type: string + default: available + enum: + - available + - pending + - sold + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid status value + default: + description: Unexpected error + security: + - petstore_auth: + - write:pets + - read:pets + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags. + description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + explode: true + schema: + type: array + items: + type: string + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid tag value + default: + description: Unexpected error + security: + - petstore_auth: + - write:pets + - read:pets + /pet/{petId}: + get: + tags: + - pet + summary: Find pet by ID. + description: Returns a single pet. + operationId: getPetById + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + default: + description: Unexpected error + security: + - api_key: [] + - petstore_auth: + - write:pets + - read:pets + post: + tags: + - pet + summary: Updates a pet in the store with form data. + description: Updates a pet resource based on the form data. + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + - name: name + in: query + description: Name of pet that needs to be updated + schema: + type: string + - name: status + in: query + description: Status of pet that needs to be updated + schema: + type: string + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid input + default: + description: Unexpected error + security: + - petstore_auth: + - write:pets + - read:pets + delete: + tags: + - pet + summary: Deletes a pet. + description: Delete a pet. + operationId: deletePet + parameters: + - name: api_key + in: header + description: '' + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Pet deleted + '400': + description: Invalid pet value + default: + description: Unexpected error + security: + - petstore_auth: + - write:pets + - read:pets + /pet/{petId}/uploadImage: + post: + tags: + - pet + summary: Uploads an image. + description: Upload image of the pet. + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + - name: additionalMetadata + in: query + description: Additional Metadata + required: false + schema: + type: string + requestBody: + content: + application/octet-stream: + schema: + type: string + format: binary + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: No file uploaded + '404': + description: Pet not found + default: + description: Unexpected error + security: + - petstore_auth: + - write:pets + - read:pets + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status. + description: Returns a map of status codes to quantities. + operationId: getInventory + x-swagger-router-controller: OrderController + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + default: + description: Unexpected error + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet. + description: Place a new order in the store. + x-swagger-router-controller: OrderController + operationId: placeOrder + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Order' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid input + '422': + description: Validation exception + default: + description: Unexpected error + /store/order/{orderId}: + get: + tags: + - store + summary: Find purchase order by ID. + x-swagger-router-controller: OrderController + description: For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. + operationId: getOrderById + parameters: + - name: orderId + in: path + description: ID of order that needs to be fetched + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + application/xml: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + default: + description: Unexpected error + delete: + tags: + - store + summary: Delete purchase order by identifier. + description: For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors. + x-swagger-router-controller: OrderController + operationId: deleteOrder + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: order deleted + '400': + description: Invalid ID supplied + '404': + description: Order not found + default: + description: Unexpected error + /user: + post: + tags: + - user + summary: Create user. + description: This can only be done by the logged in user. + x-swagger-router-controller: UserController + operationId: createUser + requestBody: + description: Created user object + content: + application/json: + schema: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/User' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' + default: + description: Unexpected error + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array. + description: Creates list of users with given input array. + x-swagger-router-controller: UserController + operationId: createUsersWithListInput + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' + default: + description: Unexpected error + /user/login: + get: + tags: + - user + summary: Logs user into the system. + description: Log into the system. + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: false + schema: + type: string + - name: password + in: query + description: The password for login in clear text + required: false + schema: + type: string + responses: + '200': + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + '400': + description: Invalid username/password supplied + default: + description: Unexpected error + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session. + description: Log user out of the system. + operationId: logoutUser + parameters: [] + responses: + '200': + description: successful operation + default: + description: Unexpected error + /user/{username}: + get: + tags: + - user + summary: Get user by user name. + description: Get user detail based on username. + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing + required: true + schema: + type: string + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' + '400': + description: Invalid username supplied + '404': + description: User not found + default: + description: Unexpected error + put: + tags: + - user + summary: Update user resource. + description: This can only be done by the logged in user. + x-swagger-router-controller: UserController + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + requestBody: + description: Update an existent user in the store + content: + application/json: + schema: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/User' + responses: + '200': + description: successful operation + '400': + description: bad request + '404': + description: user not found + default: + description: Unexpected error + delete: + tags: + - user + summary: Delete user resource. + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + '200': + description: User deleted + '400': + description: Invalid username supplied + '404': + description: User not found + default: + description: Unexpected error +components: + schemas: + Order: + x-swagger-router-model: io.swagger.petstore.model.Order + type: object + properties: + id: + type: integer + format: int64 + example: 10 + petId: + type: integer + format: int64 + example: 198772 + quantity: + type: integer + format: int32 + example: 7 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + example: approved + enum: + - placed + - approved + - delivered + complete: + type: boolean + xml: + name: order + Category: + x-swagger-router-model: io.swagger.petstore.model.Category + type: object + properties: + id: + type: integer + format: int64 + example: 1 + name: + type: string + example: Dogs + xml: + name: category + User: + x-swagger-router-model: io.swagger.petstore.model.User + type: object + properties: + id: + type: integer + format: int64 + example: 10 + username: + type: string + example: theUser + firstName: + type: string + example: John + lastName: + type: string + example: James + email: + type: string + example: john@email.com + password: + type: string + example: '12345' + phone: + type: string + example: '12345' + userStatus: + type: integer + description: User Status + format: int32 + example: 1 + xml: + name: user + Tag: + x-swagger-router-model: io.swagger.petstore.model.Tag + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: tag + Pet: + x-swagger-router-model: io.swagger.petstore.model.Pet + required: + - name + - photoUrls + type: object + properties: + id: + type: integer + format: int64 + example: 10 + name: + type: string + example: doggie + category: + $ref: '#/components/schemas/Category' + photoUrls: + type: array + xml: + wrapped: true + items: + type: string + xml: + name: photoUrl + tags: + type: array + xml: + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: pet + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + xml: + name: '##default' + requestBodies: + Pet: + description: Pet object that needs to be added to the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + UserArray: + description: List of user object + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: https://petstore3.swagger.io/oauth/authorize + scopes: + "write:pets": modify pets in your account + "read:pets": read your pets + api_key: + type: apiKey + name: api_key + in: header diff --git a/e2e/fixtures/trim-openapi.mjs b/e2e/fixtures/trim-openapi.mjs new file mode 100644 index 0000000..8c5ee3f --- /dev/null +++ b/e2e/fixtures/trim-openapi.mjs @@ -0,0 +1,121 @@ +#!/usr/bin/env node +/** + * One-off fixture trimmer: reduce a large OpenAPI document to the operations + * selected by --tags or --path-prefixes plus the transitive component closure + * they reference. The OUTPUT is what gets vendored; this script is committed + * so regeneration is reproducible (see fixtures README for the exact + * invocations and source commits). + * + * Usage: + * node trim-openapi.mjs --tags a,b,c + * node trim-openapi.mjs --path-prefixes /users,/channels + */ +import { readFileSync, writeFileSync } from 'fs'; + +const [input, output, ...rest] = process.argv.slice(2); +if (!input || !output) { + console.error('usage: trim-openapi.mjs [--tags a,b] [--path-prefixes /a,/b]'); + process.exit(1); +} +const args = {}; +for (let i = 0; i < rest.length; i += 2) { + args[rest[i].replace(/^--/, '')] = rest[i + 1]; +} +const tags = args.tags ? args.tags.split(',') : undefined; +const prefixes = args['path-prefixes'] ? args['path-prefixes'].split(',') : undefined; +if (!tags && !prefixes) { + console.error('one of --tags or --path-prefixes is required'); + process.exit(1); +} + +const doc = JSON.parse(readFileSync(input, 'utf8')); +const METHODS = ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace']; + +const keepOperation = (pathStr, operation) => { + if (tags) return Array.isArray(operation.tags) && operation.tags.some((t) => tags.includes(t)); + return prefixes.some((p) => pathStr === p || pathStr.startsWith(`${p}/`) || pathStr.startsWith(`${p}?`)); +}; + +// 1. Filter paths to selected operations +const paths = {}; +for (const [pathStr, item] of Object.entries(doc.paths ?? {})) { + if (!item || typeof item !== 'object') continue; + const kept = {}; + for (const [key, value] of Object.entries(item)) { + if (!METHODS.includes(key)) { + kept[key] = value; // parameters, servers, summary, ... + continue; + } + if (keepOperation(pathStr, value)) kept[key] = value; + } + if (METHODS.some((m) => kept[m])) paths[pathStr] = kept; +} + +// 2. Transitive $ref closure over #/components/... +const refs = new Set(); +const collect = (node) => { + if (Array.isArray(node)) return node.forEach(collect); + if (!node || typeof node !== 'object') return; + if (typeof node.$ref === 'string' && node.$ref.startsWith('#/components/')) refs.add(node.$ref); + Object.values(node).forEach(collect); +}; +collect(paths); +if (doc.security) collect(doc.security); + +// JSON Pointer tokens: `~1` is `/`, `~0` is `~` (RFC 6901) +const decodePointerSegment = (segment) => segment.replace(/~1/g, '/').replace(/~0/g, '~'); +const resolveRef = (ref) => { + const [, , group, name] = ref.split('/').map(decodePointerSegment); + return { group, name, target: doc.components?.[group]?.[name] }; +}; + +let previousSize = -1; +while (refs.size !== previousSize) { + previousSize = refs.size; + for (const ref of [...refs]) { + const { target } = resolveRef(ref); + if (target) collect(target); + } +} + +// 3. Copy only reachable components (securitySchemes always kept whole). +// An unresolvable reference means the trim would vendor a dangling $ref — +// fail loudly instead of silently skipping it. +const components = {}; +for (const ref of refs) { + const { group, name, target } = resolveRef(ref); + if (target === undefined) { + console.error(`unresolved component reference: ${ref}`); + process.exit(1); + } + components[group] ??= {}; + components[group][name] = target; +} +if (doc.components?.securitySchemes) components.securitySchemes = doc.components.securitySchemes; + +// 4. Assemble with provenance, stable key order for reviewable diffs +const sortKeys = (value) => { + if (Array.isArray(value)) return value.map(sortKeys); + if (!value || typeof value !== 'object') return value; + return Object.fromEntries( + Object.keys(value) + .sort() + .map((k) => [k, sortKeys(value[k])]), + ); +}; + +const out = { + openapi: doc.openapi, + info: { + ...doc.info, + 'x-fixture-provenance': `Trimmed by e2e/fixtures/trim-openapi.mjs (${tags ? `--tags ${args.tags}` : `--path-prefixes ${args['path-prefixes']}`}) — see e2e/fixtures/README.md`, + }, + ...(doc.servers && { servers: doc.servers }), + ...(doc.security && { security: doc.security }), + paths: sortKeys(paths), + ...(Object.keys(components).length > 0 && { components: sortKeys(components) }), +}; + +writeFileSync(output, `${JSON.stringify(out, null, 2)}\n`); +const operations = Object.values(paths).flatMap((p) => METHODS.filter((m) => p[m])).length; +console.log(`${output}: ${operations} operations, ${Object.keys(paths).length} paths, ${refs.size} component refs`); diff --git a/e2e/helpers/ajv.ts b/e2e/helpers/ajv.ts new file mode 100644 index 0000000..2ef8bce --- /dev/null +++ b/e2e/helpers/ajv.ts @@ -0,0 +1,23 @@ +/** + * JSON Schema 2020-12 validity checking for generated schemas. + * + * A fresh Ajv2020 instance per schema sidesteps `$id` collisions across + * tools; `strict: false` tolerates the generator's `x-` annotation keywords + * (`x-parameter-location`, `x-status-code`, ...); `validateFormats: false` + * tolerates OpenAPI formats (int64, binary) without pulling in ajv-formats. + */ +import Ajv2020 from 'ajv/dist/2020'; + +/** Compile every schema; returns human-readable failures (empty = all valid). */ +export function compileAll(schemas: Array<{ label: string; schema: unknown }>): string[] { + const failures: string[] = []; + for (const { label, schema } of schemas) { + try { + const ajv = new Ajv2020({ strict: false, allErrors: true, validateFormats: false }); + ajv.compile(schema as object); + } catch (error) { + failures.push(`${label}: ${error instanceof Error ? error.message : String(error)}`); + } + } + return failures; +} diff --git a/e2e/helpers/arazzo-executor.ts b/e2e/helpers/arazzo-executor.ts new file mode 100644 index 0000000..704b908 --- /dev/null +++ b/e2e/helpers/arazzo-executor.ts @@ -0,0 +1,146 @@ +/** + * Minimal Arazzo workflow executor for the e2e story: drives the IR on + * `metadata.workflow` — never the raw Arazzo text — evaluating runtime + * expressions against real HTTP responses and building each step's request + * from the step's embedded `operation.mapper` via buildHttpRequest. + */ +import { buildHttpRequest } from '../../src'; +import type { ExpressionValueIR, McpOpenAPITool, RuntimeExpressionAST } from '../../src'; +import { sendBuiltRequest } from './http'; + +interface StepResult { + statusCode: number; + body: unknown; + outputs: Record; +} + +interface EvalContext { + inputs: Record; + steps: Record; + current?: StepResult; +} + +const decodeSegment = (segment: string): string => segment.replace(/~1/g, '/').replace(/~0/g, '~'); + +function walkPointer(value: unknown, pointer: string | undefined): unknown { + if (pointer === undefined || pointer === '') return value; + let node: unknown = value; + for (const segment of pointer.slice(1).split('/')) { + if (node === null || typeof node !== 'object') return undefined; + node = (node as Record)[decodeSegment(segment)]; + } + return node; +} + +function setPointer(target: Record, pointer: string, value: unknown): void { + const segments = pointer.slice(1).split('/').map(decodeSegment); + let node: Record = target; + for (const segment of segments.slice(0, -1)) { + node = node[segment] as Record; + } + node[segments[segments.length - 1]] = value; +} + +function evalExpression(ast: RuntimeExpressionAST, ctx: EvalContext): unknown { + switch (ast.type) { + case 'inputs': + return ctx.inputs[ast.path.join('.')]; + case 'steps': { + const step = ctx.steps[ast.path[0]]; + if (step && ast.path[1] === 'outputs') { + return step.outputs[ast.path.slice(2).join('.')]; + } + return undefined; + } + case 'statusCode': + return ctx.current?.statusCode; + case 'response': + return ast.source === 'body' ? walkPointer(ctx.current?.body, ast.pointer) : undefined; + default: + throw new Error(`e2e executor does not evaluate ${ast.raw}`); + } +} + +function evalValue(value: ExpressionValueIR, ctx: EvalContext): unknown { + switch (value.kind) { + case 'literal': + return value.value; + case 'expression': + return evalExpression(value.expression, ctx); + case 'template': + return value.parts.map((part) => (typeof part === 'string' ? part : String(evalExpression(part, ctx)))).join(''); + } +} + +export interface WorkflowRun { + steps: Record; + outputs: Record; +} + +export async function executeWorkflow( + tool: McpOpenAPITool, + inputs: Record, + baseUrl: string, +): Promise { + const ir = tool.metadata.workflow; + if (!ir) throw new Error(`${tool.name} carries no workflow IR`); + + const steps: Record = {}; + for (const step of ir.steps) { + if (step.kind !== 'operation') { + throw new Error('the e2e executor drives operation steps only'); + } + + const input: Record = {}; + for (const parameter of step.parameters ?? []) { + input[parameter.name] = evalValue(parameter.value, { inputs, steps }); + } + + if (step.requestBody?.payload !== undefined) { + let payload = JSON.parse(JSON.stringify(step.requestBody.payload)) as Record; + for (const expression of step.requestBody.payloadExpressions ?? []) { + const value = evalValue(expression.value, { inputs, steps }); + if (expression.pointer === '') { + payload = value as Record; + } else { + setPointer(payload, expression.pointer, value); + } + } + const wholeBody = step.operation.mapper.find((entry) => entry.wholeBody); + if (wholeBody) { + input[wholeBody.inputKey] = payload; + } else { + // buildHttpRequest reads input[mapper.inputKey]; flattened payload + // keys are wire names (mapper.key), which conflict renames can differ + for (const [key, value] of Object.entries(payload)) { + const entry = step.operation.mapper.find((m) => m.type === 'body' && m.key === key); + input[entry?.inputKey ?? key] = value; + } + } + } + + // The embedded operation essentials ARE the executable surface + const stepTool: McpOpenAPITool = { + name: step.stepId, + description: step.description ?? step.stepId, + inputSchema: step.operation.inputSchema, + outputSchema: step.operation.outputSchema, + mapper: step.operation.mapper, + metadata: { path: step.path, method: step.method }, + }; + const response = await sendBuiltRequest(buildHttpRequest(stepTool, input, { baseUrl })); + const body: unknown = await response.json().catch(() => undefined); + + const current: StepResult = { statusCode: response.status, body, outputs: {} }; + for (const [name, ast] of Object.entries(step.outputs ?? {})) { + current.outputs[name] = evalExpression(ast, { inputs, steps, current }); + } + steps[step.stepId] = current; + } + + const outputs: Record = {}; + for (const [name, ast] of Object.entries(ir.outputs ?? {})) { + outputs[name] = evalExpression(ast, { inputs, steps }); + } + return { steps, outputs }; +} diff --git a/e2e/helpers/fixtures.ts b/e2e/helpers/fixtures.ts new file mode 100644 index 0000000..76558aa --- /dev/null +++ b/e2e/helpers/fixtures.ts @@ -0,0 +1,9 @@ +/** Fixture loading for the e2e story suite. */ +import { readFileSync } from 'fs'; +import { join } from 'path'; + +export const fixturePath = (name: string): string => join(__dirname, '..', 'fixtures', name); + +export const loadFixture = (name: string): string => readFileSync(fixturePath(name), 'utf8'); + +export const loadJsonFixture = (name: string): T => JSON.parse(loadFixture(name)) as T; diff --git a/e2e/helpers/http.ts b/e2e/helpers/http.ts new file mode 100644 index 0000000..25bf069 --- /dev/null +++ b/e2e/helpers/http.ts @@ -0,0 +1,29 @@ +/** + * Drive a BuiltHttpRequest over real HTTP with optional resolved security. + * The one place the FormData/undici hand-off happens: buildHttpRequest + * constructs the GLOBAL FormData, so passing it to global fetch is same-realm + * and undici sets the multipart boundary itself (which is exactly why + * buildHttpRequest omits content-type for multipart). + */ +import type { BuiltHttpRequest, ResolvedSecurity } from '../../src'; + +export async function sendBuiltRequest(built: BuiltHttpRequest, security?: ResolvedSecurity): Promise { + const url = new URL(built.url); + for (const [key, value] of Object.entries(security?.query ?? {})) { + url.searchParams.append(key, value); + } + + const headers: Record = { ...built.headers, ...(security?.headers ?? {}) }; + const securityCookies = Object.entries(security?.cookies ?? {}); + if (securityCookies.length > 0) { + const extra = securityCookies.map(([name, value]) => `${name}=${value}`).join('; '); + headers['Cookie'] = headers['Cookie'] ? `${headers['Cookie']}; ${extra}` : extra; + } + + // Node's fetch typing comes from undici — derive the body type from it + return fetch(url.toString(), { + method: built.method, + headers, + body: built.body as NonNullable[1]>['body'], + }); +} diff --git a/e2e/helpers/mcp.ts b/e2e/helpers/mcp.ts new file mode 100644 index 0000000..335d644 --- /dev/null +++ b/e2e/helpers/mcp.ts @@ -0,0 +1,57 @@ +/** + * Real MCP SDK wiring for the server story: a low-level `Server` (JSON Schema + * tools, no zod conversion) and a `Client` linked over `InMemoryTransport`. + */ +import { Server } from '@modelcontextprotocol/sdk/server/index.js'; +import { Client } from '@modelcontextprotocol/sdk/client/index.js'; +import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js'; +import { CallToolRequestSchema, ListToolsRequestSchema, type Tool } from '@modelcontextprotocol/sdk/types.js'; +import { toSdkTool } from '../../src'; +import type { McpOpenAPITool } from '../../src'; + +export interface CallOutcome { + // Index signature keeps this assignable to the SDK's ServerResult shape + [key: string]: unknown; + content: Array<{ type: 'text'; text: string }>; + structuredContent?: Record; + isError?: boolean; +} + +export type CallHandler = (tool: McpOpenAPITool, args: Record) => Promise; + +export interface McpPair { + client: Client; + shutdown(): Promise; +} + +export async function startMcpPair(tools: McpOpenAPITool[], onCall: CallHandler): Promise { + const byName = new Map(tools.map((tool) => [tool.name, tool])); + + const server = new Server({ name: 'e2e-server', version: '0.0.0' }, { capabilities: { tools: {} } }); + server.setRequestHandler(ListToolsRequestSchema, async () => ({ + tools: tools.map((tool) => { + const [name, config] = toSdkTool(tool); + return { name, ...config } as Tool; + }), + })); + server.setRequestHandler(CallToolRequestSchema, async (request) => { + const tool = byName.get(request.params.name); + if (!tool) { + throw new Error(`unknown tool ${request.params.name}`); + } + return onCall(tool, (request.params.arguments ?? {}) as Record); + }); + + const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair(); + await server.connect(serverTransport); + const client = new Client({ name: 'e2e-client', version: '0.0.0' }); + await client.connect(clientTransport); + + return { + client, + shutdown: async () => { + await client.close(); + await server.close(); + }, + }; +} diff --git a/e2e/mcp-server.e2e.ts b/e2e/mcp-server.e2e.ts new file mode 100644 index 0000000..d5d245e --- /dev/null +++ b/e2e/mcp-server.e2e.ts @@ -0,0 +1,115 @@ +/** + * User story: "spec → running MCP server" — the flagship journey from + * docs/examples.md, executed for real. Petstore tools registered on an actual + * MCP SDK server; a real client lists and calls them; the call handler runs + * SecurityResolver + buildHttpRequest and fetches a real loopback HTTP server + * that asserts what arrived on the wire. + */ +import { OpenAPIToolGenerator, SecurityResolver, buildHttpRequest, createSecurityContext } from '../src'; +import type { McpOpenAPITool } from '../src'; +import { createLoopbackServer, type LoopbackHandler } from '../src/__tests__/helpers/loopback'; +import { loadFixture } from './helpers/fixtures'; +import { sendBuiltRequest } from './helpers/http'; +import { startMcpPair, type McpPair } from './helpers/mcp'; + +describe('story: spec → running MCP server', () => { + let tools: McpOpenAPITool[]; + let pair: McpPair; + let baseUrl: string; + let handler: LoopbackHandler = (_req, res) => { + res.writeHead(404, { 'content-type': 'application/json' }); + res.end(JSON.stringify({ message: 'not found' })); + }; + const loopback = createLoopbackServer(() => handler); + const securityContext = createSecurityContext({ apiKey: 'e2e-key-123' }); + + beforeAll(async () => { + baseUrl = await loopback.listen(); + const generator = await OpenAPIToolGenerator.fromYAML(loadFixture('petstore-3.0.yaml')); + tools = await generator.generateTools({ preferredStatusCodes: [200], includeAllResponses: false }); + + pair = await startMcpPair(tools, async (tool, args) => { + const security = await new SecurityResolver().resolve(tool.mapper, securityContext); + const built = buildHttpRequest(tool, args, { baseUrl }); + const response = await sendBuiltRequest(built, security); + const payload = (await response.json()) as Record; + return { + content: [{ type: 'text', text: JSON.stringify(payload) }], + // structuredContent is validated against the advertised outputSchema — + // it describes SUCCESS shapes, so error payloads go in content only + ...(response.ok && { structuredContent: payload }), + isError: !response.ok, + }; + }); + }); + + afterAll(async () => { + await pair.shutdown(); + await loopback.close(); + }); + + beforeEach(() => loopback.reset()); + + it('advertises every generated tool intact through the protocol', async () => { + const listed = await pair.client.listTools(); + expect(listed.tools).toHaveLength(tools.length); + + const names = listed.tools.map((t) => t.name); + for (const tool of tools) { + expect(names).toContain(tool.name); + } + + const getPet = listed.tools.find((t) => t.name === 'getPetById')!; + const generated = tools.find((t) => t.name === 'getPetById')!; + // JSON round-trip through the transport must not alter the schema + expect(getPet.inputSchema).toEqual(JSON.parse(JSON.stringify(generated.inputSchema))); + expect(getPet.annotations).toMatchObject({ readOnlyHint: true, idempotentHint: true }); + }); + + it('calls a GET tool end-to-end: path templating and api key land on the wire', async () => { + const pet = { id: 42, name: 'Rex', photoUrls: ['https://example.com/rex.png'], status: 'available' }; + handler = (_req, res) => { + res.writeHead(200, { 'content-type': 'application/json' }); + res.end(JSON.stringify(pet)); + }; + + const result = await pair.client.callTool({ name: 'getPetById', arguments: { petId: 42 } }); + + const captured = loopback.requests.at(-1)!; + expect(captured.method).toBe('GET'); + expect(captured.url).toBe('/pet/42'); + expect(captured.headers['api_key']).toBe('e2e-key-123'); + expect(result.isError).toBe(false); + expect(result.structuredContent).toEqual(pet); + }); + + it('calls a POST tool end-to-end: JSON body arrives as sent', async () => { + const order = { id: 7, petId: 42, quantity: 1, status: 'placed', complete: false }; + handler = (_req, res) => { + res.writeHead(200, { 'content-type': 'application/json' }); + res.end(JSON.stringify(order)); + }; + + const result = await pair.client.callTool({ + name: 'placeOrder', + arguments: { petId: 42, quantity: 1, status: 'placed' }, + }); + + const captured = loopback.requests.at(-1)!; + expect(captured.method).toBe('POST'); + expect(captured.url).toBe('/store/order'); + expect(captured.headers['content-type']).toBe('application/json'); + expect(JSON.parse(captured.body.toString())).toEqual({ petId: 42, quantity: 1, status: 'placed' }); + expect(result.structuredContent).toEqual(order); + }); + + it('surfaces HTTP failures as isError results', async () => { + handler = (_req, res) => { + res.writeHead(404, { 'content-type': 'application/json' }); + res.end(JSON.stringify({ message: 'no such pet' })); + }; + + const result = await pair.client.callTool({ name: 'getPetById', arguments: { petId: 999 } }); + expect(result.isError).toBe(true); + }); +}); diff --git a/e2e/packaging.e2e.ts b/e2e/packaging.e2e.ts new file mode 100644 index 0000000..8c432d2 --- /dev/null +++ b/e2e/packaging.e2e.ts @@ -0,0 +1,116 @@ +/** + * Packaging story: the BUILT artifacts work exactly as consumers see them. + * + * - CJS (`require('dist/index.js')`), ESM (`import('dist/esm/index.mjs')`), + * and in-process src produce identical tools from the same spec. + * - The exports map resolves for both module systems when dist/ is mounted + * as an installed `node_modules/mcp-from-openapi` package (dist/package.json + * is the stripped publishable manifest). + * + * Requires `yarn build` first — fails loudly otherwise. + */ +import { execFileSync } from 'child_process'; +import { existsSync, mkdirSync, mkdtempSync, rmSync, symlinkSync, writeFileSync } from 'fs'; +import { tmpdir } from 'os'; +import { join } from 'path'; +import { OpenAPIToolGenerator } from '../src'; + +const repoRoot = join(__dirname, '..'); +const cjsPath = join(repoRoot, 'dist', 'index.js'); +const esmPath = join(repoRoot, 'dist', 'esm', 'index.mjs'); + +const spec = { + openapi: '3.0.0', + info: { title: 'Packaging API', version: '1.0.0' }, + paths: { + '/things/{id}': { + get: { + operationId: 'getThing', + parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }], + responses: { + '200': { + description: 'OK', + content: { + 'application/json': { schema: { type: 'object', properties: { name: { type: 'string' } } } }, + }, + }, + }, + }, + }, + }, +}; + +/** + * Static consumer script — no string-built code (inputs arrive via env), so + * there is nothing to sanitize. Loads the entry as CJS or ESM by extension. + */ +const CONSUMER_SCRIPT = ` +const { pathToFileURL } = require('url'); +const spec = JSON.parse(process.env.MCP_E2E_SPEC); +const entry = process.env.MCP_E2E_ENTRY; +const load = entry.endsWith('.mjs') ? import(pathToFileURL(entry).href) : Promise.resolve(require(entry)); +load + .then((mcp) => mcp.OpenAPIToolGenerator.fromJSON(spec)) + .then((generator) => generator.generateTools()) + .then((tools) => process.stdout.write(JSON.stringify(tools))) + .catch((error) => { console.error(error); process.exit(1); }); +`; + +const runConsumer = (scriptPath: string, entry: string): string => + execFileSync(process.execPath, [scriptPath], { + encoding: 'utf8', + env: { ...process.env, MCP_E2E_ENTRY: entry, MCP_E2E_SPEC: JSON.stringify(spec) }, + }); + +describe('packaging: built artifacts', () => { + beforeAll(() => { + if (!existsSync(cjsPath) || !existsSync(esmPath)) { + throw new Error('dist/ not found — run "yarn build" before "yarn test:e2e"'); + } + }); + + it('produces identical tools from CJS, ESM, and source entrypoints', async () => { + const inProcess = await (await OpenAPIToolGenerator.fromJSON(spec)).generateTools(); + + const scriptDir = mkdtempSync(join(tmpdir(), 'mcp-e2e-consumer-')); + try { + const scriptPath = join(scriptDir, 'consumer.cjs'); + writeFileSync(scriptPath, CONSUMER_SCRIPT); + const cjsOut = runConsumer(scriptPath, cjsPath); + const esmOut = runConsumer(scriptPath, esmPath); + + expect(JSON.parse(cjsOut)).toEqual(JSON.parse(JSON.stringify(inProcess))); + expect(JSON.parse(esmOut)).toEqual(JSON.parse(cjsOut)); + } finally { + rmSync(scriptDir, { recursive: true, force: true }); + } + }); + + it('resolves the exports map for require and import consumers of the installed package', () => { + const consumerDir = mkdtempSync(join(tmpdir(), 'mcp-e2e-')); + try { + mkdirSync(join(consumerDir, 'node_modules')); + symlinkSync(join(repoRoot, 'dist'), join(consumerDir, 'node_modules', 'mcp-from-openapi'), 'dir'); + + const cjs = execFileSync( + process.execPath, + ['-e', `const m = require('mcp-from-openapi'); process.stdout.write(typeof m.OpenAPIToolGenerator);`], + { encoding: 'utf8', cwd: consumerDir }, + ); + expect(cjs).toBe('function'); + + const esm = execFileSync( + process.execPath, + [ + '--input-type=module', + '-e', + `import('mcp-from-openapi').then((m) => process.stdout.write(typeof m.OpenAPIToolGenerator));`, + ], + { encoding: 'utf8', cwd: consumerDir }, + ); + expect(esm).toBe('function'); + } finally { + rmSync(consumerDir, { recursive: true, force: true }); + } + }); +}); diff --git a/e2e/real-specs.e2e.ts b/e2e/real-specs.e2e.ts new file mode 100644 index 0000000..3fe6333 --- /dev/null +++ b/e2e/real-specs.e2e.ts @@ -0,0 +1,110 @@ +/** + * Real-spec story: three vendored real-world specs survive the whole + * pipeline — generation, MCP name rules, JSON Schema 2020-12 validity (ajv), + * every client-target dialect, lint, and token accounting. The literal counts + * pin fixture↔spec drift (see e2e/fixtures/README.md). + */ +import { OpenAPIToolGenerator, analyzeToolSet, estimateToolTokens, lintDocument } from '../src'; +import type { ClientTarget, JsonSchema, McpOpenAPITool, OpenAPIDocument } from '../src'; +import { loadFixture, loadJsonFixture } from './helpers/fixtures'; +import { compileAll } from './helpers/ajv'; +import * as yaml from 'yaml'; + +const FIXTURES: Array<{ + file: string; + toolCount: number; + lintCounts: { error: number; warning: number; info: number }; +}> = [ + { file: 'petstore-3.0.yaml', toolCount: 19, lintCounts: { error: 0, warning: 2, info: 8 } }, + { file: 'github-trimmed-3.0.json', toolCount: 78, lintCounts: { error: 0, warning: 26, info: 15 } }, + { file: 'discord-trimmed-3.1.json', toolCount: 60, lintCounts: { error: 0, warning: 64, info: 72 } }, +]; + +const TARGETS = ['claude', 'openai', 'gemini', 'strict'] as const satisfies readonly ClientTarget[]; +// Compile-time exhaustiveness: a new ClientTarget member breaks this line +// until it is added to TARGETS above. +type MissingTarget = Exclude; +const allTargetsCovered: [MissingTarget] extends [never] ? true : never = true; +void allTargetsCovered; +const MCP_NAME = /^[A-Za-z0-9_.-]+$/; + +const loadDocument = (file: string): OpenAPIDocument => + file.endsWith('.yaml') ? (yaml.parse(loadFixture(file)) as OpenAPIDocument) : loadJsonFixture(file); + +const allSchemas = (tools: McpOpenAPITool[]): Array<{ label: string; schema: JsonSchema }> => + tools.flatMap((tool) => [ + { label: `${tool.name} input`, schema: tool.inputSchema }, + ...(tool.outputSchema ? [{ label: `${tool.name} output`, schema: tool.outputSchema }] : []), + ]); + +describe.each(FIXTURES)('story: real spec $file', ({ file, toolCount, lintCounts }) => { + let document: OpenAPIDocument; + let tools: McpOpenAPITool[]; + + beforeAll(async () => { + document = loadDocument(file); + tools = await (await OpenAPIToolGenerator.fromJSON(document)).generateTools(); + }); + + it(`generates exactly ${toolCount} tools, deterministically`, async () => { + expect(tools).toHaveLength(toolCount); + const again = await (await OpenAPIToolGenerator.fromJSON(loadDocument(file))).generateTools(); + expect(again).toEqual(tools); + }); + + it('emits MCP-valid, unique tool names', () => { + for (const tool of tools) { + expect(tool.name).toMatch(MCP_NAME); + expect(tool.name.length).toBeLessThanOrEqual(64); + } + expect(new Set(tools.map((t) => t.name)).size).toBe(tools.length); + }); + + it('produces valid JSON Schema 2020-12 for every schema', () => { + expect(compileAll(allSchemas(tools))).toEqual([]); + }); + + it.each(TARGETS)('stays valid and dialect-conformant under target %s', async (target) => { + const targeted = await (await OpenAPIToolGenerator.fromJSON(loadDocument(file))).generateTools({ target }); + expect(targeted).toHaveLength(toolCount); + expect(compileAll(allSchemas(targeted))).toEqual([]); + + for (const tool of targeted) { + const serialized = JSON.stringify([tool.inputSchema, tool.outputSchema ?? {}]); + expect(serialized).not.toContain('"$ref"'); // inlineLocalRefs ran + + // ensureArrayItems: every array node carries items + const walk = (node: unknown): void => { + if (Array.isArray(node)) return node.forEach(walk); + if (!node || typeof node !== 'object') return; + const record = node as Record; + const type = record['type']; + if (type === 'array' || (Array.isArray(type) && type.includes('array'))) { + expect(record['items'] ?? record['prefixItems']).toBeDefined(); + } + Object.values(record).forEach(walk); + }; + walk(tool.inputSchema); + + if (target === 'strict') { + const root = tool.inputSchema as Record; + expect(root['additionalProperties']).toBe(false); + } + } + }); + + it('lints to the expected finding counts', () => { + expect(lintDocument(document).counts).toEqual(lintCounts); + }); + + it('reports sane token estimates', () => { + const report = analyzeToolSet(tools); + expect(report.toolCount).toBe(toolCount); + expect(report.estimatedTokens).toBeGreaterThan(0); + for (const tool of tools) { + const tokens = estimateToolTokens(tool); + expect(Number.isInteger(tokens)).toBe(true); + expect(tokens).toBeGreaterThan(0); + } + }); +}); diff --git a/e2e/tsconfig.json b/e2e/tsconfig.json new file mode 100644 index 0000000..3d81662 --- /dev/null +++ b/e2e/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "rootDir": "..", + "noEmit": true, + "types": ["jest", "node"], + "baseUrl": "..", + "paths": { "mcp-from-openapi": ["src/index.ts"] } + }, + "include": ["./**/*.ts", "../src/**/*.ts", "../examples/**/*.ts"], + "exclude": ["../src/__tests__/**/*.spec.ts"] +} diff --git a/e2e/type-signatures.e2e.ts b/e2e/type-signatures.e2e.ts new file mode 100644 index 0000000..813734d --- /dev/null +++ b/e2e/type-signatures.e2e.ts @@ -0,0 +1,68 @@ +/** + * Type-signature story: every emitted TypeScript declaration and signature + * from real specs compiles under the real TypeScript compiler with zero + * diagnostics — the invalid-TS bug class as a permanent regression test. + */ +import * as ts from 'typescript'; +import { OpenAPIToolGenerator } from '../src'; +import type { McpOpenAPITool, OpenAPIDocument } from '../src'; +import { loadFixture, loadJsonFixture } from './helpers/fixtures'; +import * as yaml from 'yaml'; + +/** Compile virtual source text; return flattened diagnostics (empty = valid). */ +function compileVirtual(fileName: string, source: string): string[] { + const options: ts.CompilerOptions = { + noEmit: true, + strict: true, + skipLibCheck: true, + lib: ['lib.es2022.d.ts'], + types: [], + }; + const host = ts.createCompilerHost(options); + const readFile = host.readFile.bind(host); + const fileExists = host.fileExists.bind(host); + const getSourceFile = host.getSourceFile.bind(host); + host.readFile = (name) => (name === fileName ? source : readFile(name)); + host.fileExists = (name) => name === fileName || fileExists(name); + host.getSourceFile = (name, languageVersion, ...rest) => + name === fileName + ? ts.createSourceFile(name, source, languageVersion, true) + : getSourceFile(name, languageVersion, ...rest); + + const program = ts.createProgram([fileName], options, host); + return ts + .getPreEmitDiagnostics(program) + .map((diagnostic) => `${diagnostic.file?.fileName ?? ''}:${diagnostic.start ?? 0} ${ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n')}`); +} + +const cases: Array<{ file: string }> = [{ file: 'petstore-3.0.yaml' }, { file: 'github-trimmed-3.0.json' }]; + +describe.each(cases)('story: emitted TypeScript compiles ($file)', ({ file }) => { + let tools: McpOpenAPITool[]; + + beforeAll(async () => { + const document: OpenAPIDocument = file.endsWith('.yaml') + ? (yaml.parse(loadFixture(file)) as OpenAPIDocument) + : loadJsonFixture(file); + tools = await (await OpenAPIToolGenerator.fromJSON(document)).generateTools({ emitTypeSignatures: true }); + }); + + it('emits a signature and declaration for every tool', () => { + for (const tool of tools) { + expect(tool.metadata.typescript?.signature).toMatch(/^\(.*\) => Promise<.+>$/s); + expect(tool.metadata.typescript?.declaration).toContain('declare function'); + } + }); + + it('compiles all declarations with zero diagnostics', () => { + const source = tools.map((tool) => tool.metadata.typescript!.declaration).join('\n\n'); + expect(compileVirtual('declarations.ts', source)).toEqual([]); + }); + + it('compiles all signatures as type aliases with zero diagnostics', () => { + const source = tools + .map((tool, index) => `type S${index} = ${tool.metadata.typescript!.signature};`) + .join('\n'); + expect(compileVirtual('signatures.ts', source)).toEqual([]); + }); +}); diff --git a/e2e/wire-serialization.e2e.ts b/e2e/wire-serialization.e2e.ts new file mode 100644 index 0000000..0172592 --- /dev/null +++ b/e2e/wire-serialization.e2e.ts @@ -0,0 +1,190 @@ +/** + * Wire story: buildHttpRequest output fetched for real, asserted as the raw + * bytes/headers/paths the loopback server received — the OpenAPI + * serialization table on the wire instead of as data structures. + */ +import { OpenAPIToolGenerator, SecurityResolver, buildHttpRequest, createSecurityContext } from '../src'; +import type { McpOpenAPITool } from '../src'; +import { createLoopbackServer, type LoopbackHandler } from '../src/__tests__/helpers/loopback'; +import { sendBuiltRequest } from './helpers/http'; + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +// Inline spec on purpose: this story needs surgical control of styles. +const wireSpec: any = { + openapi: '3.0.0', + info: { title: 'Wire API', version: '1.0.0' }, + components: { + securitySchemes: { + bearerAuth: { type: 'http', scheme: 'bearer' }, + basicAuth: { type: 'http', scheme: 'basic' }, + headerKey: { type: 'apiKey', name: 'X-API-Key', in: 'header' }, + queryKey: { type: 'apiKey', name: 'api_key', in: 'query' }, + }, + }, + paths: { + '/search': { + get: { + operationId: 'search', + parameters: [ + { name: 'filter', in: 'query', style: 'deepObject', explode: true, schema: { type: 'object', properties: { a: { type: 'string' }, b: { type: 'string' } } } }, + { name: 'ids', in: 'query', style: 'pipeDelimited', explode: false, schema: { type: 'array', items: { type: 'integer' } } }, + { name: 'names', in: 'query', style: 'spaceDelimited', explode: false, schema: { type: 'array', items: { type: 'string' } } }, + { name: 'tag', in: 'query', schema: { type: 'array', items: { type: 'string' } } }, + { name: 'path', in: 'query', allowReserved: true, schema: { type: 'string' } }, + { name: 'quoted', in: 'query', schema: { type: 'string' } }, + { name: 'session', in: 'cookie', schema: { type: 'string' } }, + ], + responses: { '200': { description: 'OK' } }, + }, + }, + '/files/{fileId}': { + post: { + operationId: 'uploadFile', + parameters: [{ name: 'fileId', in: 'path', required: true, schema: { type: 'string' } }], + requestBody: { + content: { + 'multipart/form-data': { + schema: { + type: 'object', + properties: { + label: { type: 'string' }, + file: { type: 'string', format: 'binary' }, + }, + }, + }, + }, + }, + responses: { '201': { description: 'Created' } }, + }, + }, + '/forms': { + post: { + operationId: 'submitForm', + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + schema: { type: 'object', properties: { name: { type: 'string' }, tags: { type: 'string' } } }, + }, + }, + }, + responses: { '200': { description: 'OK' } }, + }, + }, + '/secure': { + get: { + operationId: 'secure', + security: [{ bearerAuth: [] }, { basicAuth: [] }, { headerKey: [] }, { queryKey: [] }], + responses: { '200': { description: 'OK' } }, + }, + }, + }, +}; + +describe('story: serialization on the wire', () => { + let byName: Map; + let baseUrl: string; + const handler: LoopbackHandler = (_req, res) => { + res.writeHead(200, { 'content-type': 'application/json' }); + res.end('{}'); + }; + const loopback = createLoopbackServer(() => handler); + + beforeAll(async () => { + baseUrl = await loopback.listen(); + const generator = await OpenAPIToolGenerator.fromJSON(wireSpec); + byName = new Map((await generator.generateTools()).map((tool) => [tool.name, tool])); + }); + + afterAll(() => loopback.close()); + beforeEach(() => loopback.reset()); + + const send = async (name: string, input: Record) => { + await sendBuiltRequest(buildHttpRequest(byName.get(name)!, input, { baseUrl })); + return loopback.requests.at(-1)!; + }; + + it('serializes query styles per the OpenAPI table', async () => { + const captured = await send('search', { + filter: { a: '1', b: '2' }, + ids: [1, 2, 3], + names: ['x', 'y'], + tag: ['red', 'blue'], + }); + + const params = new URL(`http://x${captured.url}`).searchParams; + expect(params.get('filter[a]')).toBe('1'); + expect(params.get('filter[b]')).toBe('2'); + expect(params.get('ids')).toBe('1|2|3'); + expect(params.get('names')).toBe('x y'); + expect(params.getAll('tag')).toEqual(['red', 'blue']); // form + explode default + + // raw wire form of the delimiters + expect(captured.url).toContain('ids=1%7C2%7C3'); + expect(captured.url).toContain('names=x%20y'); + }); + + it('honors allowReserved on the raw query string', async () => { + const captured = await send('search', { path: '/a/b:c$d', quoted: '/a/b:c$d' }); + expect(captured.url).toContain('path=/a/b:c$d'); // reserved chars kept + expect(captured.url).toContain('quoted=%2Fa%2Fb%3Ac%24d'); // percent-encoded otherwise + }); + + it('sends cookie parameters in the Cookie header', async () => { + const captured = await send('search', { session: 'abc123' }); + expect(captured.headers.cookie).toBe('session=abc123'); + }); + + it('encodes path parameters exactly once', async () => { + const captured = await send('uploadFile', { fileId: 'a b/c', file: new Uint8Array([1]) }); + expect(captured.url.split('?')[0]).toBe('/files/a%20b%2Fc'); + }); + + it('uploads multipart bodies with exact binary bytes and an undici boundary', async () => { + const bytes = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x00, 0xff]); + const captured = await send('uploadFile', { fileId: 'f1', label: 'a png', file: bytes }); + + expect(captured.headers['content-type']).toMatch(/^multipart\/form-data; boundary=/); + const body = captured.body; + expect(body.includes('Content-Disposition: form-data; name="label"')).toBe(true); + expect(body.includes('Content-Disposition: form-data; name="file"')).toBe(true); + expect(body.includes(Buffer.from(bytes))).toBe(true); // binary payload survives verbatim + }); + + it('serializes form-urlencoded bodies', async () => { + const captured = await send('submitForm', { name: 'Ada Lovelace', tags: 'a&b=c' }); + expect(captured.headers['content-type']).toBe('application/x-www-form-urlencoded'); + const params = new URLSearchParams(captured.body.toString()); + expect(params.get('name')).toBe('Ada Lovelace'); + expect(params.get('tags')).toBe('a&b=c'); + }); + + it('lands resolved security credentials on the wire', async () => { + const tool = byName.get('secure')!; + const resolver = new SecurityResolver(); + + const bearer = await resolver.resolve(tool.mapper, createSecurityContext({ jwt: 'tok-123' })); + await sendBuiltRequest(buildHttpRequest(tool, {}, { baseUrl }), bearer); + expect(loopback.requests.at(-1)!.headers.authorization).toBe('Bearer tok-123'); + + // SecurityContext.basic is the PRE-ENCODED base64 "username:password" + const basic = await resolver.resolve( + tool.mapper, + createSecurityContext({ basic: Buffer.from('ada:s3cret').toString('base64') }), + ); + await sendBuiltRequest(buildHttpRequest(tool, {}, { baseUrl }), basic); + expect(loopback.requests.at(-1)!.headers.authorization).toBe( + `Basic ${Buffer.from('ada:s3cret').toString('base64')}`, + ); + + // apiKeys is keyed by the WIRE parameter name (apiKeyName), not the scheme + const keys = await resolver.resolve( + tool.mapper, + createSecurityContext({ apiKeys: { 'X-API-Key': 'hk-1', api_key: 'qk-2' } }), + ); + await sendBuiltRequest(buildHttpRequest(tool, {}, { baseUrl }), keys); + const captured = loopback.requests.at(-1)!; + expect(captured.headers['x-api-key']).toBe('hk-1'); + expect(new URL(`http://x${captured.url}`).searchParams.get('api_key')).toBe('qk-2'); + }); +}); diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..05792f1 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,30 @@ +# Examples + +Runnable, tested examples — each folder pairs consumer-style code (`example.ts`, importing `mcp-from-openapi` exactly as your project would) with an e2e test (`example.e2e.ts`) that executes it against a real loopback HTTP server on every CI run. **If an example is in this folder, it works** — the suite fails otherwise. + +Run them all: + +```bash +yarn build && yarn test:e2e +``` + +| Example | Shows | +| ------- | ----- | +| [quickstart-mcp-server](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/quickstart-mcp-server) | The flagship journey: OpenAPI spec → tools → a running MCP server on the official SDK, calls proxied to the API with resolved credentials | +| [http-requests](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/http-requests) | The request pipeline without any framework: `buildHttpRequest` + `SecurityResolver` → `fetch`, with full OpenAPI parameter serialization | +| [secure-loading](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/secure-loading) | Loading untrusted specs safely: `fromURL` with `secureDefaults`, SSRF blocking, and host allowlists | +| [curation](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/curation) | Taming a big API: filtering, overlay patches, trimming, lint findings, and token-budget reports | +| [client-targets](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/client-targets) | One spec, four schema dialects: `target: 'claude' \| 'openai' \| 'gemini' \| 'strict'` | +| [typed-tools](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/typed-tools) | Code-execution surfaces: `dottedNaming` namespaces + `emitTypeSignatures` TypeScript contracts | +| [arazzo-workflow](https://github.com/agentfront/mcp-from-openapi/tree/main/examples/arazzo-workflow) | Multi-step workflows: an Arazzo document consolidated into one tool, executed step-by-step from its IR | + +## Layout + +```text +examples// + README.md # what it demonstrates and how it works + example.ts # the example — exported functions, consumer-style imports + example.e2e.ts # executes the example for real; runs in CI via `yarn test:e2e` +``` + +Examples receive their base URL and credentials as parameters, so the tests drive them against a local server — point them at a real API in your own code. diff --git a/examples/arazzo-workflow/README.md b/examples/arazzo-workflow/README.md new file mode 100644 index 0000000..26c3b27 --- /dev/null +++ b/examples/arazzo-workflow/README.md @@ -0,0 +1,18 @@ +# Arazzo workflows: many API calls, one tool + +Instead of exposing `createOrder` and `getOrderStatus` as separate tools and hoping the model chains them correctly, an [Arazzo 1.0](https://spec.openapis.org/arazzo/v1.0.0.html) workflow declares the chain — and `fromArazzo()` consolidates it into **one** MCP tool. The workflow's inputs become the tool's input schema; a pure, serializable IR on `metadata.workflow` carries the step sequence with each operation's schemas and request mapper embedded. + +## What it demonstrates + +- `fromArazzo(document, { sources })` — sources are supplied as documents, never fetched +- The IR contract: `$inputs.sku`, `$steps.place.outputs.orderId`, and `$response.body#/id` as parsed ASTs; each step's `operation.mapper` feeding `buildHttpRequest` directly (no second spec pass) +- A compact executor (~70 lines) driving the IR over live HTTP — the test asserts step 2's URL was built from step 1's response +- The library/runtime split: the library emits the IR and never executes; the executor here is *your* side of the contract (frameworks like FrontMCP ship their own) + +## Run it + +```bash +yarn build && yarn test:e2e +``` + +Related docs: [Arazzo Workflows](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/arazzo.md) · [Request Builder](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/request-builder.md) diff --git a/examples/arazzo-workflow/example.e2e.ts b/examples/arazzo-workflow/example.e2e.ts new file mode 100644 index 0000000..97908a9 --- /dev/null +++ b/examples/arazzo-workflow/example.e2e.ts @@ -0,0 +1,108 @@ +/** Executes the arazzo-workflow example against a loopback API. */ +import { createLoopbackServer, type LoopbackHandler } from '../../src/__tests__/helpers/loopback'; +import type { ArazzoDocument } from 'mcp-from-openapi'; +import { loadWorkflowTools, runWorkflow } from './example'; + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +const ordersApi: any = { + openapi: '3.0.0', + info: { title: 'Orders API', version: '1.0.0' }, + paths: { + '/orders': { + post: { + operationId: 'createOrder', + requestBody: { + required: true, + content: { + 'application/json': { + schema: { type: 'object', properties: { sku: { type: 'string' }, quantity: { type: 'integer' } }, required: ['sku'] }, + }, + }, + }, + responses: { + '201': { + description: 'Created', + content: { 'application/json': { schema: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] } } }, + }, + }, + }, + }, + '/orders/{orderId}/status': { + get: { + operationId: 'getOrderStatus', + parameters: [{ name: 'orderId', in: 'path', required: true, schema: { type: 'string' } }], + responses: { + '200': { + description: 'OK', + content: { 'application/json': { schema: { type: 'object', properties: { status: { type: 'string' } } } } }, + }, + }, + }, + }, + }, +}; + +const workflow: ArazzoDocument = { + arazzo: '1.0.0', + info: { title: 'Order flows', version: '1.0.0' }, + sourceDescriptions: [{ name: 'orders', url: 'https://example.com/orders.json' }], + workflows: [ + { + workflowId: 'placeAndTrack', + summary: 'Place an order and report its status', + inputs: { type: 'object', properties: { sku: { type: 'string' }, quantity: { type: 'integer' } }, required: ['sku'] }, + steps: [ + { + stepId: 'place', + operationId: 'createOrder', + requestBody: { contentType: 'application/json', payload: { sku: '$inputs.sku', quantity: '$inputs.quantity' } }, + outputs: { orderId: '$response.body#/id' }, + }, + { + stepId: 'track', + operationId: 'getOrderStatus', + parameters: [{ name: 'orderId', in: 'path', value: '$steps.place.outputs.orderId' }], + outputs: { status: '$response.body#/status' }, + }, + ], + outputs: { orderId: '$steps.place.outputs.orderId', status: '$steps.track.outputs.status' }, + }, + ], +}; + +describe('example: arazzo-workflow', () => { + const handler: LoopbackHandler = (req, res, body) => { + if (req.method === 'POST' && req.url === '/orders') { + res.writeHead(201, { 'content-type': 'application/json' }); + res.end(JSON.stringify({ id: 'ord-42', ...JSON.parse(body.toString()) })); + return; + } + if (req.method === 'GET' && req.url === '/orders/ord-42/status') { + res.writeHead(200, { 'content-type': 'application/json' }); + res.end(JSON.stringify({ status: 'shipped' })); + return; + } + res.writeHead(404); + res.end(); + }; + const loopback = createLoopbackServer(() => handler); + + afterAll(() => loopback.close()); + + it('consolidates the workflow into one tool and executes its IR', async () => { + const apiBaseUrl = await loopback.listen(); + + const [tool] = await loadWorkflowTools(workflow, { orders: ordersApi }); + expect(tool.name).toBe('placeAndTrack'); + // One consolidated tool: workflow inputs are the tool's input schema + expect(Object.keys((tool.inputSchema as any).properties)).toEqual(['sku', 'quantity']); + + const outputs = await runWorkflow(tool, { sku: 'FLUX-1', quantity: 3 }, apiBaseUrl); + expect(outputs).toEqual({ orderId: 'ord-42', status: 'shipped' }); + + // Step 2's path was built from step 1's response ($response.body#/id) + expect(loopback.requests.map((request) => request.url)).toEqual(['/orders', '/orders/ord-42/status']); + expect(JSON.parse(loopback.requests[0].body.toString())).toEqual({ sku: 'FLUX-1', quantity: 3 }); + }); +}); diff --git a/examples/arazzo-workflow/example.ts b/examples/arazzo-workflow/example.ts new file mode 100644 index 0000000..0aa73a0 --- /dev/null +++ b/examples/arazzo-workflow/example.ts @@ -0,0 +1,146 @@ +/** + * Arazzo workflows: many API calls, one tool. + * + * Tool consolidation is the consensus answer to context bloat, and Arazzo + * (the OpenAPI workflows spec) is its standards-track format. fromArazzo() + * turns each workflow into ONE MCP tool whose metadata carries a pure, + * serializable IR — this example also shows a compact executor driving that + * IR: evaluating `$inputs` / `$steps.*.outputs.*` / `$response.body#/ptr` + * expressions and building each step's request from its embedded mapper. + */ +import { buildHttpRequest, fromArazzo } from 'mcp-from-openapi'; +import type { + ArazzoDocument, + ExpressionValueIR, + McpOpenAPITool, + OpenAPIDocument, + RuntimeExpressionAST, +} from 'mcp-from-openapi'; + +/** Consolidate every workflow in an Arazzo document into MCP tools. */ +export async function loadWorkflowTools( + arazzo: ArazzoDocument | string, + sources: Record, +): Promise { + return fromArazzo(arazzo, { sources }); +} + +interface StepState { + statusCode: number; + body: unknown; + outputs: Record; +} + +const followPointer = (value: unknown, pointer?: string): unknown => + !pointer + ? value + : pointer + .slice(1) + .split('/') + .reduce( + (node, raw) => + node && typeof node === 'object' + ? (node as Record)[raw.replace(/~1/g, '/').replace(/~0/g, '~')] + : undefined, + value, + ); + +/** Evaluate one runtime-expression AST against the run state. */ +function evaluate( + ast: RuntimeExpressionAST, + state: { inputs: Record; steps: Record; current?: StepState }, +): unknown { + if (ast.type === 'inputs') return state.inputs[ast.path.join('.')]; + if (ast.type === 'steps') return state.steps[ast.path[0]]?.outputs[ast.path.slice(2).join('.')]; + if (ast.type === 'statusCode') return state.current?.statusCode; + if (ast.type === 'response' && ast.source === 'body') return followPointer(state.current?.body, ast.pointer); + throw new Error(`this executor does not evaluate ${ast.raw}`); +} + +const materialize = (value: ExpressionValueIR, state: Parameters[1]): unknown => + value.kind === 'literal' + ? value.value + : value.kind === 'expression' + ? evaluate(value.expression, state) + : value.parts.map((part) => (typeof part === 'string' ? part : String(evaluate(part, state)))).join(''); + +/** + * Execute a workflow tool's IR against a live API. Each operation step's + * embedded `operation.mapper` feeds buildHttpRequest directly — no second + * pass over the OpenAPI document is ever needed. + */ +export async function runWorkflow( + tool: McpOpenAPITool, + inputs: Record, + apiBaseUrl: string, +): Promise> { + const ir = tool.metadata.workflow; + if (!ir) throw new Error(`${tool.name} is not a workflow tool`); + + const steps: Record = {}; + for (const step of ir.steps) { + if (step.kind !== 'operation') throw new Error('nested workflows are out of scope here'); + + const input: Record = {}; + for (const parameter of step.parameters ?? []) { + input[parameter.name] = materialize(parameter.value, { inputs, steps }); + } + if (step.requestBody?.payload !== undefined) { + let payload: unknown = JSON.parse(JSON.stringify(step.requestBody.payload)); + for (const expression of step.requestBody.payloadExpressions ?? []) { + const value = materialize(expression.value, { inputs, steps }); + // Pointer '' means the expression IS the whole payload + if (expression.pointer === '') { + payload = value; + continue; + } + // RFC 6901: decode ~1 -> / and ~0 -> ~ (in that order) per segment + const segments = expression.pointer + .slice(1) + .split('/') + .map((segment) => segment.replace(/~1/g, '/').replace(/~0/g, '~')); + let node = payload as Record; + for (const segment of segments.slice(0, -1)) node = node[segment] as Record; + node[segments[segments.length - 1]] = value; + } + // Whole-body operations take the payload as-is; flattened bodies map + // each property through the mapper's inputKey + const wholeBody = step.operation.mapper.find((entry) => entry.type === 'body' && entry.wholeBody); + if (wholeBody) { + input[wholeBody.inputKey] = payload; + } else { + if (payload === null || typeof payload !== 'object' || Array.isArray(payload)) { + throw new Error('flattened request body payload must be an object'); + } + for (const [key, value] of Object.entries(payload)) { + const entry = step.operation.mapper.find((m) => m.type === 'body' && m.key === key); + input[entry?.inputKey ?? key] = value; + } + } + } + + const built = buildHttpRequest( + { + name: step.stepId, + description: step.stepId, + inputSchema: step.operation.inputSchema, + mapper: step.operation.mapper, + metadata: { path: step.path, method: step.method }, + }, + input, + { baseUrl: apiBaseUrl }, + ); + const response = await fetch(built.url, { method: built.method, headers: built.headers, body: built.body as never }); + const current: StepState = { statusCode: response.status, body: await response.json().catch(() => undefined), outputs: {} }; + for (const [name, ast] of Object.entries(step.outputs ?? {})) { + current.outputs[name] = evaluate(ast, { inputs, steps, current }); + } + steps[step.stepId] = current; + } + + const outputs: Record = {}; + for (const [name, ast] of Object.entries(ir.outputs ?? {})) { + outputs[name] = evaluate(ast, { inputs, steps }); + } + return outputs; +} diff --git a/examples/client-targets/README.md b/examples/client-targets/README.md new file mode 100644 index 0000000..f951c5c --- /dev/null +++ b/examples/client-targets/README.md @@ -0,0 +1,19 @@ +# Client compatibility targets + +Every provider accepts a different JSON Schema subset: Claude rejects top-level `oneOf`/`allOf`/`anyOf`, Gemini rejects `$ref`/`$defs` and most `format` values, OpenAI's strict mode requires closed objects with every property required. `target` emits the right dialect per connection — the clearest unserved gap in the OSS ecosystem when this library shipped it. + +## What it demonstrates + +- `generateTools({ target })` for `'claude' | 'openai' | 'gemini' | 'strict'` from one spec +- The test asserts each dialect's signature rule on the emitted schemas: collapsed root unions (Claude), zero `$ref` + demoted formats (Gemini), `additionalProperties: false` + all-required (OpenAI strict) +- Tool identity is dialect-independent — same names and operations everywhere + +## Run it + +```bash +yarn build && yarn test:e2e +``` + +The composable transforms behind each target (`inlineLocalRefs`, `collapseRootCompositions`, `enforceClosedObjects`, ...) are exported standalone too. + +Related docs: [Client Targets](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/client-targets.md) · [Response Schemas](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/response-schemas.md) diff --git a/examples/client-targets/example.e2e.ts b/examples/client-targets/example.e2e.ts new file mode 100644 index 0000000..f92ea38 --- /dev/null +++ b/examples/client-targets/example.e2e.ts @@ -0,0 +1,60 @@ +/** Executes the client-targets example and asserts each dialect's rules. */ +import { generateForClients } from './example'; + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +// A spec that trips every dialect rule: a root oneOf response, a $ref, a +// uuid format, and an optional property. +const spec: any = { + openapi: '3.0.0', + info: { title: 'Dialects API', version: '1.0.0' }, + components: { + schemas: { Item: { type: 'object', properties: { id: { type: 'string', format: 'uuid' }, note: { type: 'string' } } } }, + }, + paths: { + '/items/{id}': { + get: { + operationId: 'getItem', + parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string', format: 'uuid' } }], + responses: { + '200': { + description: 'OK', + content: { 'application/json': { schema: { $ref: '#/components/schemas/Item' } } }, + }, + '404': { + description: 'Missing', + content: { 'application/json': { schema: { type: 'object', properties: { message: { type: 'string' } } } } }, + }, + }, + }, + }, + }, +}; + +describe('example: client-targets', () => { + it('emits each provider dialect from the same spec', async () => { + const byTarget = await generateForClients(spec, ['claude', 'openai', 'gemini', 'strict']); + + // Claude: no top-level output unions — status variants collapse + const claude = byTarget['claude'][0]; + expect((claude.outputSchema as any).oneOf).toBeUndefined(); + + // Gemini: no $ref/$defs anywhere, formats demoted + const gemini = byTarget['gemini'][0]; + const geminiJson = JSON.stringify([gemini.inputSchema, gemini.outputSchema]); + expect(geminiJson).not.toContain('"$ref"'); + expect((gemini.inputSchema as any).properties.id.format).toBeUndefined(); + + // OpenAI strict contract: closed objects, every property required + for (const target of ['openai', 'strict'] as const) { + const root = byTarget[target][0].inputSchema as any; + expect(root.additionalProperties).toBe(false); + expect(root.required).toEqual(Object.keys(root.properties)); + } + + // Same operations, same names, regardless of dialect + for (const tools of Object.values(byTarget)) { + expect(tools.map((tool) => tool.name)).toEqual(['getItem']); + } + }); +}); diff --git a/examples/client-targets/example.ts b/examples/client-targets/example.ts new file mode 100644 index 0000000..92f51f6 --- /dev/null +++ b/examples/client-targets/example.ts @@ -0,0 +1,27 @@ +/** + * Client compatibility targets: one spec, four schema dialects. + * + * Every model provider accepts a different JSON Schema subset — Claude + * rejects top-level unions, Gemini rejects $ref/$defs and most formats, + * OpenAI strict mode wants closed objects with every property required. + * The `target` option emits the right dialect per connection. + */ +import { OpenAPIToolGenerator } from 'mcp-from-openapi'; +import type { ClientTarget, McpOpenAPITool, OpenAPIDocument } from 'mcp-from-openapi'; + +/** + * Generate the same tool set once per client dialect — e.g. serve `claude` + * tools to a Claude connection and `openai` tools to an OpenAI connection. + */ +export async function generateForClients( + spec: OpenAPIDocument, + targets: ClientTarget[], +): Promise> { + const result: Record = {}; + for (const target of targets) { + // A fresh generator per dialect keeps the transforms independent + const generator = await OpenAPIToolGenerator.fromJSON(spec); + result[target] = await generator.generateTools({ target }); + } + return result; +} diff --git a/examples/curation/README.md b/examples/curation/README.md new file mode 100644 index 0000000..6a579df --- /dev/null +++ b/examples/curation/README.md @@ -0,0 +1,21 @@ +# Curation: budgets, overlays, trimming, lint + +Model accuracy measurably degrades past ~30–40 tools, and raw tool definitions routinely cost ~1,000 tokens each. This example runs the full curation toolkit over a **real GitHub API subset** (78 operations, ~600k tokens raw) and produces a 20-tool curated slice at a fraction of the context bill. + +## What it demonstrates + +- `analyzeToolSet` — the context bill and curation warnings, before and after +- `lintDocument` — agent-readiness findings on a production spec (vague descriptions, unpaginated lists) +- `LoadOptions.overlays` — an OpenAPI Overlay 1.0 patch applied at load time, so hand-tuned descriptions survive spec regeneration instead of living in a fork +- Trimming (`stripExamples`, `maxDescriptionLength`, `maxProperties`, `maxSchemaDepth`) — the test asserts a >5× token reduction +- `includeTags` filtering — ship the slice the agent needs, not the phone book + +## Run it + +```bash +yarn build && yarn test:e2e +``` + +[example.e2e.ts](./example.e2e.ts) runs against the vendored real spec at [`e2e/fixtures/github-trimmed-3.0.json`](https://github.com/agentfront/mcp-from-openapi/blob/main/e2e/fixtures/github-trimmed-3.0.json) and asserts the overlay patch appears verbatim on the generated tool. + +Related docs: [Curation](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/curation.md) · [Configuration](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/configuration.md) diff --git a/examples/curation/example.e2e.ts b/examples/curation/example.e2e.ts new file mode 100644 index 0000000..3407e59 --- /dev/null +++ b/examples/curation/example.e2e.ts @@ -0,0 +1,41 @@ +/** Executes the curation example over the real (trimmed) GitHub spec. */ +import { loadJsonFixture } from '../../e2e/helpers/fixtures'; +import type { OpenAPIDocument } from 'mcp-from-openapi'; +import { curate } from './example'; + +describe('example: curation', () => { + it('shrinks a real API to a curated, patched, trimmed slice', async () => { + const spec = loadJsonFixture('github-trimmed-3.0.json'); + + const report = await curate(spec, { + tags: ['gists'], + overlays: { + overlay: '1.0.0', + info: { title: 'Gist curation', version: '1.0.0' }, + actions: [ + { + target: "$.paths['/gists/{gist_id}'].delete", + // Patch the SUMMARY — the default descriptionStrategy prefers it + update: { summary: 'Permanently deletes the gist for the authenticated user; returns 204 on success.' }, + }, + ], + }, + }); + + // The phone book: 78 tools, ~600k tokens, with budget warnings + expect(report.baseline.toolCount).toBe(78); + expect(report.baseline.estimatedTokens).toBeGreaterThan(500_000); + expect(report.baseline.warnings.length).toBeGreaterThan(0); + + // Lint surfaces real agent-readiness gaps in a production spec + expect(report.lint.counts.warning).toBeGreaterThan(0); + + // The menu: one tag, trimmed — a fraction of the bill + expect(report.curated).toHaveLength(20); + expect(report.curatedReport.estimatedTokens).toBeLessThan(report.baseline.estimatedTokens / 5); + + // The overlay patch landed on the generated tool + const deleteGist = report.curated.find((tool) => tool.metadata.path === '/gists/{gist_id}' && tool.metadata.method === 'delete'); + expect(deleteGist?.description).toContain('Permanently deletes the gist'); + }); +}); diff --git a/examples/curation/example.ts b/examples/curation/example.ts new file mode 100644 index 0000000..38e54ae --- /dev/null +++ b/examples/curation/example.ts @@ -0,0 +1,49 @@ +/** + * Curation: turning a phone book into a menu. + * + * Auto-converting a whole API degrades tool-calling accuracy past ~30-40 + * tools. This example measures the context bill, patches the spec with an + * OpenAPI Overlay (no fork needed), trims schemas, lints for agent + * readiness, and filters down to a curated slice. + */ +import { OpenAPIToolGenerator, analyzeToolSet, lintDocument } from 'mcp-from-openapi'; +import type { GenerateOptions, LintResult, McpOpenAPITool, OpenAPIDocument, OverlayDocument, ToolSetReport } from 'mcp-from-openapi'; + +export interface CurationReport { + baseline: ToolSetReport; + lint: LintResult; + curated: McpOpenAPITool[]; + curatedReport: ToolSetReport; +} + +const TRIMMING: GenerateOptions = { + stripExamples: true, // examples are the heaviest schema freight + maxDescriptionLength: 200, // cap prose, keep the lead sentence + maxProperties: 40, // drop pathological property lists (root inputs exempt) + maxSchemaDepth: 4, // deep response trees collapse with a note +}; + +/** + * Measure everything, then produce a curated tool set: overlay-patched, + * trimmed, and filtered to the given tags. + */ +export async function curate( + spec: OpenAPIDocument, + options: { tags: string[]; overlays?: OverlayDocument }, +): Promise { + // Baseline: what would shipping everything cost? + const everything = await (await OpenAPIToolGenerator.fromJSON(spec)).generateTools(); + const baseline = analyzeToolSet(everything); // warns past 40 tools / 10K per tool + + // Lint the RAW spec: vague descriptions, unpaginated lists, missing params + const lint = lintDocument(spec); + + // Overlays apply at load time, before validation — regeneration-safe spec + // patches instead of a forked document + const generator = await OpenAPIToolGenerator.fromJSON(spec, { + ...(options.overlays && { overlays: options.overlays }), + }); + const curated = await generator.generateTools({ ...TRIMMING, includeTags: options.tags }); + + return { baseline, lint, curated, curatedReport: analyzeToolSet(curated) }; +} diff --git a/examples/http-requests/README.md b/examples/http-requests/README.md new file mode 100644 index 0000000..8ce076e --- /dev/null +++ b/examples/http-requests/README.md @@ -0,0 +1,19 @@ +# HTTP requests from tool input + +The request pipeline with no framework at all: `tool input → buildHttpRequest → fetch`, in ~40 lines. This is the bridge every MCP runtime needs between a tool call and the API behind it — and the reason you never hand-write parameter serialization. + +## What it demonstrates + +- `buildHttpRequest` applying the mapper with the full OpenAPI serialization table — the test asserts `deepObject` (`filter[status]=active`) and `pipeDelimited` (`ids=1|2|3`) exactly as they hit the wire +- `SecurityResolver` + `createSecurityContext` resolving a bearer scheme into an `Authorization` header +- The clean split: request *assembly* is pure (`buildHttpRequest` sends nothing); execution is one `fetch` + +## Run it + +```bash +yarn build && yarn test:e2e +``` + +[example.e2e.ts](./example.e2e.ts) captures the raw request on a loopback server and asserts the serialized query string and headers byte-for-byte. + +Related docs: [Request Builder](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/request-builder.md) · [Security](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/security.md) · [Parameter Conflicts](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/parameter-conflicts.md) diff --git a/examples/http-requests/example.e2e.ts b/examples/http-requests/example.e2e.ts new file mode 100644 index 0000000..d84717d --- /dev/null +++ b/examples/http-requests/example.e2e.ts @@ -0,0 +1,57 @@ +/** Executes the http-requests example and asserts the wire traffic. */ +import { createLoopbackServer, type LoopbackHandler } from '../../src/__tests__/helpers/loopback'; +import { callTool, loadTools } from './example'; + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +const spec: any = { + openapi: '3.0.0', + info: { title: 'Search API', version: '1.0.0' }, + components: { securitySchemes: { bearerAuth: { type: 'http', scheme: 'bearer' } } }, + paths: { + '/search': { + get: { + operationId: 'search', + security: [{ bearerAuth: [] }], + parameters: [ + { name: 'filter', in: 'query', style: 'deepObject', explode: true, schema: { type: 'object', properties: { status: { type: 'string' } } } }, + { name: 'ids', in: 'query', style: 'pipeDelimited', explode: false, schema: { type: 'array', items: { type: 'integer' } } }, + ], + responses: { + '200': { + description: 'OK', + content: { 'application/json': { schema: { type: 'object', properties: { total: { type: 'integer' } } } } }, + }, + }, + }, + }, + }, +}; + +describe('example: http-requests', () => { + const handler: LoopbackHandler = (_req, res) => { + res.writeHead(200, { 'content-type': 'application/json' }); + res.end(JSON.stringify({ total: 2 })); + }; + const loopback = createLoopbackServer(() => handler); + + afterAll(() => loopback.close()); + + it('serializes styled parameters and credentials onto the wire', async () => { + const apiBaseUrl = await loopback.listen(); + const tools = await loadTools(spec); + const search = tools.get('search')!; + + const result = await callTool(search, { filter: { status: 'active' }, ids: [1, 2, 3] }, { + apiBaseUrl, + auth: { jwt: 'jwt-token' }, + }); + + expect(result).toEqual({ status: 200, body: { total: 2 } }); + const captured = loopback.requests.at(-1)!; + const params = new URL(`http://x${captured.url}`).searchParams; + expect(params.get('filter[status]')).toBe('active'); // deepObject + expect(params.get('ids')).toBe('1|2|3'); // pipeDelimited + expect(captured.headers.authorization).toBe('Bearer jwt-token'); + }); +}); diff --git a/examples/http-requests/example.ts b/examples/http-requests/example.ts new file mode 100644 index 0000000..026b26b --- /dev/null +++ b/examples/http-requests/example.ts @@ -0,0 +1,56 @@ +/** + * The request pipeline without any framework: generate tools, then turn tool + * input into a real HTTP call — buildHttpRequest applies the mapper with the + * full OpenAPI serialization table (styles, explode, bodies, cookies), and + * SecurityResolver supplies credentials. + */ +import { OpenAPIToolGenerator, SecurityResolver, buildHttpRequest, createSecurityContext } from 'mcp-from-openapi'; +import type { McpOpenAPITool, OpenAPIDocument, SecurityContext } from 'mcp-from-openapi'; + +export interface CallToolOptions { + apiBaseUrl: string; + auth?: Partial; +} + +/** Generate tools once; keep them keyed by name for dispatch. */ +export async function loadTools(spec: OpenAPIDocument): Promise> { + const generator = await OpenAPIToolGenerator.fromJSON(spec); + const tools = await generator.generateTools(); + return new Map(tools.map((tool) => [tool.name, tool])); +} + +/** + * Execute one tool call: mapper → request → fetch. This is everything an MCP + * (or any other) runtime needs to bridge tool input to the API. + */ +export async function callTool( + tool: McpOpenAPITool, + input: Record, + options: CallToolOptions, +): Promise<{ status: number; body: unknown }> { + // Resolve credentials for the tool's security schemes (no-op without any) + const security = await new SecurityResolver().resolve(tool.mapper, createSecurityContext(options.auth ?? {})); + + // Pure request assembly: url, method, headers (incl. Cookie), body — + // deepObject/pipeDelimited/multipart/... all handled from the mapper + const built = buildHttpRequest(tool, input, { baseUrl: options.apiBaseUrl }); + + const url = new URL(built.url); + for (const [key, value] of Object.entries(security.query)) url.searchParams.append(key, value); + + // Fold cookie-based credentials into the Cookie header, preserving any + // cookie parameters buildHttpRequest already composed + const headers: Record = { ...built.headers, ...security.headers }; + const securityCookies = Object.entries(security.cookies); + if (securityCookies.length > 0) { + const extra = securityCookies.map(([name, value]) => `${name}=${value}`).join('; '); + headers['Cookie'] = headers['Cookie'] ? `${headers['Cookie']}; ${extra}` : extra; + } + + const response = await fetch(url, { + method: built.method, + headers, + body: built.body as never, + }); + return { status: response.status, body: await response.json().catch(() => undefined) }; +} diff --git a/examples/quickstart-mcp-server/README.md b/examples/quickstart-mcp-server/README.md new file mode 100644 index 0000000..3aa3fe5 --- /dev/null +++ b/examples/quickstart-mcp-server/README.md @@ -0,0 +1,34 @@ +# Quickstart: OpenAPI spec → running MCP server + +The flagship journey in ~70 lines: turn an OpenAPI document into MCP tools, register them on the official `@modelcontextprotocol/sdk` server, and proxy every tool call to the real API with credentials resolved from the spec's security schemes. + +## What it demonstrates + +- `OpenAPIToolGenerator.fromJSON` → `generateTools` with `preferredStatusCodes` (single-object output schemas are what MCP structured content wants) +- `toSdkTool` — the generated tool dropped straight into the SDK's `tools/list` shape +- `SecurityResolver` + `createSecurityContext` — spec security schemes turned into concrete headers/query values +- `buildHttpRequest` — the mapper applied with full OpenAPI parameter serialization +- The structured-content contract: `structuredContent` only on success; error payloads stay in `content` with `isError: true` + +## Run it + +```bash +yarn build && yarn test:e2e # runs example.e2e.ts among the rest +``` + +The test ([example.e2e.ts](./example.e2e.ts)) spins up a local API, connects a real MCP `Client` over `InMemoryTransport`, calls the generated tool, and asserts the request that arrived on the wire — path templating and the `X-API-Key` header included. + +## Use it in your project + +```typescript +import { createMcpServer } from './example'; + +const { server } = await createMcpServer({ + spec: await fetch('https://api.example.com/openapi.json').then((r) => r.json()), + apiBaseUrl: 'https://api.example.com', + auth: { apiKey: process.env.API_KEY }, +}); +// connect `server` to your transport of choice (stdio, HTTP, ...) +``` + +Related docs: [Getting Started](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/getting-started.md) · [Security](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/security.md) · [Request Builder](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/request-builder.md) diff --git a/examples/quickstart-mcp-server/example.e2e.ts b/examples/quickstart-mcp-server/example.e2e.ts new file mode 100644 index 0000000..0c29af7 --- /dev/null +++ b/examples/quickstart-mcp-server/example.e2e.ts @@ -0,0 +1,72 @@ +/** Executes the quickstart example against a real loopback API. */ +import { Client } from '@modelcontextprotocol/sdk/client/index.js'; +import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js'; +import { createLoopbackServer, type LoopbackHandler } from '../../src/__tests__/helpers/loopback'; +import { createMcpServer } from './example'; + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +const spec: any = { + openapi: '3.0.0', + info: { title: 'Widget API', version: '1.0.0' }, + components: { securitySchemes: { apiAuth: { type: 'apiKey', name: 'X-API-Key', in: 'header' } } }, + paths: { + '/widgets/{widgetId}': { + get: { + operationId: 'getWidget', + security: [{ apiAuth: [] }], + parameters: [{ name: 'widgetId', in: 'path', required: true, schema: { type: 'string' } }], + responses: { + '200': { + description: 'OK', + content: { + 'application/json': { + schema: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' } }, required: ['id'] }, + }, + }, + }, + }, + }, + }, + }, +}; + +describe('example: quickstart-mcp-server', () => { + const widget = { id: 'w1', name: 'Flux Widget' }; + const handler: LoopbackHandler = (_req, res) => { + res.writeHead(200, { 'content-type': 'application/json' }); + res.end(JSON.stringify(widget)); + }; + const loopback = createLoopbackServer(() => handler); + + afterAll(() => loopback.close()); + + it('serves generated tools over MCP and proxies calls with credentials', async () => { + const apiBaseUrl = await loopback.listen(); + const { server, tools } = await createMcpServer({ spec, apiBaseUrl, auth: { apiKey: 'secret-key' } }); + expect(tools.map((t) => t.name)).toEqual(['getWidget']); + + const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair(); + await server.connect(serverTransport); + const client = new Client({ name: 'example-client', version: '1.0.0' }); + await client.connect(clientTransport); + try { + const listed = await client.listTools(); + expect(listed.tools.map((t) => t.name)).toEqual(['getWidget']); + + const result = await client.callTool({ name: 'getWidget', arguments: { widgetId: 'w1' } }); + expect(result.isError).toBe(false); + expect(result.structuredContent).toEqual(widget); + + const captured = loopback.requests.at(-1)!; + expect(captured.url).toBe('/widgets/w1'); + expect(captured.headers['x-api-key']).toBe('secret-key'); + + const unknown = await client.callTool({ name: 'nope', arguments: {} }); + expect(unknown.isError).toBe(true); + } finally { + await client.close(); + await server.close(); + } + }); +}); diff --git a/examples/quickstart-mcp-server/example.ts b/examples/quickstart-mcp-server/example.ts new file mode 100644 index 0000000..5bb3726 --- /dev/null +++ b/examples/quickstart-mcp-server/example.ts @@ -0,0 +1,96 @@ +/** + * Quickstart: OpenAPI spec → running MCP server. + * + * Generates MCP tools from a spec, registers them on the official + * @modelcontextprotocol/sdk low-level Server, and proxies every tool call to + * the real API — credentials resolved by SecurityResolver, requests built by + * buildHttpRequest with full OpenAPI parameter serialization. + */ +import { + OpenAPIToolGenerator, + SecurityResolver, + buildHttpRequest, + createSecurityContext, + toSdkTool, +} from 'mcp-from-openapi'; +import type { McpOpenAPITool, OpenAPIDocument, SecurityContext } from 'mcp-from-openapi'; +import { Server } from '@modelcontextprotocol/sdk/server/index.js'; +import { CallToolRequestSchema, ListToolsRequestSchema, type Tool } from '@modelcontextprotocol/sdk/types.js'; + +export interface QuickstartOptions { + /** OpenAPI document (or use fromURL/fromFile/fromYAML in your own code) */ + spec: OpenAPIDocument; + /** Where the real API lives */ + apiBaseUrl: string; + /** Credentials for the spec's security schemes, e.g. { apiKey: '...' } */ + auth?: Partial; +} + +export async function createMcpServer(options: QuickstartOptions): Promise<{ server: Server; tools: McpOpenAPITool[] }> { + // 1. Spec → tools. One preferred response per tool keeps output schemas + // MCP-friendly (structured content must be a single object shape). + const generator = await OpenAPIToolGenerator.fromJSON(options.spec); + const tools = await generator.generateTools({ preferredStatusCodes: [200, 201], includeAllResponses: false }); + const byName = new Map(tools.map((tool) => [tool.name, tool])); + + // 2. Credentials, resolved once — SecurityResolver turns the spec's + // security schemes + your context into concrete headers/query/cookies. + const resolver = new SecurityResolver(); + const securityContext = createSecurityContext(options.auth ?? {}); + + // 3. A standard MCP server: list advertises the generated tools verbatim, + // call proxies to the API. + const server = new Server({ name: 'openapi-mcp', version: '1.0.0' }, { capabilities: { tools: {} } }); + + server.setRequestHandler(ListToolsRequestSchema, async () => ({ + tools: tools.map((tool) => { + const [name, config] = toSdkTool(tool); + return { name, ...config } as Tool; + }), + })); + + server.setRequestHandler(CallToolRequestSchema, async (request) => { + const tool = byName.get(request.params.name); + if (!tool) { + return { content: [{ type: 'text', text: `Unknown tool: ${request.params.name}` }], isError: true }; + } + + const security = await resolver.resolve(tool.mapper, securityContext); + const built = buildHttpRequest(tool, (request.params.arguments ?? {}) as Record, { + baseUrl: options.apiBaseUrl, + }); + + const url = new URL(built.url); + for (const [key, value] of Object.entries(security.query)) url.searchParams.append(key, value); + const headers: Record = { ...built.headers, ...security.headers }; + const securityCookies = Object.entries(security.cookies); + if (securityCookies.length > 0) { + const extra = securityCookies.map(([name, value]) => `${name}=${value}`).join('; '); + headers['Cookie'] = headers['Cookie'] ? `${headers['Cookie']}; ${extra}` : extra; + } + const response = await fetch(url, { method: built.method, headers, body: built.body as never }); + + // Read the body ONCE and tolerate empty/text/HTML responses — real APIs + // return 204s and error pages, and a JSON parse crash here would surface + // as a protocol error instead of a tool result + const text = await response.text(); + let payload: unknown; + try { + payload = text === '' ? undefined : JSON.parse(text); + } catch { + payload = undefined; + } + const structured = + response.ok && payload !== null && typeof payload === 'object' && !Array.isArray(payload) + ? (payload as Record) + : undefined; + return { + content: [{ type: 'text', text: payload !== undefined ? JSON.stringify(payload) : text }], + // structuredContent describes SUCCESS object shapes — everything else stays in content + ...(structured && { structuredContent: structured }), + isError: !response.ok, + }; + }); + + return { server, tools }; +} diff --git a/examples/secure-loading/README.md b/examples/secure-loading/README.md new file mode 100644 index 0000000..013df9d --- /dev/null +++ b/examples/secure-loading/README.md @@ -0,0 +1,18 @@ +# Secure loading of untrusted specs + +Loading a spec by URL is an SSRF vector — a hostile spec URL (or a hostile external `$ref` inside a spec) can point at your cloud metadata endpoint or internal services. This library treats that as a first-class threat: CVE-2026-39885 was reported against this package and fixed with DNS pinning and redirect re-validation, and the hardening has been maintained since. + +## What it demonstrates + +- `fromURL` with `secureDefaults: true` — the one-flag hardened posture (redirects off, external `$ref` resolution off; explicitly-set options still win) +- Built-in SSRF blocking: the test proves `http://169.254.169.254/...` (cloud metadata) is rejected **before any connection**, surfacing as `SsrfError` +- Distinguishing hostile URLs (`SsrfError`) from broken specs (parse/validation errors) in error handling +- Host controls: `refResolution.allowedHosts` restricts loading to named hosts; `allowInternalIPs` disables private-range blocking **globally** and should only be enabled together with an allowlist when a trusted internal endpoint is intentionally required — the test pairs both to scope its exception to loopback + +## Run it + +```bash +yarn build && yarn test:e2e +``` + +Related docs: [SSRF Prevention](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/ssrf-prevention.md) · [Configuration](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/configuration.md) · [Error Handling](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/error-handling.md) diff --git a/examples/secure-loading/example.e2e.ts b/examples/secure-loading/example.e2e.ts new file mode 100644 index 0000000..10672c3 --- /dev/null +++ b/examples/secure-loading/example.e2e.ts @@ -0,0 +1,38 @@ +/** Executes the secure-loading example against loopback and hostile URLs. */ +import { createLoopbackServer, type LoopbackHandler } from '../../src/__tests__/helpers/loopback'; +import { loadUntrustedSpec, tryLoad } from './example'; + +const spec = { + openapi: '3.0.0', + info: { title: 'Public API', version: '1.0.0' }, + paths: { '/ping': { get: { operationId: 'ping', responses: { '200': { description: 'OK' } } } } }, +}; + +describe('example: secure-loading', () => { + const handler: LoopbackHandler = (_req, res) => { + res.writeHead(200, { 'content-type': 'application/json' }); + res.end(JSON.stringify(spec)); + }; + const loopback = createLoopbackServer(() => handler); + + afterAll(() => loopback.close()); + + it('blocks internal addresses by default and classifies the failure', async () => { + // Cloud metadata endpoint — the classic SSRF target + const result = await tryLoad('http://169.254.169.254/openapi.json'); + expect(result.ok).toBe(false); + if (!result.ok) { + expect(result.blocked).toBe(true); + } + }); + + it('loads from an explicitly allowed loopback host', async () => { + const baseUrl = await loopback.listen(); + // Internal access is opt-in, and the host allowlist restricts the + // exception to loopback — never disable the block globally on its own + const tools = await loadUntrustedSpec(`${baseUrl}/openapi.json`, { + refResolution: { allowInternalIPs: true, allowedHosts: ['127.0.0.1'] }, + }); + expect(tools.map((tool) => tool.name)).toEqual(['ping']); + }); +}); diff --git a/examples/secure-loading/example.ts b/examples/secure-loading/example.ts new file mode 100644 index 0000000..a1c78d8 --- /dev/null +++ b/examples/secure-loading/example.ts @@ -0,0 +1,38 @@ +/** + * Loading untrusted specs safely. + * + * `fromURL` ships SSRF protection: DNS resolution with connection pinning, + * internal/private address blocking (cloud metadata endpoints included), and + * per-hop redirect re-validation. `secureDefaults: true` is the recommended + * one-flag posture — redirects off, external $ref resolution disabled. + */ +import { OpenAPIToolGenerator, SsrfError } from 'mcp-from-openapi'; +import type { LoadOptions, McpOpenAPITool } from 'mcp-from-openapi'; + +/** + * Load a spec from an untrusted URL with the hardened posture, optionally + * pinned to an allowlist of hosts. + */ +export async function loadUntrustedSpec(url: string, options: Pick = {}): Promise { + const generator = await OpenAPIToolGenerator.fromURL(url, { + secureDefaults: true, // redirects off + external $refs off; explicit options still win + ...options, + }); + return generator.generateTools(); +} + +/** + * Classify a load failure: SSRF blocks throw `SsrfError`, so callers can + * distinguish "the URL was hostile" from "the spec was broken". + */ +export async function tryLoad(url: string): Promise<{ ok: true; tools: McpOpenAPITool[] } | { ok: false; blocked: boolean; message: string }> { + try { + return { ok: true, tools: await loadUntrustedSpec(url) }; + } catch (error) { + return { + ok: false, + blocked: error instanceof SsrfError, + message: error instanceof Error ? error.message : String(error), + }; + } +} diff --git a/examples/typed-tools/README.md b/examples/typed-tools/README.md new file mode 100644 index 0000000..c274ae1 --- /dev/null +++ b/examples/typed-tools/README.md @@ -0,0 +1,17 @@ +# Typed tools for code-execution surfaces + +Code-mode runtimes present an API as importable, typed functions the model calls from generated code — instead of pushing every tool's JSON into context (Anthropic measured ~98.7% token reduction for this pattern). This example builds that surface: namespaced names plus TypeScript call contracts. + +## What it demonstrates + +- `dottedNaming()` — two-segment `namespace.method` names (`billing.listInvoices`) that code sandboxes bind as `await billing.listInvoices({...})`; reserved sandbox globals are automatically suffixed +- `emitTypeSignatures` — `metadata.typescript = { signature, declaration }` computed on the final schemas: one-line signatures for compact listings, self-contained declarations with JSDoc for the full typed surface +- The output is *proven* TypeScript: the test compiles the concatenated declarations with the real compiler and asserts zero diagnostics + +## Run it + +```bash +yarn build && yarn test:e2e +``` + +Related docs: [Type Signatures](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/type-signatures.md) · [Naming Strategies](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/naming-strategies.md) diff --git a/examples/typed-tools/example.e2e.ts b/examples/typed-tools/example.e2e.ts new file mode 100644 index 0000000..76230eb --- /dev/null +++ b/examples/typed-tools/example.e2e.ts @@ -0,0 +1,71 @@ +/** Executes the typed-tools example and compiles its output with real tsc. */ +import * as ts from 'typescript'; +import { buildTypedSurface } from './example'; + +/* eslint-disable @typescript-eslint/no-explicit-any */ + +const spec: any = { + openapi: '3.0.0', + info: { title: 'Billing API', version: '1.0.0' }, + paths: { + '/invoices': { + get: { + operationId: 'listInvoices', + tags: ['billing'], + parameters: [{ name: 'limit', in: 'query', schema: { type: 'integer' } }], + responses: { + '200': { + description: 'OK', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { items: { type: 'array', items: { type: 'object', properties: { id: { type: 'string' } } } } }, + required: ['items'], + }, + }, + }, + }, + }, + }, + post: { + operationId: 'createInvoice', + tags: ['billing'], + requestBody: { + required: true, // otherwise the whole body — and its fields — are optional + content: { + 'application/json': { + schema: { type: 'object', properties: { amount: { type: 'number' } }, required: ['amount'] }, + }, + }, + }, + responses: { '201': { description: 'Created' } }, + }, + }, + }, +}; + +describe('example: typed-tools', () => { + it('emits namespaced names and compiling TypeScript contracts', async () => { + const surface = await buildTypedSurface(spec); + + // CodeCall-bindable ns.method names + expect(Object.keys(surface.signatures).sort()).toEqual(['billing.createInvoice', 'billing.listInvoices']); + expect(surface.signatures['billing.createInvoice']).toContain('amount: number'); + + // The concatenated declarations compile under the real TypeScript compiler + const options: ts.CompilerOptions = { noEmit: true, strict: true, skipLibCheck: true, lib: ['lib.es2022.d.ts'], types: [] }; + const host = ts.createCompilerHost(options); + const readFile = host.readFile.bind(host); + const fileExists = host.fileExists.bind(host); + const getSourceFile = host.getSourceFile.bind(host); + host.readFile = (name) => (name === 'surface.ts' ? surface.declarations : readFile(name)); + host.fileExists = (name) => name === 'surface.ts' || fileExists(name); + host.getSourceFile = (name, version, ...rest) => + name === 'surface.ts' ? ts.createSourceFile(name, surface.declarations, version, true) : getSourceFile(name, version, ...rest); + const diagnostics = ts.getPreEmitDiagnostics(ts.createProgram(['surface.ts'], options, host)); + expect(diagnostics.map((d) => ts.flattenDiagnosticMessageText(d.messageText, '\n'))).toEqual([]); + + expect(surface.declarations).toContain('declare function billingListInvoices'); + }); +}); diff --git a/examples/typed-tools/example.ts b/examples/typed-tools/example.ts new file mode 100644 index 0000000..e7233fe --- /dev/null +++ b/examples/typed-tools/example.ts @@ -0,0 +1,38 @@ +/** + * Typed tools for code-execution surfaces. + * + * Code-mode runtimes (like FrontMCP CodeCall) present tools as importable, + * typed functions instead of tool JSON — Anthropic measured ~98.7% token + * reduction for this pattern. Two features make it work: `dottedNaming` + * emits `namespace.method` names that bind as `await billing.listInvoices(...)`, + * and `emitTypeSignatures` renders each tool's call contract as TypeScript. + */ +import { OpenAPIToolGenerator, dottedNaming } from 'mcp-from-openapi'; +import type { McpOpenAPITool, OpenAPIDocument } from 'mcp-from-openapi'; + +export interface TypedSurface { + tools: McpOpenAPITool[]; + /** All declarations concatenated — a virtual .d.ts of the whole API */ + declarations: string; + /** One-line signatures keyed by tool name — compact listings for prompts */ + signatures: Record; +} + +export async function buildTypedSurface(spec: OpenAPIDocument): Promise { + const generator = await OpenAPIToolGenerator.fromJSON(spec); + const tools = await generator.generateTools({ + namingStrategy: dottedNaming(), // first tag -> namespace, operationId -> method + emitTypeSignatures: true, // metadata.typescript = { signature, declaration } + }); + + const signatures: Record = {}; + for (const tool of tools) { + signatures[tool.name] = tool.metadata.typescript!.signature; + } + + return { + tools, + declarations: tools.map((tool) => tool.metadata.typescript!.declaration).join('\n\n'), + signatures, + }; +} diff --git a/jest.e2e.config.js b/jest.e2e.config.js new file mode 100644 index 0000000..3da73c4 --- /dev/null +++ b/jest.e2e.config.js @@ -0,0 +1,24 @@ +/** + * E2E story suite: real fixtures, real loopback HTTP, real MCP SDK transport, + * and the built dist/ artifacts. No coverage — the 100% gate is a unit-suite + * contract owned by jest.config.js. Run with `yarn test:e2e` (the packaging + * story requires `yarn build` first). + */ +const base = require('./jest.config.js'); + +module.exports = { + displayName: 'mcp-from-openapi-e2e', + testEnvironment: 'node', + roots: ['/e2e', '/examples'], + testMatch: ['**/*.e2e.ts'], + // Examples import the real package name so they read exactly like consumer + // code; the runner maps it onto the source entrypoint. + moduleNameMapper: { '^mcp-from-openapi$': '/src/index.ts' }, + transform: base.transform, + // ref-parser is ESM-only and reached through src/generator.ts; the MCP SDK + // ships CJS (exports.require -> dist/cjs) and needs no allowlisting. + transformIgnorePatterns: base.transformIgnorePatterns, + moduleFileExtensions: base.moduleFileExtensions, + testTimeout: 30_000, + maxWorkers: '50%', +}; diff --git a/package.json b/package.json index 0068da1..05f2075 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "test": "jest", "test:unit": "jest --testPathIgnorePatterns='integration'", "test:integration": "jest --testPathPattern='integration'", + "test:e2e": "jest -c jest.e2e.config.js", "test:coverage": "jest --coverage", "clean": "rm -rf dist coverage", "prepublishOnly": "yarn clean && yarn build && yarn test" @@ -69,12 +70,14 @@ "zod": "^4.0.0" }, "devDependencies": { + "@modelcontextprotocol/sdk": "^1.30.0", "@swc/core": "~1.5.7", "@swc/helpers": "^0.5.18", "@swc/jest": "~0.2.38", "@types/jest": "^29.5.0", "@types/json-schema": "^7.0.15", "@types/node": "^24.0.0", + "ajv": "^8.17.0", "esbuild": "^0.27.2", "jest": "^29.7.0", "tslib": "^2.8.1", diff --git a/src/__tests__/generator.spec.ts b/src/__tests__/generator.spec.ts index 2896629..8b14e24 100644 --- a/src/__tests__/generator.spec.ts +++ b/src/__tests__/generator.spec.ts @@ -4,27 +4,7 @@ import { ParameterResolver } from '../parameter-resolver'; import { ResponseBuilder } from '../response-builder'; import { ParseError, LoadError } from '../errors'; import type { OpenAPIDocument } from '../types'; - -type LoopbackHandler = (req: import('http').IncomingMessage, res: import('http').ServerResponse) => void; - -/** - * Shared loopback HTTP server for URL-loading / pinned-transport tests. A real 127.0.0.1 server - * (paired with `allowInternalIPs`) replaces `global.fetch` / `$RefParser.dereference` mocks so the - * tests exercise the actual SSRF guard and Node connection pinning. See CLAUDE.md "Testing Patterns". - */ -function createLoopbackServer(getHandler: () => LoopbackHandler): { listen: () => Promise; close: () => Promise } { - const http = require('http') as typeof import('http'); - const server = http.createServer((req, res) => getHandler()(req, res)); - return { - listen: () => - new Promise((resolve) => - server.listen(0, '127.0.0.1', () => - resolve(`http://127.0.0.1:${(server.address() as import('net').AddressInfo).port}`), - ), - ), - close: () => new Promise((resolve) => server.close(() => resolve())), - }; -} +import { createLoopbackServer, type LoopbackHandler } from './helpers/loopback'; describe('OpenAPIToolGenerator', () => { const simpleOpenAPI: OpenAPIDocument = { diff --git a/src/__tests__/helpers/loopback.ts b/src/__tests__/helpers/loopback.ts new file mode 100644 index 0000000..6463a5b --- /dev/null +++ b/src/__tests__/helpers/loopback.ts @@ -0,0 +1,60 @@ +/** + * Shared loopback HTTP server for URL-loading, pinned-transport, and e2e wire + * tests. A real 127.0.0.1 server (paired with `allowInternalIPs`) replaces + * `global.fetch` / `$RefParser.dereference` mocks so tests exercise the actual + * SSRF guard, Node connection pinning, and — for e2e stories — the exact bytes + * a built request puts on the wire. See CLAUDE.md "Testing Patterns". + */ +import type { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'http'; + +/** + * Request handler. The third argument is the fully-buffered request body — + * handlers that only serve GETs can ignore it (two-param handlers remain + * assignable). + */ +export type LoopbackHandler = (req: IncomingMessage, res: ServerResponse, body: Buffer) => void; + +/** One request as received on the wire. */ +export interface CapturedRequest { + method: string; + /** Path + query exactly as received (raw — suitable for encoding assertions). */ + url: string; + headers: IncomingHttpHeaders; + body: Buffer; +} + +export interface LoopbackServer { + /** Bind 127.0.0.1:0 and resolve the `http://127.0.0.1:` base URL. */ + listen(): Promise; + close(): Promise; + /** Every request received, in arrival order. */ + readonly requests: CapturedRequest[]; + reset(): void; +} + +export function createLoopbackServer(getHandler: () => LoopbackHandler): LoopbackServer { + const http = require('http') as typeof import('http'); + const requests: CapturedRequest[] = []; + const server = http.createServer((req, res) => { + const chunks: Buffer[] = []; + req.on('data', (chunk: Buffer) => chunks.push(chunk)); + req.on('end', () => { + const body = Buffer.concat(chunks); + requests.push({ method: req.method ?? '', url: req.url ?? '', headers: req.headers, body }); + getHandler()(req, res, body); + }); + }); + return { + listen: () => + new Promise((resolve) => + server.listen(0, '127.0.0.1', () => + resolve(`http://127.0.0.1:${(server.address() as import('net').AddressInfo).port}`), + ), + ), + close: () => new Promise((resolve) => server.close(() => resolve())), + requests, + reset: () => { + requests.length = 0; + }, + }; +} diff --git a/src/__tests__/request-builder.spec.ts b/src/__tests__/request-builder.spec.ts index dcfd4b4..9d74e7e 100644 --- a/src/__tests__/request-builder.spec.ts +++ b/src/__tests__/request-builder.spec.ts @@ -857,3 +857,40 @@ describe('serialization defaults and hardening', () => { expect(buildHttpRequest(digestTool, { id: '1', digestAuth: 'rawcred' }).headers['Authorization']).toBe('rawcred'); }); }); + +describe('flattened multipart bodies with binary parts', () => { + it('builds FormData (not a raw binary body) when a body PART is binary', () => { + const tool: any = { + name: 'uploadFile', + description: 'd', + inputSchema: { type: 'object', properties: {} }, + mapper: [ + { inputKey: 'label', type: 'body', key: 'label', serialization: { contentType: 'multipart/form-data' } }, + { inputKey: 'file', type: 'body', key: 'file', serialization: { contentType: 'multipart/form-data', binary: true } }, + ], + metadata: { path: '/files', method: 'post' }, + }; + const built = buildHttpRequest(tool, { label: 'x', file: new Uint8Array([1, 2]) }, { baseUrl: 'http://h' }); + + expect(built.body).toBeInstanceOf(FormData); + expect(built.contentType).toBe('multipart/form-data'); + // no bare content-type header: the HTTP client must set the boundary + expect(Object.keys(built.headers).map((h) => h.toLowerCase())).not.toContain('content-type'); + }); + + it('keeps whole-body binary payloads raw', () => { + const tool: any = { + name: 'uploadRaw', + description: 'd', + inputSchema: { type: 'object', properties: {} }, + mapper: [ + { inputKey: 'body', type: 'body', key: 'body', wholeBody: true, serialization: { contentType: 'application/octet-stream', binary: true } }, + ], + metadata: { path: '/raw', method: 'post' }, + }; + const bytes = new Uint8Array([1, 2, 3]); + const built = buildHttpRequest(tool, { body: bytes }, { baseUrl: 'http://h' }); + expect(built.body).toBe(bytes); + expect(built.headers['content-type']).toBe('application/octet-stream'); + }); +}); diff --git a/src/__tests__/sdk.spec.ts b/src/__tests__/sdk.spec.ts index 8400a69..8c4d85b 100644 --- a/src/__tests__/sdk.spec.ts +++ b/src/__tests__/sdk.spec.ts @@ -14,7 +14,7 @@ const fullTool: McpOpenAPITool = { description: 'Lists items.', annotations: { readOnlyHint: true }, inputSchema: { type: 'object', properties: { q: { type: 'string' } } }, - outputSchema: { type: 'array', items: { type: 'string' } }, + outputSchema: { type: 'object', properties: { items: { type: 'array', items: { type: 'string' } } } }, mapper: [], metadata: { path: '/items', method: 'get' }, }; @@ -61,6 +61,25 @@ describe('toSdkTool', () => { expect((config.outputSchema as any).kind).toBe('wrapped'); }); + it('omits output schemas whose root is not type object (MCP requirement)', () => { + const arrayRoot: McpOpenAPITool = { + ...fullTool, + outputSchema: { type: 'array', items: { type: 'string' } }, + }; + expect('outputSchema' in toSdkTool(arrayRoot)[1]).toBe(false); + + const unionRoot: McpOpenAPITool = { + ...fullTool, + outputSchema: { oneOf: [{ type: 'object' }, { type: 'string' }] } as any, + }; + expect('outputSchema' in toSdkTool(unionRoot)[1]).toBe(false); + + // the wrapper is never invoked for an omitted output schema + const wrapped: unknown[] = []; + toSdkTool(arrayRoot, { fromJsonSchema: (s) => (wrapped.push(s), s) }); + expect(wrapped).toEqual([arrayRoot.inputSchema]); + }); + it('spreads into a registerTool-style call for generator output', async () => { const spec: any = { openapi: '3.0.0', diff --git a/src/__tests__/ssrf.spec.ts b/src/__tests__/ssrf.spec.ts index eff9a78..97148fb 100644 --- a/src/__tests__/ssrf.spec.ts +++ b/src/__tests__/ssrf.spec.ts @@ -1,6 +1,6 @@ import * as httpMod from 'node:http'; import * as httpsMod from 'node:https'; -import type { AddressInfo } from 'node:net'; +import { createLoopbackServer, type LoopbackHandler } from './helpers/loopback'; import { assertUrlSafe, safeFetch, @@ -40,29 +40,24 @@ const mockResponse = (r: MockRes) => }) as unknown as Response; // A shared real HTTP server on loopback, used by the connection-pinning tests. -let server: httpMod.Server; let serverPort: number; -let serverReceived: httpMod.IncomingMessage[] = []; -let serverHandler: (req: httpMod.IncomingMessage, res: httpMod.ServerResponse) => void = (_req, res) => { +let serverHandler: LoopbackHandler = (_req, res) => { res.writeHead(200); res.end('default'); }; +const loopback = createLoopbackServer(() => serverHandler); beforeAll(async () => { - server = httpMod.createServer((req, res) => { - serverReceived.push(req); - serverHandler(req, res); - }); - await new Promise((resolve) => server.listen(0, '127.0.0.1', () => resolve())); - serverPort = (server.address() as AddressInfo).port; + const baseUrl = await loopback.listen(); + serverPort = Number(new URL(baseUrl).port); }); afterAll(async () => { - await new Promise((resolve) => server.close(() => resolve())); + await loopback.close(); }); beforeEach(() => { - serverReceived = []; + loopback.reset(); }); describe('ssrf: isBlockedAddress (IP literal ranges)', () => { @@ -418,8 +413,8 @@ describe('ssrf: nodePinnedTransport (real server, connection pinning)', () => { expect(res.status).toBe(200); const body = JSON.parse(await res.text()); expect(body.host).toBe(`internal.pinned.invalid:${serverPort}`); - expect(serverReceived[0].url).toBe('/spec'); - expect(serverReceived[0].headers['x-test']).toBe('yes'); + expect(loopback.requests[0].url).toBe('/spec'); + expect(loopback.requests[0].headers['x-test']).toBe('yes'); }); it('connects directly (no pin) to a literal-IP URL', async () => { diff --git a/src/__tests__/types.spec.ts b/src/__tests__/types.spec.ts index 808bfcd..ef67ee6 100644 --- a/src/__tests__/types.spec.ts +++ b/src/__tests__/types.spec.ts @@ -622,3 +622,31 @@ describe('toJsonSchema 2020-12 keyword traversal', () => { expect(result.anyOf[1]).toEqual({ type: 'null' }); }); }); + +describe('toJsonSchema cycle safety', () => { + const { toJsonSchema } = require('../types'); + + it('breaks true cycles with an unconstrained schema instead of recursing forever', () => { + const message: any = { type: 'object', properties: {} }; + message.properties.referencedMessage = message; + const result: any = toJsonSchema(message); + expect(result.properties.referencedMessage).toEqual({}); + }); + + it('still converts diamond-shared nodes to fresh copies', () => { + const shared: any = { type: 'string', nullable: true }; + const doc: any = { type: 'object', properties: { a: shared, b: shared } }; + const result: any = toJsonSchema(doc); + expect(result.properties.a).toEqual({ type: ['string', 'null'] }); + expect(result.properties.b).toEqual({ type: ['string', 'null'] }); + expect(result.properties.a).not.toBe(result.properties.b); + }); + + it('breaks mutual cycles through composition keywords', () => { + const a: any = { type: 'object', properties: {} }; + const b: any = { anyOf: [a] }; + a.properties.b = b; + const result: any = toJsonSchema(a); + expect(result.properties.b.anyOf[0]).toEqual({}); + }); +}); diff --git a/src/__tests__/validator.spec.ts b/src/__tests__/validator.spec.ts index 1cdc4f0..02f6dc3 100644 --- a/src/__tests__/validator.spec.ts +++ b/src/__tests__/validator.spec.ts @@ -655,3 +655,167 @@ describe('Validator', () => { }); }); }); + +describe('path-item-level parameters', () => { + const { Validator } = require('../validator'); + + it('counts path-level parameters toward path template coverage', async () => { + const validator = new Validator(); + const result = await validator.validate({ + openapi: '3.0.0', + info: { title: 'T', version: '1.0.0' }, + paths: { + '/channels/{channel_id}': { + parameters: [{ name: 'channel_id', in: 'path', required: true, schema: { type: 'string' } }], + get: { operationId: 'getChannel', responses: { '200': { description: 'OK' } } }, + }, + }, + } as any); + expect(result.valid).toBe(true); + expect((result.errors ?? []).filter((e: any) => e.code === 'MISSING_PATH_PARAMETER')).toEqual([]); + }); + + it('validates path-level parameters with the path-item location', async () => { + const validator = new Validator(); + const result = await validator.validate({ + openapi: '3.0.0', + info: { title: 'T', version: '1.0.0' }, + paths: { + '/things/{id}': { + parameters: [ + { name: 'id', in: 'path', required: false, schema: { type: 'string' } }, + { name: 'filter', in: 'query' }, + ], + get: { operationId: 'getThing', responses: { '200': { description: 'OK' } } }, + }, + }, + } as any); + + // a non-required path-level path parameter satisfies coverage but is flagged + expect(result.errors ?? []).toContainEqual( + expect.objectContaining({ code: 'PATH_PARAMETER_NOT_REQUIRED', path: '/paths//things/{id}/parameters/0/required' }), + ); + expect((result.errors ?? []).some((e: any) => e.code === 'MISSING_PATH_PARAMETER')).toBe(false); + // a path-level parameter without schema/content is flagged at the path-item location + expect(result.errors ?? []).toContainEqual( + expect.objectContaining({ code: 'MISSING_PARAMETER_SCHEMA', path: '/paths//things/{id}/parameters/1' }), + ); + }); + + it('still flags genuinely undeclared path parameters', async () => { + const validator = new Validator(); + const result = await validator.validate({ + openapi: '3.0.0', + info: { title: 'T', version: '1.0.0' }, + paths: { + '/things/{id}': { + parameters: [{ name: 'other', in: 'query', schema: { type: 'string' } }], + get: { operationId: 'getThing', responses: { '200': { description: 'OK' } } }, + }, + }, + } as any); + expect(result.errors.some((e: any) => e.code === 'MISSING_PATH_PARAMETER')).toBe(true); + }); +}); + +describe('reference-object parameters', () => { + const { Validator: V } = require('../validator'); + + it('accepts valid path-level parameter references without false positives', async () => { + const result = await new V().validate({ + openapi: '3.0.0', + info: { title: 'T', version: '1.0.0' }, + components: { parameters: { Id: { name: 'id', in: 'path', required: true, schema: { type: 'string' } } } }, + paths: { + '/things/{id}': { + parameters: [{ $ref: '#/components/parameters/Id' }], + get: { operationId: 'getThing', responses: { '200': { description: 'OK' } } }, + }, + }, + } as any); + expect(result.valid).toBe(true); + expect(result.errors ?? []).toEqual([]); + }); + + it('accepts operation-level parameter references the same way', async () => { + const result = await new V().validate({ + openapi: '3.0.0', + info: { title: 'T', version: '1.0.0' }, + components: { parameters: { Id: { name: 'id', in: 'path', required: true, schema: { type: 'string' } } } }, + paths: { + '/things/{id}': { + get: { + operationId: 'getThing', + parameters: [{ $ref: '#/components/parameters/Id' }], + responses: { '200': { description: 'OK' } }, + }, + }, + }, + } as any); + expect(result.errors ?? []).toEqual([]); + }); + + it('does not let a resolvable query-param reference mask a missing path variable', async () => { + const result = await new V().validate({ + openapi: '3.0.0', + info: { title: 'T', version: '1.0.0' }, + components: { parameters: { Filter: { name: 'filter', in: 'query', schema: { type: 'string' } } } }, + paths: { + '/things/{id}': { + get: { + operationId: 'getThing', + parameters: [{ $ref: '#/components/parameters/Filter' }], + responses: { '200': { description: 'OK' } }, + }, + }, + }, + } as any); + expect((result.errors ?? []).some((e: any) => e.code === 'MISSING_PATH_PARAMETER')).toBe(true); + }); + + it('defers coverage only for unresolvable references', async () => { + for (const ref of ['./external.yaml#/components/parameters/Id', '#/components/parameters/Ghost']) { + const result = await new V().validate({ + openapi: '3.0.0', + info: { title: 'T', version: '1.0.0' }, + paths: { + '/things/{id}': { + get: { operationId: 'getThing', parameters: [{ $ref: ref }], responses: { '200': { description: 'OK' } } }, + }, + }, + } as any); + expect((result.errors ?? []).some((e: any) => e.code === 'MISSING_PATH_PARAMETER')).toBe(false); + } + }); + + it('resolves pointer-escaped component parameter names', async () => { + const result = await new V().validate({ + openapi: '3.0.0', + info: { title: 'T', version: '1.0.0' }, + components: { parameters: { 'a/b': { name: 'id', in: 'path', required: true, schema: { type: 'string' } } } }, + paths: { + '/things/{id}': { + get: { + operationId: 'getThing', + parameters: [{ $ref: '#/components/parameters/a~1b' }], + responses: { '200': { description: 'OK' } }, + }, + }, + }, + } as any); + expect((result.errors ?? []).some((e: any) => e.code === 'MISSING_PATH_PARAMETER')).toBe(false); + }); + + it('still flags missing path parameters when no references are involved', async () => { + const result = await new V().validate({ + openapi: '3.0.0', + info: { title: 'T', version: '1.0.0' }, + paths: { + '/things/{id}': { + get: { operationId: 'getThing', responses: { '200': { description: 'OK' } } }, + }, + }, + } as any); + expect((result.errors ?? []).some((e: any) => e.code === 'MISSING_PATH_PARAMETER')).toBe(true); + }); +}); diff --git a/src/request-builder.ts b/src/request-builder.ts index 2b58735..ea3be70 100644 --- a/src/request-builder.ts +++ b/src/request-builder.ts @@ -374,7 +374,9 @@ export function buildHttpRequest( case 'body': hasBody = true; contentType = contentType ?? mapper.serialization?.contentType ?? 'application/json'; - if (mapper.serialization?.binary) binaryBody = true; + // `binary` on a flattened param marks a FILE PART inside a multipart + // form; only a whole-body binary mapper makes the entire payload raw + if (mapper.serialization?.binary && mapper.wholeBody) binaryBody = true; if (mapper.wholeBody) { rawBody = value; } else { diff --git a/src/sdk.ts b/src/sdk.ts index db9f3cc..cdee909 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -42,12 +42,22 @@ export function toSdkTool( * Without a wrapper the config carries raw JSON Schemas — suitable for the * low-level v1 `Server` (`tools/list` handlers) or any framework that accepts * JSON Schema directly. This library never imports the SDK itself. + * + * MCP requires `outputSchema` to be a root `type: 'object'` schema + * (structured content is an object) — real SDK clients reject listings that + * violate this. Output schemas with any other root (arrays, scalars, and the + * `includeAllResponses` status-union roots) are therefore OMITTED from the + * SDK config; the full schema remains available on `tool.outputSchema`. */ export function toSdkTool( tool: McpOpenAPITool, wrapper?: SdkSchemaWrapper, ): [name: string, config: SdkToolConfig] { const wrapSchema = wrapper?.fromJsonSchema ?? ((schema: JsonSchema) => schema); + const outputSchema = + tool.outputSchema !== undefined && (tool.outputSchema as Record)['type'] === 'object' + ? tool.outputSchema + : undefined; return [ tool.name, @@ -55,7 +65,7 @@ export function toSdkTool( ...(tool.title !== undefined && { title: tool.title }), description: tool.description, inputSchema: wrapSchema(tool.inputSchema), - ...(tool.outputSchema !== undefined && { outputSchema: wrapSchema(tool.outputSchema) }), + ...(outputSchema !== undefined && { outputSchema: wrapSchema(outputSchema) }), ...(tool.annotations !== undefined && { annotations: tool.annotations }), }, ]; diff --git a/src/types.ts b/src/types.ts index 4b3e5e6..2da3935 100644 --- a/src/types.ts +++ b/src/types.ts @@ -72,9 +72,34 @@ export function isReferenceObject(obj: any): obj is ReferenceObject { * - OpenAPI-only `xml` metadata is dropped */ export function toJsonSchema(schema: SchemaObject | ReferenceObject): JsonSchema { + return convertSchema(schema, new Set()); +} + +/** + * Recursive core of `toJsonSchema`. `stack` holds the ancestors on the + * current path: dereferenced real-world specs can be cyclic (self-referential + * schemas), and a revisit within the same path breaks the cycle with an + * unconstrained schema instead of recursing forever. Diamond-shared nodes are + * NOT cached — every occurrence still converts to a fresh copy, because + * downstream steps annotate parameter schemas in place. + */ +function convertSchema(schema: SchemaObject | ReferenceObject, stack: Set): JsonSchema { if (isReferenceObject(schema)) { return { $ref: schema.$ref } as JsonSchema; } + if (stack.has(schema as object)) { + return {} as JsonSchema; + } + stack.add(schema as object); + try { + return convertSchemaInner(schema, stack); + } finally { + stack.delete(schema as object); + } +} + +function convertSchemaInner(schema: SchemaObject, stack: Set): JsonSchema { + const recurse = (value: SchemaObject | ReferenceObject): JsonSchema => convertSchema(value, stack); // Handle OpenAPI 3.0 boolean exclusiveMaximum/exclusiveMinimum // by converting them to JSON Schema Draft 7 numeric format @@ -160,31 +185,31 @@ export function toJsonSchema(schema: SchemaObject | ReferenceObject): JsonSchema if (result['properties'] && typeof result['properties'] === 'object') { const props: Record = {}; for (const [key, value] of Object.entries(result['properties'] as Record)) { - props[key] = toJsonSchema(value); + props[key] = recurse(value); } result['properties'] = props; } if (result['items']) { if (Array.isArray(result['items'])) { - result['items'] = (result['items'] as (SchemaObject | ReferenceObject)[]).map(toJsonSchema); + result['items'] = (result['items'] as (SchemaObject | ReferenceObject)[]).map(recurse); } else { - result['items'] = toJsonSchema(result['items'] as SchemaObject | ReferenceObject); + result['items'] = recurse(result['items'] as SchemaObject | ReferenceObject); } } if (result['additionalProperties'] && typeof result['additionalProperties'] === 'object') { - result['additionalProperties'] = toJsonSchema(result['additionalProperties'] as SchemaObject | ReferenceObject); + result['additionalProperties'] = recurse(result['additionalProperties'] as SchemaObject | ReferenceObject); } for (const key of ['allOf', 'anyOf', 'oneOf'] as const) { if (result[key] && Array.isArray(result[key])) { - result[key] = (result[key] as (SchemaObject | ReferenceObject)[]).map(toJsonSchema); + result[key] = (result[key] as (SchemaObject | ReferenceObject)[]).map(recurse); } } if (result['not']) { - result['not'] = toJsonSchema(result['not'] as SchemaObject | ReferenceObject); + result['not'] = recurse(result['not'] as SchemaObject | ReferenceObject); } // Remaining JSON Schema 2020-12 structural keywords, so nested `nullable`/ @@ -195,7 +220,7 @@ export function toJsonSchema(schema: SchemaObject | ReferenceObject): JsonSchema if (value && typeof value === 'object' && !Array.isArray(value)) { const mapped: Record = {}; for (const [name, sub] of Object.entries(value as Record)) { - mapped[name] = toJsonSchema(sub); + mapped[name] = recurse(sub); } result[key] = mapped; } @@ -213,12 +238,12 @@ export function toJsonSchema(schema: SchemaObject | ReferenceObject): JsonSchema ] as const) { const value = result[key]; if (value && typeof value === 'object') { - result[key] = toJsonSchema(value as SchemaObject | ReferenceObject); + result[key] = recurse(value as SchemaObject | ReferenceObject); } } // Array-of-schemas keyword: if (Array.isArray(result['prefixItems'])) { - result['prefixItems'] = (result['prefixItems'] as (SchemaObject | ReferenceObject)[]).map(toJsonSchema); + result['prefixItems'] = (result['prefixItems'] as (SchemaObject | ReferenceObject)[]).map(recurse); } if (wrapNullable) { diff --git a/src/validator.ts b/src/validator.ts index d898c16..ce764ba 100644 --- a/src/validator.ts +++ b/src/validator.ts @@ -58,7 +58,9 @@ export class Validator { code: 'NO_PATHS', }); } else { - this.validatePaths(document.paths, errors, warnings); + const componentParameters = + (document as { components?: { parameters?: Record } }).components?.parameters ?? {}; + this.validatePaths(document.paths, componentParameters, errors, warnings); } // Check servers @@ -96,8 +98,21 @@ export class Validator { /** * Validate paths */ + /** + * Resolve a local `#/components/parameters/` reference (JSON Pointer + * tokens decoded). Returns undefined for external or dangling references. + */ + private resolveParameterRef(param: any, componentParameters: Record): any { + if (!param || typeof param !== 'object' || !('$ref' in param)) return param; + const match = /^#\/components\/parameters\/(.+)$/.exec(String(param.$ref)); + if (!match) return undefined; + const name = match[1].replace(/~1/g, '/').replace(/~0/g, '~'); + return componentParameters[name]; + } + private validatePaths( paths: Record, + componentParameters: Record, errors: ValidationErrorDetail[], warnings: ValidationWarning[] ): void { @@ -117,11 +132,19 @@ export class Validator { const methods = ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace']; let hasOperations = false; + // Path-item-level parameters apply to every operation (OpenAPI 4.8.9). + // They get their own validation pass (their location is the path item, + // not any single operation) before contributing to template coverage. + const pathLevelParameters = Array.isArray(pathItem.parameters) ? pathItem.parameters : []; + if (pathLevelParameters.length > 0) { + this.validateParameters(pathLevelParameters, `/paths/${path}/parameters`, errors, warnings); + } + for (const method of methods) { const operation = pathItem[method]; if (operation) { hasOperations = true; - this.validateOperation(operation, path, method, errors, warnings); + this.validateOperation(operation, path, method, errors, warnings, pathLevelParameters, componentParameters); } } @@ -143,7 +166,9 @@ export class Validator { path: string, method: string, errors: ValidationErrorDetail[], - warnings: ValidationWarning[] + warnings: ValidationWarning[], + pathLevelParameters: any[] = [], + componentParameters: Record = {} ): void { const basePath = `/paths/${path}/${method}`; @@ -167,19 +192,26 @@ export class Validator { // Validate parameters if (operation.parameters) { - this.validateParameters(operation.parameters, path, method, errors, warnings); + this.validateParameters(operation.parameters, `${basePath}/parameters`, errors, warnings); } - // Check for path parameters in path string + // Check for path parameters in path string. Path-item-level parameters + // count too — the spec merges them into every operation. Local + // `#/components/parameters/...` references are resolved so a query-param + // ref cannot mask a missing path variable; only refs that CANNOT be + // resolved here (external or dangling) defer the check to the + // dereferenced validation pass in initialize(). + const allParameters = [...pathLevelParameters, ...(operation.parameters ?? [])].map((p: any) => + this.resolveParameterRef(p, componentParameters), + ); + const hasUnresolvableRefs = allParameters.some((p: any) => p === undefined); const pathParams = path.match(/\{([^{}]+)\}/g)?.map((p) => p.slice(1, -1)) ?? []; const definedPathParams = new Set( - operation.parameters - ?.filter((p: any) => p.in === 'path') - .map((p: any) => p.name) ?? [] + allParameters.filter((p: any) => p && p.in === 'path').map((p: any) => p.name) ); for (const param of pathParams) { - if (!definedPathParams.has(param)) { + if (!hasUnresolvableRefs && !definedPathParams.has(param)) { errors.push({ message: `Path parameter '${param}' not defined in parameters: ${method.toUpperCase()} ${path}`, path: `${basePath}/parameters`, @@ -194,17 +226,21 @@ export class Validator { */ private validateParameters( parameters: any[], - path: string, - method: string, + basePath: string, errors: ValidationErrorDetail[], warnings: ValidationWarning[] ): void { - const basePath = `/paths/${path}/${method}/parameters`; for (let i = 0; i < parameters.length; i++) { const param = parameters[i]; const paramPath = `${basePath}/${i}`; + // Reference Objects are opaque until dereferenced (initialize() resolves + // them before its validation pass) — structural checks don't apply + if (param && typeof param === 'object' && '$ref' in param) { + continue; + } + if (!param.name) { errors.push({ message: 'Parameter missing name', diff --git a/yarn.lock b/yarn.lock index e2cda44..6e51422 100644 --- a/yarn.lock +++ b/yarn.lock @@ -575,6 +575,15 @@ __metadata: languageName: node linkType: hard +"@hono/node-server@npm:^1.19.9 || ^2.0.5": + version: 2.1.0 + resolution: "@hono/node-server@npm:2.1.0" + peerDependencies: + hono: ^4 + checksum: 10c0/907aa2cabb804cf6f9c6bc329a898803b0794992d1c2d1bea7e4ae803f5d205fd2733d684c9c87b28338964dc437341e3bee1544b4d504a6b19f9e65ba28b198 + languageName: node + linkType: hard + "@isaacs/fs-minipass@npm:^4.0.0": version: 4.0.1 resolution: "@isaacs/fs-minipass@npm:4.0.1" @@ -921,6 +930,39 @@ __metadata: languageName: node linkType: hard +"@modelcontextprotocol/sdk@npm:^1.30.0": + version: 1.30.0 + resolution: "@modelcontextprotocol/sdk@npm:1.30.0" + dependencies: + "@hono/node-server": "npm:^1.19.9 || ^2.0.5" + ajv: "npm:^8.17.1" + ajv-formats: "npm:^3.0.1" + content-type: "npm:^1.0.5" + cors: "npm:^2.8.5" + cross-spawn: "npm:^7.0.5" + eventsource: "npm:^3.0.2" + eventsource-parser: "npm:^3.0.0" + express: "npm:^5.2.1" + express-rate-limit: "npm:^8.2.1" + hono: "npm:^4.11.4" + jose: "npm:^6.1.3" + json-schema-typed: "npm:^8.0.2" + pkce-challenge: "npm:^5.0.0" + raw-body: "npm:^3.0.0" + zod: "npm:^3.25 || ^4.0" + zod-to-json-schema: "npm:^3.25.1" + peerDependencies: + "@cfworker/json-schema": ^4.1.1 + zod: ^3.25 || ^4.0 + peerDependenciesMeta: + "@cfworker/json-schema": + optional: true + zod: + optional: false + checksum: 10c0/6d12d5c88048b42b0d64906222f804eecbfc0aae02fc42a200d2438f037276cc7863510a8ce649e82c96d5972f62a58bfbdedf79624b0558a607738f5e58b97e + languageName: node + linkType: hard + "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8" @@ -1247,6 +1289,42 @@ __metadata: languageName: node linkType: hard +"accepts@npm:^2.0.0": + version: 2.0.0 + resolution: "accepts@npm:2.0.0" + dependencies: + mime-types: "npm:^3.0.0" + negotiator: "npm:^1.0.0" + checksum: 10c0/98374742097e140891546076215f90c32644feacf652db48412329de4c2a529178a81aa500fbb13dd3e6cbf6e68d829037b123ac037fc9a08bcec4b87b358eef + languageName: node + linkType: hard + +"ajv-formats@npm:^3.0.1": + version: 3.0.1 + resolution: "ajv-formats@npm:3.0.1" + dependencies: + ajv: "npm:^8.0.0" + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + checksum: 10c0/168d6bca1ea9f163b41c8147bae537e67bd963357a5488a1eaf3abe8baa8eec806d4e45f15b10767e6020679315c7e1e5e6803088dfb84efa2b4e9353b83dd0a + languageName: node + linkType: hard + +"ajv@npm:^8.0.0, ajv@npm:^8.17.0, ajv@npm:^8.17.1": + version: 8.20.0 + resolution: "ajv@npm:8.20.0" + dependencies: + fast-deep-equal: "npm:^3.1.3" + fast-uri: "npm:^3.0.1" + json-schema-traverse: "npm:^1.0.0" + require-from-string: "npm:^2.0.2" + checksum: 10c0/5df9a1c8f83863cde1bd3a9ddb426f599718f88e3dc9153616c79fb28e0be455335830d7f21d745576519f057b371352daa31047b6a33d7036fe08777d60cf2a + languageName: node + linkType: hard + "ansi-escapes@npm:^4.2.1": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" @@ -1305,6 +1383,20 @@ __metadata: languageName: node linkType: hard +"async-function@npm:^1.0.0": + version: 1.0.0 + resolution: "async-function@npm:1.0.0" + checksum: 10c0/669a32c2cb7e45091330c680e92eaeb791bc1d4132d827591e499cd1f776ff5a873e77e5f92d0ce795a8d60f10761dec9ddfe7225a5de680f5d357f67b1aac73 + languageName: node + linkType: hard + +"async-generator-function@npm:^1.0.0": + version: 1.0.0 + resolution: "async-generator-function@npm:1.0.0" + checksum: 10c0/2c50ef856c543ad500d8d8777d347e3c1ba623b93e99c9263ecc5f965c1b12d2a140e2ab6e43c3d0b85366110696f28114649411cbcd10b452a92a2318394186 + languageName: node + linkType: hard + "babel-jest@npm:^29.7.0": version: 29.7.0 resolution: "babel-jest@npm:29.7.0" @@ -1400,6 +1492,23 @@ __metadata: languageName: node linkType: hard +"body-parser@npm:^2.2.1": + version: 2.3.0 + resolution: "body-parser@npm:2.3.0" + dependencies: + bytes: "npm:^3.1.2" + content-type: "npm:^2.0.0" + debug: "npm:^4.4.3" + http-errors: "npm:^2.0.1" + iconv-lite: "npm:^0.7.2" + on-finished: "npm:^2.4.1" + qs: "npm:^6.15.2" + raw-body: "npm:^3.0.2" + type-is: "npm:^2.1.0" + checksum: 10c0/2a8fbbdc471b588338555a3e1a597d1eb0ad0c21cf20fdc3bac5d3f8d9c3a4b19b4163575ab852a43a5dfc0df7770ced5284f979e561f1a24c2f851ce89e695a + languageName: node + linkType: hard + "brace-expansion@npm:^1.1.7": version: 1.1.18 resolution: "brace-expansion@npm:1.1.18" @@ -1450,6 +1559,33 @@ __metadata: languageName: node linkType: hard +"bytes@npm:^3.1.2, bytes@npm:~3.1.2": + version: 3.1.2 + resolution: "bytes@npm:3.1.2" + checksum: 10c0/76d1c43cbd602794ad8ad2ae94095cddeb1de78c5dddaa7005c51af10b0176c69971a6d88e805a90c2b6550d76636e43c40d8427a808b8645ede885de4a0358e + languageName: node + linkType: hard + +"call-bind-apply-helpers@npm:^1.0.1, call-bind-apply-helpers@npm:^1.0.2": + version: 1.0.2 + resolution: "call-bind-apply-helpers@npm:1.0.2" + dependencies: + es-errors: "npm:^1.3.0" + function-bind: "npm:^1.1.2" + checksum: 10c0/47bd9901d57b857590431243fea704ff18078b16890a6b3e021e12d279bbf211d039155e27d7566b374d49ee1f8189344bac9833dec7a20cdec370506361c938 + languageName: node + linkType: hard + +"call-bound@npm:^1.0.2": + version: 1.0.4 + resolution: "call-bound@npm:1.0.4" + dependencies: + call-bind-apply-helpers: "npm:^1.0.2" + get-intrinsic: "npm:^1.3.0" + checksum: 10c0/f4796a6a0941e71c766aea672f63b72bc61234c4f4964dc6d7606e3664c307e7d77845328a8f3359ce39ddb377fed67318f9ee203dea1d47e46165dcf2917644 + languageName: node + linkType: hard + "callsites@npm:^3.0.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" @@ -1564,6 +1700,27 @@ __metadata: languageName: node linkType: hard +"content-disposition@npm:^1.0.0": + version: 1.1.0 + resolution: "content-disposition@npm:1.1.0" + checksum: 10c0/94e0aef65873e69330f5f187fbc44ebce593bdcb8013dd8a68b7d0f159ca089bd30db3f8095d829f81c341695b60a6085ee6e15e6d775c4a325b586cc8d91974 + languageName: node + linkType: hard + +"content-type@npm:^1.0.5": + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: 10c0/b76ebed15c000aee4678c3707e0860cb6abd4e680a598c0a26e17f0bfae723ec9cc2802f0ff1bc6e4d80603719010431d2231018373d4dde10f9ccff9dadf5af + languageName: node + linkType: hard + +"content-type@npm:^2.0.0": + version: 2.0.0 + resolution: "content-type@npm:2.0.0" + checksum: 10c0/491539fff707d7594b0ca4fabcc084bef2a31ffa754ff0a4f80c4377e3963cff0394317f9271c24087596c97fa675bc123d61fa34ffe65b4904e7d3d3098de72 + languageName: node + linkType: hard + "convert-source-map@npm:^2.0.0": version: 2.0.0 resolution: "convert-source-map@npm:2.0.0" @@ -1571,6 +1728,30 @@ __metadata: languageName: node linkType: hard +"cookie-signature@npm:^1.2.1": + version: 1.2.2 + resolution: "cookie-signature@npm:1.2.2" + checksum: 10c0/54e05df1a293b3ce81589b27dddc445f462f6fa6812147c033350cd3561a42bc14481674e05ed14c7bd0ce1e8bb3dc0e40851bad75415733711294ddce0b7bc6 + languageName: node + linkType: hard + +"cookie@npm:^0.7.1": + version: 0.7.2 + resolution: "cookie@npm:0.7.2" + checksum: 10c0/9596e8ccdbf1a3a88ae02cf5ee80c1c50959423e1022e4e60b91dd87c622af1da309253d8abdb258fb5e3eacb4f08e579dc58b4897b8087574eee0fd35dfa5d2 + languageName: node + linkType: hard + +"cors@npm:^2.8.5": + version: 2.8.6 + resolution: "cors@npm:2.8.6" + dependencies: + object-assign: "npm:^4" + vary: "npm:^1" + checksum: 10c0/ab2bc57b8af8ef8476682a59647f7c55c1a7d406b559ac06119aa1c5f70b96d35036864d197b24cf86e228e4547231088f1f94ca05061dbb14d89cc0bc9d4cab + languageName: node + linkType: hard + "create-jest@npm:^29.7.0": version: 29.7.0 resolution: "create-jest@npm:29.7.0" @@ -1588,7 +1769,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.5": version: 7.0.6 resolution: "cross-spawn@npm:7.0.6" dependencies: @@ -1599,7 +1780,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1": +"debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.4.0, debug@npm:^4.4.3": version: 4.4.3 resolution: "debug@npm:4.4.3" dependencies: @@ -1630,6 +1811,13 @@ __metadata: languageName: node linkType: hard +"depd@npm:^2.0.0, depd@npm:~2.0.0": + version: 2.0.0 + resolution: "depd@npm:2.0.0" + checksum: 10c0/58bd06ec20e19529b06f7ad07ddab60e504d9e0faca4bd23079fac2d279c3594334d736508dc350e06e510aba5e22e4594483b3a6562ce7c17dd797f4cc4ad2c + languageName: node + linkType: hard + "detect-newline@npm:^3.0.0": version: 3.1.0 resolution: "detect-newline@npm:3.1.0" @@ -1644,6 +1832,24 @@ __metadata: languageName: node linkType: hard +"dunder-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "dunder-proto@npm:1.0.1" + dependencies: + call-bind-apply-helpers: "npm:^1.0.1" + es-errors: "npm:^1.3.0" + gopd: "npm:^1.2.0" + checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031 + languageName: node + linkType: hard + +"ee-first@npm:1.1.1": + version: 1.1.1 + resolution: "ee-first@npm:1.1.1" + checksum: 10c0/b5bb125ee93161bc16bfe6e56c6b04de5ad2aa44234d8f644813cc95d861a6910903132b05093706de2b706599367c4130eb6d170f6b46895686b95f87d017b7 + languageName: node + linkType: hard + "electron-to-chromium@npm:^1.5.263": version: 1.5.267 resolution: "electron-to-chromium@npm:1.5.267" @@ -1665,6 +1871,13 @@ __metadata: languageName: node linkType: hard +"encodeurl@npm:^2.0.0": + version: 2.0.0 + resolution: "encodeurl@npm:2.0.0" + checksum: 10c0/5d317306acb13e6590e28e27924c754163946a2480de11865c991a3a7eed4315cd3fba378b543ca145829569eefe9b899f3d84bb09870f675ae60bc924b01ceb + languageName: node + linkType: hard + "env-paths@npm:^2.2.0": version: 2.2.1 resolution: "env-paths@npm:2.2.1" @@ -1681,6 +1894,29 @@ __metadata: languageName: node linkType: hard +"es-define-property@npm:^1.0.1": + version: 1.0.1 + resolution: "es-define-property@npm:1.0.1" + checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c + languageName: node + linkType: hard + +"es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 + languageName: node + linkType: hard + +"es-object-atoms@npm:^1.0.0, es-object-atoms@npm:^1.1.1": + version: 1.1.2 + resolution: "es-object-atoms@npm:1.1.2" + dependencies: + es-errors: "npm:^1.3.0" + checksum: 10c0/1772861f094f739d6f41b579cfb9a18579daffeb434552a370a5fbef50a32d22227e27b63fdbb757b7ddd429d1b42fe52ccae7966d9302a2ec221b6f1b41bbc4 + languageName: node + linkType: hard + "esbuild@npm:^0.27.2": version: 0.27.7 resolution: "esbuild@npm:0.27.7" @@ -1777,6 +2013,13 @@ __metadata: languageName: node linkType: hard +"escape-html@npm:^1.0.3": + version: 1.0.3 + resolution: "escape-html@npm:1.0.3" + checksum: 10c0/524c739d776b36c3d29fa08a22e03e8824e3b2fd57500e5e44ecf3cc4707c34c60f9ca0781c0e33d191f2991161504c295e98f68c78fe7baa6e57081ec6ac0a3 + languageName: node + linkType: hard + "escape-string-regexp@npm:^2.0.0": version: 2.0.0 resolution: "escape-string-regexp@npm:2.0.0" @@ -1794,6 +2037,29 @@ __metadata: languageName: node linkType: hard +"etag@npm:^1.8.1": + version: 1.8.1 + resolution: "etag@npm:1.8.1" + checksum: 10c0/12be11ef62fb9817314d790089a0a49fae4e1b50594135dcb8076312b7d7e470884b5100d249b28c18581b7fd52f8b485689ffae22a11ed9ec17377a33a08f84 + languageName: node + linkType: hard + +"eventsource-parser@npm:^3.0.0, eventsource-parser@npm:^3.0.1": + version: 3.1.1 + resolution: "eventsource-parser@npm:3.1.1" + checksum: 10c0/dd3236c61140587253dcaaf947de528ac0e7371caffdc53c77afaeee36a17661f00e251a6ea16af56c99be5ac138303e67b5d750630e7c41b02e3564e8ad8c44 + languageName: node + linkType: hard + +"eventsource@npm:^3.0.2": + version: 3.0.7 + resolution: "eventsource@npm:3.0.7" + dependencies: + eventsource-parser: "npm:^3.0.1" + checksum: 10c0/c48a73c38f300e33e9f11375d4ee969f25cbb0519608a12378a38068055ae8b55b6e0e8a49c3f91c784068434efe1d9f01eb49b6315b04b0da9157879ce2f67d + languageName: node + linkType: hard + "execa@npm:^5.0.0": version: 5.1.1 resolution: "execa@npm:5.1.1" @@ -1838,6 +2104,61 @@ __metadata: languageName: node linkType: hard +"express-rate-limit@npm:^8.2.1": + version: 8.6.2 + resolution: "express-rate-limit@npm:8.6.2" + dependencies: + debug: "npm:^4.4.3" + ip-address: "npm:^10.2.0" + peerDependencies: + express: ">= 4.11" + checksum: 10c0/34dba96f7daa01fe9f73a965c0ddaa73bf83d2cb1691ed5e060451ddacebc10fda211a3cf0c34592cf0360bf00d6d9354f3e11ccda7c899705ec1e43383c3144 + languageName: node + linkType: hard + +"express@npm:^5.2.1": + version: 5.2.1 + resolution: "express@npm:5.2.1" + dependencies: + accepts: "npm:^2.0.0" + body-parser: "npm:^2.2.1" + content-disposition: "npm:^1.0.0" + content-type: "npm:^1.0.5" + cookie: "npm:^0.7.1" + cookie-signature: "npm:^1.2.1" + debug: "npm:^4.4.0" + depd: "npm:^2.0.0" + encodeurl: "npm:^2.0.0" + escape-html: "npm:^1.0.3" + etag: "npm:^1.8.1" + finalhandler: "npm:^2.1.0" + fresh: "npm:^2.0.0" + http-errors: "npm:^2.0.0" + merge-descriptors: "npm:^2.0.0" + mime-types: "npm:^3.0.0" + on-finished: "npm:^2.4.1" + once: "npm:^1.4.0" + parseurl: "npm:^1.3.3" + proxy-addr: "npm:^2.0.7" + qs: "npm:^6.14.0" + range-parser: "npm:^1.2.1" + router: "npm:^2.2.0" + send: "npm:^1.1.0" + serve-static: "npm:^2.2.0" + statuses: "npm:^2.0.1" + type-is: "npm:^2.0.1" + vary: "npm:^1.1.2" + checksum: 10c0/45e8c841ad188a41402ddcd1294901e861ee0819f632fb494f2ed344ef9c43315d294d443fb48d594e6586a3b779785120f43321417adaef8567316a55072949 + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0 + languageName: node + linkType: hard + "fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -1845,6 +2166,13 @@ __metadata: languageName: node linkType: hard +"fast-uri@npm:^3.0.1": + version: 3.1.5 + resolution: "fast-uri@npm:3.1.5" + checksum: 10c0/2bf60eb800dd610c65e17be436425dcb21c92aff3a87d442a8bccab0b7b071e88cf1a5d7d1ea946370b937e6fc0375c405c0296c10587e57de4f78be4646d1d0 + languageName: node + linkType: hard + "fb-watchman@npm:^2.0.0": version: 2.0.2 resolution: "fb-watchman@npm:2.0.2" @@ -1875,6 +2203,20 @@ __metadata: languageName: node linkType: hard +"finalhandler@npm:^2.1.0": + version: 2.1.1 + resolution: "finalhandler@npm:2.1.1" + dependencies: + debug: "npm:^4.4.0" + encodeurl: "npm:^2.0.0" + escape-html: "npm:^1.0.3" + on-finished: "npm:^2.4.1" + parseurl: "npm:^1.3.3" + statuses: "npm:^2.0.1" + checksum: 10c0/6bd664e21b7b2e79efcaace7d1a427169f61cce048fae68eb56290e6934e676b78e55d89f5998c5508871345bc59a61f47002dc505dc7288be68cceac1b701e2 + languageName: node + linkType: hard + "find-up@npm:^4.0.0, find-up@npm:^4.1.0": version: 4.1.0 resolution: "find-up@npm:4.1.0" @@ -1885,6 +2227,20 @@ __metadata: languageName: node linkType: hard +"forwarded@npm:0.2.0": + version: 0.2.0 + resolution: "forwarded@npm:0.2.0" + checksum: 10c0/9b67c3fac86acdbc9ae47ba1ddd5f2f81526fa4c8226863ede5600a3f7c7416ef451f6f1e240a3cc32d0fd79fcfe6beb08fd0da454f360032bde70bf80afbb33 + languageName: node + linkType: hard + +"fresh@npm:^2.0.0": + version: 2.0.0 + resolution: "fresh@npm:2.0.0" + checksum: 10c0/0557548194cb9a809a435bf92bcfbc20c89e8b5eb38861b73ced36750437251e39a111fc3a18b98531be9dd91fe1411e4969f229dc579ec0251ce6c5d4900bbc + languageName: node + linkType: hard + "fs.realpath@npm:^1.0.0": version: 1.0.0 resolution: "fs.realpath@npm:1.0.0" @@ -1918,6 +2274,13 @@ __metadata: languageName: node linkType: hard +"generator-function@npm:^2.0.0": + version: 2.0.1 + resolution: "generator-function@npm:2.0.1" + checksum: 10c0/8a9f59df0f01cfefafdb3b451b80555e5cf6d76487095db91ac461a0e682e4ff7a9dbce15f4ecec191e53586d59eece01949e05a4b4492879600bbbe8e28d6b8 + languageName: node + linkType: hard + "gensync@npm:^1.0.0-beta.2": version: 1.0.0-beta.2 resolution: "gensync@npm:1.0.0-beta.2" @@ -1932,6 +2295,27 @@ __metadata: languageName: node linkType: hard +"get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.3.0": + version: 1.3.1 + resolution: "get-intrinsic@npm:1.3.1" + dependencies: + async-function: "npm:^1.0.0" + async-generator-function: "npm:^1.0.0" + call-bind-apply-helpers: "npm:^1.0.2" + es-define-property: "npm:^1.0.1" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.1.1" + function-bind: "npm:^1.1.2" + generator-function: "npm:^2.0.0" + get-proto: "npm:^1.0.1" + gopd: "npm:^1.2.0" + has-symbols: "npm:^1.1.0" + hasown: "npm:^2.0.2" + math-intrinsics: "npm:^1.1.0" + checksum: 10c0/9f4ab0cf7efe0fd2c8185f52e6f637e708f3a112610c88869f8f041bb9ecc2ce44bf285dfdbdc6f4f7c277a5b88d8e94a432374d97cca22f3de7fc63795deb5d + languageName: node + linkType: hard + "get-package-type@npm:^0.1.0": version: 0.1.0 resolution: "get-package-type@npm:0.1.0" @@ -1939,6 +2323,16 @@ __metadata: languageName: node linkType: hard +"get-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "get-proto@npm:1.0.1" + dependencies: + dunder-proto: "npm:^1.0.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c + languageName: node + linkType: hard + "get-stream@npm:^6.0.0": version: 6.0.1 resolution: "get-stream@npm:6.0.1" @@ -1960,6 +2354,13 @@ __metadata: languageName: node linkType: hard +"gopd@npm:^1.2.0": + version: 1.2.0 + resolution: "gopd@npm:1.2.0" + checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead + languageName: node + linkType: hard + "graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" @@ -1974,6 +2375,13 @@ __metadata: languageName: node linkType: hard +"has-symbols@npm:^1.1.0": + version: 1.1.0 + resolution: "has-symbols@npm:1.1.0" + checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e + languageName: node + linkType: hard + "hasown@npm:^2.0.2": version: 2.0.2 resolution: "hasown@npm:2.0.2" @@ -1983,6 +2391,13 @@ __metadata: languageName: node linkType: hard +"hono@npm:^4.11.4": + version: 4.13.1 + resolution: "hono@npm:4.13.1" + checksum: 10c0/83524961f806293464e6c3b31a7fd2ab8cd8e9cb66e65dea1fbbefb70744844c13b7409ed9b49b43e8543e5c0f1b851f2586fa759eea9da0b69503b58cd0d985 + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -1990,6 +2405,19 @@ __metadata: languageName: node linkType: hard +"http-errors@npm:^2.0.0, http-errors@npm:^2.0.1, http-errors@npm:~2.0.1": + version: 2.0.1 + resolution: "http-errors@npm:2.0.1" + dependencies: + depd: "npm:~2.0.0" + inherits: "npm:~2.0.4" + setprototypeof: "npm:~1.2.0" + statuses: "npm:~2.0.2" + toidentifier: "npm:~1.0.1" + checksum: 10c0/fb38906cef4f5c83952d97661fe14dc156cb59fe54812a42cd448fa57b5c5dfcb38a40a916957737bd6b87aab257c0648d63eb5b6a9ca9f548e105b6072712d4 + languageName: node + linkType: hard + "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" @@ -1997,6 +2425,15 @@ __metadata: languageName: node linkType: hard +"iconv-lite@npm:^0.7.2, iconv-lite@npm:~0.7.0": + version: 0.7.3 + resolution: "iconv-lite@npm:0.7.3" + dependencies: + safer-buffer: "npm:>= 2.1.2 < 3.0.0" + checksum: 10c0/be2fd2414f7e94be3a63063fa0ad5919c16bc7b6e00c77eea0765ced6db405739f38dd51016583058fba25cc1d0106ba30b83fbb7a7e32f824d4db76f23d8d33 + languageName: node + linkType: hard + "import-local@npm:^3.0.2": version: 3.2.0 resolution: "import-local@npm:3.2.0" @@ -2026,13 +2463,27 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2": +"inherits@npm:2, inherits@npm:~2.0.4": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 languageName: node linkType: hard +"ip-address@npm:^10.2.0": + version: 10.5.0 + resolution: "ip-address@npm:10.5.0" + checksum: 10c0/c6616bc99c90b552dad2beb850ca697c1ea3e2b89662d652a4439cd72a549b0c9af100a54be0d25be86599e2b089db87ef5303157d142e5b4c21bd2a1301dfa7 + languageName: node + linkType: hard + +"ipaddr.js@npm:1.9.1": + version: 1.9.1 + resolution: "ipaddr.js@npm:1.9.1" + checksum: 10c0/0486e775047971d3fdb5fb4f063829bac45af299ae0b82dcf3afa2145338e08290563a2a70f34b732d795ecc8311902e541a8530eeb30d75860a78ff4e94ce2a + languageName: node + linkType: hard + "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -2070,6 +2521,13 @@ __metadata: languageName: node linkType: hard +"is-promise@npm:^4.0.0": + version: 4.0.0 + resolution: "is-promise@npm:4.0.0" + checksum: 10c0/ebd5c672d73db781ab33ccb155fb9969d6028e37414d609b115cc534654c91ccd061821d5b987eefaa97cf4c62f0b909bb2f04db88306de26e91bfe8ddc01503 + languageName: node + linkType: hard + "is-stream@npm:^2.0.0": version: 2.0.1 resolution: "is-stream@npm:2.0.1" @@ -2602,6 +3060,13 @@ __metadata: languageName: node linkType: hard +"jose@npm:^6.1.3": + version: 6.2.8 + resolution: "jose@npm:6.2.8" + checksum: 10c0/fe4c6a7197a1adab2251b000c1eaaa8b40b6cb7cfbef43dbc9e959dacd43bf2532827b2d5e0f4069731da79d26e4d9e4368ccb26559a42a884b3fe036927e6e1 + languageName: node + linkType: hard + "js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -2648,6 +3113,20 @@ __metadata: languageName: node linkType: hard +"json-schema-traverse@npm:^1.0.0": + version: 1.0.0 + resolution: "json-schema-traverse@npm:1.0.0" + checksum: 10c0/71e30015d7f3d6dc1c316d6298047c8ef98a06d31ad064919976583eb61e1018a60a0067338f0f79cabc00d84af3fcc489bd48ce8a46ea165d9541ba17fb30c6 + languageName: node + linkType: hard + +"json-schema-typed@npm:^8.0.2": + version: 8.0.2 + resolution: "json-schema-typed@npm:8.0.2" + checksum: 10c0/89f5e2fb1495483b705c027203c07277ee6bf2665165ad25a9cb55de5af7f72570326d13d32565180781e4083ad5c9688102f222baed7b353c2f39c1e02b0428 + languageName: node + linkType: hard + "json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" @@ -2721,17 +3200,26 @@ __metadata: languageName: node linkType: hard +"math-intrinsics@npm:^1.1.0": + version: 1.1.0 + resolution: "math-intrinsics@npm:1.1.0" + checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f + languageName: node + linkType: hard + "mcp-from-openapi@workspace:.": version: 0.0.0-use.local resolution: "mcp-from-openapi@workspace:." dependencies: "@apidevtools/json-schema-ref-parser": "npm:^15.5.1" + "@modelcontextprotocol/sdk": "npm:^1.30.0" "@swc/core": "npm:~1.5.7" "@swc/helpers": "npm:^0.5.18" "@swc/jest": "npm:~0.2.38" "@types/jest": "npm:^29.5.0" "@types/json-schema": "npm:^7.0.15" "@types/node": "npm:^24.0.0" + ajv: "npm:^8.17.0" esbuild: "npm:^0.27.2" jest: "npm:^29.7.0" openapi-types: "npm:^12.1.3" @@ -2744,6 +3232,20 @@ __metadata: languageName: unknown linkType: soft +"media-typer@npm:^1.1.0": + version: 1.1.1 + resolution: "media-typer@npm:1.1.1" + checksum: 10c0/924644de220c3107fc53ec0299b7c1488503470265d32f1492535bd798cc369ba7ceaf9c2a4533361590dcf7208d1cc7b7032dbc1a5918773f5f5d912cab5211 + languageName: node + linkType: hard + +"merge-descriptors@npm:^2.0.0": + version: 2.0.0 + resolution: "merge-descriptors@npm:2.0.0" + checksum: 10c0/95389b7ced3f9b36fbdcf32eb946dc3dd1774c2fdf164609e55b18d03aa499b12bd3aae3a76c1c7185b96279e9803525550d3eb292b5224866060a288f335cb3 + languageName: node + linkType: hard + "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" @@ -2761,6 +3263,22 @@ __metadata: languageName: node linkType: hard +"mime-db@npm:^1.54.0": + version: 1.54.0 + resolution: "mime-db@npm:1.54.0" + checksum: 10c0/8d907917bc2a90fa2df842cdf5dfeaf509adc15fe0531e07bb2f6ab15992416479015828d6a74200041c492e42cce3ebf78e5ce714388a0a538ea9c53eece284 + languageName: node + linkType: hard + +"mime-types@npm:^3.0.0, mime-types@npm:^3.0.2": + version: 3.0.2 + resolution: "mime-types@npm:3.0.2" + dependencies: + mime-db: "npm:^1.54.0" + checksum: 10c0/35a0dd1035d14d185664f346efcdb72e93ef7a9b6e9ae808bd1f6358227010267fab52657b37562c80fc888ff76becb2b2938deb5e730818b7983bf8bd359767 + languageName: node + linkType: hard + "mimic-fn@npm:^2.1.0": version: 2.1.0 resolution: "mimic-fn@npm:2.1.0" @@ -2807,6 +3325,13 @@ __metadata: languageName: node linkType: hard +"negotiator@npm:^1.0.0": + version: 1.0.0 + resolution: "negotiator@npm:1.0.0" + checksum: 10c0/4c559dd52669ea48e1914f9d634227c561221dd54734070791f999c52ed0ff36e437b2e07d5c1f6e32909fc625fe46491c16e4a8f0572567d4dd15c3a4fda04b + languageName: node + linkType: hard + "node-gyp@npm:latest": version: 13.0.0 resolution: "node-gyp@npm:13.0.0" @@ -2868,7 +3393,30 @@ __metadata: languageName: node linkType: hard -"once@npm:^1.3.0": +"object-assign@npm:^4": + version: 4.1.1 + resolution: "object-assign@npm:4.1.1" + checksum: 10c0/1f4df9945120325d041ccf7b86f31e8bcc14e73d29171e37a7903050e96b81323784ec59f93f102ec635bcf6fa8034ba3ea0a8c7e69fa202b87ae3b6cec5a414 + languageName: node + linkType: hard + +"object-inspect@npm:^1.13.3, object-inspect@npm:^1.13.4": + version: 1.13.4 + resolution: "object-inspect@npm:1.13.4" + checksum: 10c0/d7f8711e803b96ea3191c745d6f8056ce1f2496e530e6a19a0e92d89b0fa3c76d910c31f0aa270432db6bd3b2f85500a376a83aaba849a8d518c8845b3211692 + languageName: node + linkType: hard + +"on-finished@npm:^2.4.1": + version: 2.4.1 + resolution: "on-finished@npm:2.4.1" + dependencies: + ee-first: "npm:1.1.1" + checksum: 10c0/46fb11b9063782f2d9968863d9cbba33d77aa13c17f895f56129c274318b86500b22af3a160fe9995aa41317efcd22941b6eba747f718ced08d9a73afdb087b4 + languageName: node + linkType: hard + +"once@npm:^1.3.0, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -2939,6 +3487,13 @@ __metadata: languageName: node linkType: hard +"parseurl@npm:^1.3.3": + version: 1.3.3 + resolution: "parseurl@npm:1.3.3" + checksum: 10c0/90dd4760d6f6174adb9f20cf0965ae12e23879b5f5464f38e92fce8073354341e4b3b76fa3d878351efe7d01e617121955284cfd002ab087fba1a0726ec0b4f5 + languageName: node + linkType: hard + "path-exists@npm:^4.0.0": version: 4.0.0 resolution: "path-exists@npm:4.0.0" @@ -2967,6 +3522,13 @@ __metadata: languageName: node linkType: hard +"path-to-regexp@npm:^8.0.0": + version: 8.4.2 + resolution: "path-to-regexp@npm:8.4.2" + checksum: 10c0/05b115c49b47ad252ce05faa32930f643f23769c68b8bcfe78ad833545140c48bbffb3266986d6c8d5db13a64cf12e07e0d72d9882cab830efeefa553533ebaf + languageName: node + linkType: hard + "picocolors@npm:^1.1.1": version: 1.1.1 resolution: "picocolors@npm:1.1.1" @@ -2995,6 +3557,13 @@ __metadata: languageName: node linkType: hard +"pkce-challenge@npm:^5.0.0": + version: 5.0.1 + resolution: "pkce-challenge@npm:5.0.1" + checksum: 10c0/207f4cb976682f27e8324eb49cf71937c98fbb8341a0b8f6142bc6f664825b30e049a54a21b5c034e823ee3c3d412f10d74bd21de78e17452a6a496c2991f57c + languageName: node + linkType: hard + "pkg-dir@npm:^4.2.0": version: 4.2.0 resolution: "pkg-dir@npm:4.2.0" @@ -3032,6 +3601,16 @@ __metadata: languageName: node linkType: hard +"proxy-addr@npm:^2.0.7": + version: 2.0.7 + resolution: "proxy-addr@npm:2.0.7" + dependencies: + forwarded: "npm:0.2.0" + ipaddr.js: "npm:1.9.1" + checksum: 10c0/c3eed999781a35f7fd935f398b6d8920b6fb00bbc14287bc6de78128ccc1a02c89b95b56742bf7cf0362cc333c61d138532049c7dedc7a328ef13343eff81210 + languageName: node + linkType: hard + "pure-rand@npm:^6.0.0": version: 6.1.0 resolution: "pure-rand@npm:6.1.0" @@ -3039,6 +3618,35 @@ __metadata: languageName: node linkType: hard +"qs@npm:^6.14.0, qs@npm:^6.15.2": + version: 6.15.3 + resolution: "qs@npm:6.15.3" + dependencies: + es-define-property: "npm:^1.0.1" + side-channel: "npm:^1.1.1" + checksum: 10c0/8f3f6e45ece255347d57696628401cde29e9ec649fff698b53bd3150dea7cefdf33036e1bc1826b9f110bfa7cb0ec4ab9f5297eca628ce216c55af82c304e08e + languageName: node + linkType: hard + +"range-parser@npm:^1.2.1": + version: 1.3.0 + resolution: "range-parser@npm:1.3.0" + checksum: 10c0/295494bb6685f9ab50f41a5f4fa5ce445aeeb9673b491bf178460fcc3a812dcf0d164cf1c83074f13a71a87d91ead5e097afd53e0630bc49a5101ed60f2a7529 + languageName: node + linkType: hard + +"raw-body@npm:^3.0.0, raw-body@npm:^3.0.2": + version: 3.0.2 + resolution: "raw-body@npm:3.0.2" + dependencies: + bytes: "npm:~3.1.2" + http-errors: "npm:~2.0.1" + iconv-lite: "npm:~0.7.0" + unpipe: "npm:~1.0.0" + checksum: 10c0/d266678d08e1e7abea62c0ce5864344e980fa81c64f6b481e9842c5beaed2cdcf975f658a3ccd67ad35fc919c1f6664ccc106067801850286a6cbe101de89f29 + languageName: node + linkType: hard + "react-is@npm:^18.0.0": version: 18.3.1 resolution: "react-is@npm:18.3.1" @@ -3053,6 +3661,13 @@ __metadata: languageName: node linkType: hard +"require-from-string@npm:^2.0.2": + version: 2.0.2 + resolution: "require-from-string@npm:2.0.2" + checksum: 10c0/aaa267e0c5b022fc5fd4eef49d8285086b15f2a1c54b28240fdf03599cbd9c26049fee3eab894f2e1f6ca65e513b030a7c264201e3f005601e80c49fb2937ce2 + languageName: node + linkType: hard + "resolve-cwd@npm:^3.0.0": version: 3.0.0 resolution: "resolve-cwd@npm:3.0.0" @@ -3102,6 +3717,26 @@ __metadata: languageName: node linkType: hard +"router@npm:^2.2.0": + version: 2.2.0 + resolution: "router@npm:2.2.0" + dependencies: + debug: "npm:^4.4.0" + depd: "npm:^2.0.0" + is-promise: "npm:^4.0.0" + parseurl: "npm:^1.3.3" + path-to-regexp: "npm:^8.0.0" + checksum: 10c0/3279de7450c8eae2f6e095e9edacbdeec0abb5cb7249c6e719faa0db2dba43574b4fff5892d9220631c9abaff52dd3cad648cfea2aaace845e1a071915ac8867 + languageName: node + linkType: hard + +"safer-buffer@npm:>= 2.1.2 < 3.0.0": + version: 2.1.2 + resolution: "safer-buffer@npm:2.1.2" + checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 + languageName: node + linkType: hard + "semver@npm:^6.3.0, semver@npm:^6.3.1": version: 6.3.1 resolution: "semver@npm:6.3.1" @@ -3120,6 +3755,44 @@ __metadata: languageName: node linkType: hard +"send@npm:^1.1.0, send@npm:^1.2.0": + version: 1.2.1 + resolution: "send@npm:1.2.1" + dependencies: + debug: "npm:^4.4.3" + encodeurl: "npm:^2.0.0" + escape-html: "npm:^1.0.3" + etag: "npm:^1.8.1" + fresh: "npm:^2.0.0" + http-errors: "npm:^2.0.1" + mime-types: "npm:^3.0.2" + ms: "npm:^2.1.3" + on-finished: "npm:^2.4.1" + range-parser: "npm:^1.2.1" + statuses: "npm:^2.0.2" + checksum: 10c0/fbbbbdc902a913d65605274be23f3d604065cfc3ee3d78bf9fc8af1dc9fc82667c50d3d657f5e601ac657bac9b396b50ee97bd29cd55436320cf1cddebdcec72 + languageName: node + linkType: hard + +"serve-static@npm:^2.2.0": + version: 2.2.1 + resolution: "serve-static@npm:2.2.1" + dependencies: + encodeurl: "npm:^2.0.0" + escape-html: "npm:^1.0.3" + parseurl: "npm:^1.3.3" + send: "npm:^1.2.0" + checksum: 10c0/37986096e8572e2dfaad35a3925fa8da0c0969f8814fd7788e84d4d388bc068cf0c06d1658509788e55bed942a6b6d040a8a267fa92bb9ffb1179f8bacde5fd7 + languageName: node + linkType: hard + +"setprototypeof@npm:~1.2.0": + version: 1.2.0 + resolution: "setprototypeof@npm:1.2.0" + checksum: 10c0/68733173026766fa0d9ecaeb07f0483f4c2dc70ca376b3b7c40b7cda909f94b0918f6c5ad5ce27a9160bdfb475efaa9d5e705a11d8eaae18f9835d20976028bc + languageName: node + linkType: hard + "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -3136,6 +3809,54 @@ __metadata: languageName: node linkType: hard +"side-channel-list@npm:^1.0.1": + version: 1.0.1 + resolution: "side-channel-list@npm:1.0.1" + dependencies: + es-errors: "npm:^1.3.0" + object-inspect: "npm:^1.13.4" + checksum: 10c0/d346c787fd2f9f1c2fdea14f00e8250118db0e7596d85a6cb9faa75f105d31a73a8f7a341c93d7df2a2429098c3d37a77bd3be9e88c37094b8c01807bc77c7a2 + languageName: node + linkType: hard + +"side-channel-map@npm:^1.0.1": + version: 1.0.1 + resolution: "side-channel-map@npm:1.0.1" + dependencies: + call-bound: "npm:^1.0.2" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.5" + object-inspect: "npm:^1.13.3" + checksum: 10c0/010584e6444dd8a20b85bc926d934424bd809e1a3af941cace229f7fdcb751aada0fb7164f60c2e22292b7fa3c0ff0bce237081fd4cdbc80de1dc68e95430672 + languageName: node + linkType: hard + +"side-channel-weakmap@npm:^1.0.2": + version: 1.0.2 + resolution: "side-channel-weakmap@npm:1.0.2" + dependencies: + call-bound: "npm:^1.0.2" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.5" + object-inspect: "npm:^1.13.3" + side-channel-map: "npm:^1.0.1" + checksum: 10c0/71362709ac233e08807ccd980101c3e2d7efe849edc51455030327b059f6c4d292c237f94dc0685031dd11c07dd17a68afde235d6cf2102d949567f98ab58185 + languageName: node + linkType: hard + +"side-channel@npm:^1.1.1": + version: 1.1.1 + resolution: "side-channel@npm:1.1.1" + dependencies: + es-errors: "npm:^1.3.0" + object-inspect: "npm:^1.13.4" + side-channel-list: "npm:^1.0.1" + side-channel-map: "npm:^1.0.1" + side-channel-weakmap: "npm:^1.0.2" + checksum: 10c0/dc0ab81d67f61bda9247d053ce93f41c3fd8ad2bdcb9cf9d8d2f8540d488f26d87a5e99ebfc07eea49ec025867b2452b705442d974b1478f0395e69f6bfb3270 + languageName: node + linkType: hard + "signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -3190,6 +3911,13 @@ __metadata: languageName: node linkType: hard +"statuses@npm:^2.0.1, statuses@npm:^2.0.2, statuses@npm:~2.0.2": + version: 2.0.2 + resolution: "statuses@npm:2.0.2" + checksum: 10c0/a9947d98ad60d01f6b26727570f3bcceb6c8fa789da64fe6889908fe2e294d57503b14bf2b5af7605c2d36647259e856635cd4c49eab41667658ec9d0080ec3f + languageName: node + linkType: hard + "string-length@npm:^4.0.1": version: 4.0.2 resolution: "string-length@npm:4.0.2" @@ -3316,6 +4044,13 @@ __metadata: languageName: node linkType: hard +"toidentifier@npm:~1.0.1": + version: 1.0.1 + resolution: "toidentifier@npm:1.0.1" + checksum: 10c0/93937279934bd66cc3270016dd8d0afec14fb7c94a05c72dc57321f8bd1fa97e5bea6d1f7c89e728d077ca31ea125b78320a616a6c6cd0e6b9cb94cb864381c1 + languageName: node + linkType: hard + "tslib@npm:^2.8.0, tslib@npm:^2.8.1": version: 2.8.1 resolution: "tslib@npm:2.8.1" @@ -3337,6 +4072,17 @@ __metadata: languageName: node linkType: hard +"type-is@npm:^2.0.1, type-is@npm:^2.1.0": + version: 2.1.0 + resolution: "type-is@npm:2.1.0" + dependencies: + content-type: "npm:^2.0.0" + media-typer: "npm:^1.1.0" + mime-types: "npm:^3.0.0" + checksum: 10c0/a6018f8f509de48f2c7429305e3a920e73b374fa93127dd0877ae1c2df65a5d33907caac8afb0c37a9b9fc7c49f29e3f55d668963dc845d966930b667c07f50e + languageName: node + linkType: hard + "typescript@npm:^5.0.0": version: 5.9.3 resolution: "typescript@npm:5.9.3" @@ -3378,6 +4124,13 @@ __metadata: languageName: node linkType: hard +"unpipe@npm:~1.0.0": + version: 1.0.0 + resolution: "unpipe@npm:1.0.0" + checksum: 10c0/193400255bd48968e5c5383730344fbb4fa114cdedfab26e329e50dd2d81b134244bb8a72c6ac1b10ab0281a58b363d06405632c9d49ca9dfd5e90cbd7d0f32c + languageName: node + linkType: hard + "update-browserslist-db@npm:^1.2.0": version: 1.2.3 resolution: "update-browserslist-db@npm:1.2.3" @@ -3403,6 +4156,13 @@ __metadata: languageName: node linkType: hard +"vary@npm:^1, vary@npm:^1.1.2": + version: 1.1.2 + resolution: "vary@npm:1.1.2" + checksum: 10c0/f15d588d79f3675135ba783c91a4083dcd290a2a5be9fcb6514220a1634e23df116847b1cc51f66bfb0644cf9353b2abb7815ae499bab06e46dd33c1a6bf1f4f + languageName: node + linkType: hard + "walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -3521,7 +4281,16 @@ __metadata: languageName: node linkType: hard -"zod@npm:^4.0.0": +"zod-to-json-schema@npm:^3.25.1": + version: 3.25.2 + resolution: "zod-to-json-schema@npm:3.25.2" + peerDependencies: + zod: ^3.25.28 || ^4 + checksum: 10c0/dd300554393903022487688af14fbda5c719ba8179702bb55b3aa86318830467f0f7beb7d654036975ac963dc4843b72e59636448bfff9a0608f277bb6a14939 + languageName: node + linkType: hard + +"zod@npm:^3.25 || ^4.0, zod@npm:^4.0.0": version: 4.4.3 resolution: "zod@npm:4.4.3" checksum: 10c0/7ea31b558e88f9faf44f31dd185e2e1cbf51fed3081787fb96cc2534749b50c0acfc6da7f0922a7353ed092dd358c7d50c28ea96c94d04af64191bd33152eca3