forked from netgroup-polito/swagger-codegen
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
in some cases, described below, yang default parameter is not taken into account by code generation.
Case1 (working):
leaf pathcost {
type int32;
default 1;
description "Cost of this route";
router:cli-example "10";
}
int32_t m_pathcost;
m_pathcost = 1;
Case2 (not working):
leaf pathcost {
type uint32;
default 1;
description "Cost of this route";
router:cli-example "10";
}
//No default value is generated by codegen
uint32_t m_pathcost;
Case3 (not working):
leaf pathcost {
type string;
default "1";
description "Cost of this route";
router:cli-example "10";
}
std::string m_pathcost;
m_pathcost = 1; // it should be a string, so "1"
Case4 (not working):
leaf pathcost {
type uint8;
default 1;
description "Cost of this route";
router:cli-example "10";
}
uint8_t m_pathcost;
// no default value is set
- Matteo
Metadata
Metadata
Assignees
Labels
No labels