mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-23 06:30:04 +00:00
Removed redundant message field
This commit is contained in:
parent
ff468aafa8
commit
49e14f7078
@ -169,9 +169,8 @@ message PbOperationParameter {
|
||||
string type = 3;
|
||||
// There is no specific set of values if empty
|
||||
repeated string values = 4;
|
||||
// Optional default value
|
||||
// Optional default value. If there is no default the value is mandatory.
|
||||
string default_value = 5;
|
||||
bool is_mandatory = 6;
|
||||
}
|
||||
|
||||
// The list of parameters supported by an operation
|
||||
|
@ -457,7 +457,6 @@ PbOperationParameter *RascsiResponse::AddOperationParameter(PbOperationParameter
|
||||
if (!default_value.empty()) {
|
||||
parameter->set_default_value(default_value);
|
||||
}
|
||||
parameter->set_is_mandatory(default_value.empty());
|
||||
|
||||
return parameter;
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ void RasctlDisplay::DisplayOperationInfo(const PbOperationInfo& operation_info)
|
||||
|
||||
for (const auto& parameter : operation.parameters()) {
|
||||
cout << " " << parameter.name() << ": " << parameter.type()
|
||||
<< (parameter.is_mandatory() ? ", mandatory" : ", optional");
|
||||
<< (parameter.default_value().empty() ? ", mandatory" : ", optional");
|
||||
if (!parameter.description().empty()) {
|
||||
cout << " (" << parameter.description().at("en") << ")";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user