mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-26 13:49:21 +00:00
Sort parameter output by name
This commit is contained in:
parent
4964506456
commit
6be197739a
@ -304,7 +304,10 @@ void RasctlDisplay::DisplayOperationInfo(const PbOperationInfo& operation_info)
|
||||
}
|
||||
cout << endl;
|
||||
|
||||
for (const auto& parameter : operation.second.parameters()) {
|
||||
list<PbOperationParameter> sorted_parameters = { operation.second.parameters().begin(), operation.second.parameters().end() };
|
||||
sorted_parameters.sort([](const auto& a, const auto& b) { return a.name() < b.name(); });
|
||||
|
||||
for (const auto& parameter : sorted_parameters) {
|
||||
cout << " " << parameter.name() << ": "
|
||||
<< (parameter.is_mandatory() ? "mandatory" : "optional");
|
||||
if (!parameter.description().empty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user