Файли
openidea/sdk/rust/openidea-plugin/wit/endpoints.wit
T
l0ng-ai 047cac209b feat(plugins): plugin API 1.4 (#2207)
Plugin API 1.4: grants for unencrypted HTTP, local sockets, IDE commands and owned database sources; window status items, output channels, content tabs, editor selections, decorations, search, Problems and VCS reads; runs, keyed terminals with exit events, plugin run targets, dynamic run configurations and test parsers; language features, injections, snippets and menu locations; plugin MCP tools on the built-in server; four official API examples. Released 1.3 plugins keep working.
2026-11-09 08:40:40 +08:00

27 рядки
956 B
Plaintext

package openidea:[email protected];
/// HTTP endpoints found in a project (`[[contributes.endpoints]]`).
interface endpoints-provider {
use types.{error, location};
use invocation.{invocation};
/// One HTTP route.
record endpoint {
/// `none` accepts any HTTP method.
method: option<string>,
/// Path parameters use braces, e.g. `/photos/{id}`.
path: string,
/// Shown next to the route, e.g. `Rails`.
framework: string,
/// Display name, e.g. `PhotosController#show`.
handler: option<string>,
/// Where the route is declared, inside the project.
location: location,
}
/// The project's routes, complete. Called when the IDE first needs them and
/// again after a file matching `files` changes; cached in between. Runs in
/// the background: it can't ask the user.
endpoints: func(ctx: borrow<invocation>) -> result<list<endpoint>, error>;
}