Skip to content

v4: Generate API and Gateway structures #399

@diamondburned

Description

@diamondburned

Ideally, all of our API and WS gateway data structures should be autogenerated. This will make maintenance overhead so much lower.

Plan

We will use discord-api-types's existing type definitions for this, rather than trying to manually parse the documentation ourselves. A lot of breaking changes may happen because of this, which is why it's part of the v4 milestone.

A very easy way to consume the documentation is by using Deno: deno doc --json https://deno.land/x/discord_api_types/v10.ts. A lightweight code generator can accept the Deno-generated JSON representation of the TypeScript file as input.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions