Skip to content

Commit 8a2d9c1

Browse files
authored
Document missing brp methods (#21007)
# Objective Document missing brp methods: - `registry.schema` - `rpc.discover` ## Solution - Update crate-level documentation ## Testing - `cargo doc -p bevy_remote`
1 parent a8a5fda commit 8a2d9c1

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

crates/bevy_remote/src/lib.rs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
//! - `has`: A map associating each type name from `has` to a boolean value indicating whether or not the
154154
//! entity has that component. If `has` was empty or omitted, this key will be omitted in the response.
155155
//!
156-
//! ### Example
156+
//! #### Example
157157
//! To use the query API and retrieve Transform data for all entities that have a Transform
158158
//! use this query:
159159
//!
@@ -455,6 +455,32 @@
455455
//!
456456
//! `result`: An array of [fully-qualified type names] of registered resource types.
457457
//!
458+
//! ### `registry.schema`
459+
//!
460+
//! Retrieve schema information about registered types in the Bevy app's type registry.
461+
//!
462+
//! `params` (optional):
463+
//! - `with_crates`: An array of crate names to include in the results. When empty or omitted, types from all crates will be included.
464+
//! - `without_crates`: An array of crate names to exclude from the results. When empty or omitted, no crates will be excluded.
465+
//! - `type_limit`: Additional type constraints:
466+
//! - `with`: An array of [fully-qualified type names] that must be present for a type to be included
467+
//! - `without`: An array of [fully-qualified type names] that must not be present for a type to be excluded
468+
//!
469+
//! `result`: A map associating each type's [fully-qualified type name] to a [`JsonSchemaBevyType`](crate::schemas::json_schema::JsonSchemaBevyType).
470+
//! This contains schema information about that type, including field definitions, type information, reflect type information, and other metadata
471+
//! helpful for understanding the structure of the type.
472+
//!
473+
//! ### `rpc.discover`
474+
//!
475+
//! Discover available remote methods and server information. This follows the [`OpenRPC` specification for service discovery](https://spec.open-rpc.org/#service-discovery-method).
476+
//!
477+
//! This method takes no parameters.
478+
//!
479+
//! `result`: An `OpenRPC` document containing:
480+
//! - Information about all available remote methods
481+
//! - Server connection information (when using HTTP transport)
482+
//! - `OpenRPC` specification version
483+
//!
458484
//! ## Custom methods
459485
//!
460486
//! In addition to the provided methods, the Bevy Remote Protocol can be extended to include custom

0 commit comments

Comments
 (0)