fix(cli): operation response type exhaustive
This commit is contained in:
parent
b6993ce02e
commit
8726ea91eb
|
@ -259,6 +259,7 @@ impl Generator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
crate::method::OperationResponseKind::Raw
|
crate::method::OperationResponseKind::Raw
|
||||||
|
| crate::method::OperationResponseKind::Multi(_)
|
||||||
| crate::method::OperationResponseKind::Upgrade => {
|
| crate::method::OperationResponseKind::Upgrade => {
|
||||||
quote! {
|
quote! {
|
||||||
{
|
{
|
||||||
|
@ -279,6 +280,7 @@ impl Generator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
crate::method::OperationResponseKind::Raw
|
crate::method::OperationResponseKind::Raw
|
||||||
|
| crate::method::OperationResponseKind::Multi(_)
|
||||||
| crate::method::OperationResponseKind::Upgrade => {
|
| crate::method::OperationResponseKind::Upgrade => {
|
||||||
quote! {
|
quote! {
|
||||||
{
|
{
|
||||||
|
@ -306,6 +308,7 @@ impl Generator {
|
||||||
}
|
}
|
||||||
crate::method::OperationResponseKind::None => quote! { () },
|
crate::method::OperationResponseKind::None => quote! { () },
|
||||||
crate::method::OperationResponseKind::Raw => todo!(),
|
crate::method::OperationResponseKind::Raw => todo!(),
|
||||||
|
crate::method::OperationResponseKind::Multi(_) => todo!(),
|
||||||
crate::method::OperationResponseKind::Upgrade => todo!(),
|
crate::method::OperationResponseKind::Upgrade => todo!(),
|
||||||
};
|
};
|
||||||
let error_output = match error_kind {
|
let error_output = match error_kind {
|
||||||
|
@ -319,6 +322,7 @@ impl Generator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
crate::method::OperationResponseKind::Raw
|
crate::method::OperationResponseKind::Raw
|
||||||
|
| crate::method::OperationResponseKind::Multi(_)
|
||||||
| crate::method::OperationResponseKind::Upgrade => {
|
| crate::method::OperationResponseKind::Upgrade => {
|
||||||
quote! {
|
quote! {
|
||||||
{
|
{
|
||||||
|
@ -512,10 +516,10 @@ impl Generator {
|
||||||
CliBodyArg::Required => Some(true),
|
CliBodyArg::Required => Some(true),
|
||||||
CliBodyArg::Optional => Some(false),
|
CliBodyArg::Optional => Some(false),
|
||||||
})
|
})
|
||||||
.map(|required| {
|
.map(|required| {
|
||||||
let help = "Path to a file that contains the full json body.";
|
let help = "Path to a file that contains the full json body.";
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
.arg(
|
.arg(
|
||||||
clap::Arg::new("json-body")
|
clap::Arg::new("json-body")
|
||||||
.long("json-body")
|
.long("json-body")
|
||||||
|
@ -533,7 +537,7 @@ impl Generator {
|
||||||
.help("XXX")
|
.help("XXX")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let parser = quote! {
|
let parser = quote! {
|
||||||
#(
|
#(
|
||||||
|
|
Loading…
Reference in New Issue