json schema generation
This commit is contained in:
@@ -37,7 +37,9 @@ pub enum RPCAnswerDetail {
|
||||
GetValueA(RPCOperationGetValueA),
|
||||
SetValueA(RPCOperationSetValueA),
|
||||
WatchValueA(RPCOperationWatchValueA),
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
SupplyBlockA(RPCOperationSupplyBlockA),
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
FindBlockA(RPCOperationFindBlockA),
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
StartTunnelA(RPCOperationStartTunnelA),
|
||||
@@ -56,7 +58,9 @@ impl RPCAnswerDetail {
|
||||
RPCAnswerDetail::GetValueA(_) => "GetValueA",
|
||||
RPCAnswerDetail::SetValueA(_) => "SetValueA",
|
||||
RPCAnswerDetail::WatchValueA(_) => "WatchValueA",
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCAnswerDetail::SupplyBlockA(_) => "SupplyBlockA",
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCAnswerDetail::FindBlockA(_) => "FindBlockA",
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
RPCAnswerDetail::StartTunnelA(_) => "StartTunnelA",
|
||||
@@ -74,7 +78,9 @@ impl RPCAnswerDetail {
|
||||
RPCAnswerDetail::GetValueA(r) => r.validate(validate_context),
|
||||
RPCAnswerDetail::SetValueA(r) => r.validate(validate_context),
|
||||
RPCAnswerDetail::WatchValueA(r) => r.validate(validate_context),
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCAnswerDetail::SupplyBlockA(r) => r.validate(validate_context),
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCAnswerDetail::FindBlockA(r) => r.validate(validate_context),
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
RPCAnswerDetail::StartTunnelA(r) => r.validate(validate_context),
|
||||
@@ -119,11 +125,13 @@ impl RPCAnswerDetail {
|
||||
let out = RPCOperationWatchValueA::decode(&op_reader)?;
|
||||
RPCAnswerDetail::WatchValueA(out)
|
||||
}
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
veilid_capnp::answer::detail::SupplyBlockA(r) => {
|
||||
let op_reader = r.map_err(RPCError::protocol)?;
|
||||
let out = RPCOperationSupplyBlockA::decode(&op_reader)?;
|
||||
RPCAnswerDetail::SupplyBlockA(out)
|
||||
}
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
veilid_capnp::answer::detail::FindBlockA(r) => {
|
||||
let op_reader = r.map_err(RPCError::protocol)?;
|
||||
let out = RPCOperationFindBlockA::decode(&op_reader)?;
|
||||
@@ -163,9 +171,11 @@ impl RPCAnswerDetail {
|
||||
RPCAnswerDetail::WatchValueA(d) => {
|
||||
d.encode(&mut builder.reborrow().init_watch_value_a())
|
||||
}
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCAnswerDetail::SupplyBlockA(d) => {
|
||||
d.encode(&mut builder.reborrow().init_supply_block_a())
|
||||
}
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCAnswerDetail::FindBlockA(d) => d.encode(&mut builder.reborrow().init_find_block_a()),
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
RPCAnswerDetail::StartTunnelA(d) => {
|
||||
|
@@ -2,7 +2,6 @@ mod answer;
|
||||
mod operation;
|
||||
mod operation_app_call;
|
||||
mod operation_app_message;
|
||||
mod operation_find_block;
|
||||
mod operation_find_node;
|
||||
mod operation_get_value;
|
||||
mod operation_return_receipt;
|
||||
@@ -10,7 +9,7 @@ mod operation_route;
|
||||
mod operation_set_value;
|
||||
mod operation_signal;
|
||||
mod operation_status;
|
||||
mod operation_supply_block;
|
||||
|
||||
mod operation_validate_dial_info;
|
||||
mod operation_value_changed;
|
||||
mod operation_watch_value;
|
||||
@@ -18,6 +17,11 @@ mod question;
|
||||
mod respond_to;
|
||||
mod statement;
|
||||
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
mod operation_find_block;
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
mod operation_supply_block;
|
||||
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
mod operation_cancel_tunnel;
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
@@ -29,7 +33,6 @@ pub use answer::*;
|
||||
pub use operation::*;
|
||||
pub use operation_app_call::*;
|
||||
pub use operation_app_message::*;
|
||||
pub use operation_find_block::*;
|
||||
pub use operation_find_node::*;
|
||||
pub use operation_get_value::*;
|
||||
pub use operation_return_receipt::*;
|
||||
@@ -37,7 +40,6 @@ pub use operation_route::*;
|
||||
pub use operation_set_value::*;
|
||||
pub use operation_signal::*;
|
||||
pub use operation_status::*;
|
||||
pub use operation_supply_block::*;
|
||||
pub use operation_validate_dial_info::*;
|
||||
pub use operation_value_changed::*;
|
||||
pub use operation_watch_value::*;
|
||||
@@ -45,6 +47,11 @@ pub use question::*;
|
||||
pub use respond_to::*;
|
||||
pub use statement::*;
|
||||
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
pub use operation_find_block::*;
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
pub use operation_supply_block::*;
|
||||
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
pub use operation_cancel_tunnel::*;
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
|
@@ -49,7 +49,9 @@ pub enum RPCQuestionDetail {
|
||||
GetValueQ(RPCOperationGetValueQ),
|
||||
SetValueQ(RPCOperationSetValueQ),
|
||||
WatchValueQ(RPCOperationWatchValueQ),
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
SupplyBlockQ(RPCOperationSupplyBlockQ),
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
FindBlockQ(RPCOperationFindBlockQ),
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
StartTunnelQ(RPCOperationStartTunnelQ),
|
||||
@@ -68,7 +70,9 @@ impl RPCQuestionDetail {
|
||||
RPCQuestionDetail::GetValueQ(_) => "GetValueQ",
|
||||
RPCQuestionDetail::SetValueQ(_) => "SetValueQ",
|
||||
RPCQuestionDetail::WatchValueQ(_) => "WatchValueQ",
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCQuestionDetail::SupplyBlockQ(_) => "SupplyBlockQ",
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCQuestionDetail::FindBlockQ(_) => "FindBlockQ",
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
RPCQuestionDetail::StartTunnelQ(_) => "StartTunnelQ",
|
||||
@@ -86,7 +90,9 @@ impl RPCQuestionDetail {
|
||||
RPCQuestionDetail::GetValueQ(r) => r.validate(validate_context),
|
||||
RPCQuestionDetail::SetValueQ(r) => r.validate(validate_context),
|
||||
RPCQuestionDetail::WatchValueQ(r) => r.validate(validate_context),
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCQuestionDetail::SupplyBlockQ(r) => r.validate(validate_context),
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCQuestionDetail::FindBlockQ(r) => r.validate(validate_context),
|
||||
#[cfg(feature = "unstable-tunnels")]
|
||||
RPCQuestionDetail::StartTunnelQ(r) => r.validate(validate_context),
|
||||
@@ -132,11 +138,13 @@ impl RPCQuestionDetail {
|
||||
let out = RPCOperationWatchValueQ::decode(&op_reader)?;
|
||||
RPCQuestionDetail::WatchValueQ(out)
|
||||
}
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
veilid_capnp::question::detail::SupplyBlockQ(r) => {
|
||||
let op_reader = r.map_err(RPCError::protocol)?;
|
||||
let out = RPCOperationSupplyBlockQ::decode(&op_reader)?;
|
||||
RPCQuestionDetail::SupplyBlockQ(out)
|
||||
}
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
veilid_capnp::question::detail::FindBlockQ(r) => {
|
||||
let op_reader = r.map_err(RPCError::protocol)?;
|
||||
let out = RPCOperationFindBlockQ::decode(&op_reader)?;
|
||||
@@ -176,9 +184,11 @@ impl RPCQuestionDetail {
|
||||
RPCQuestionDetail::WatchValueQ(d) => {
|
||||
d.encode(&mut builder.reborrow().init_watch_value_q())
|
||||
}
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCQuestionDetail::SupplyBlockQ(d) => {
|
||||
d.encode(&mut builder.reborrow().init_supply_block_q())
|
||||
}
|
||||
#[cfg(feature = "unstable-blockstore")]
|
||||
RPCQuestionDetail::FindBlockQ(d) => {
|
||||
d.encode(&mut builder.reborrow().init_find_block_q())
|
||||
}
|
||||
|
Reference in New Issue
Block a user