Editor
how to use the Constants design and view panel of ApiHug Api design Copilot.
Go through the constants design panel of ApiHug Api design Copilot
Please refer: apihug-full-demo admin/constant.proto
enum UserStatusEnum {
option (hope.swagger.enm) = {
description: "User management status"
};
NORMAL = 0 [(hope.constant.field) = {code: 1,message: "normal", message2: "user normal status"}];
BLOCKED = 1 [(hope.constant.field) = {code: 2,message: "blocked", message2: "user blocked"}];
}
Please refer: apihug-full-demo UserStatusEnum.java
@Generated("H.O.P.E. Infra Team")
@ProtoFrom(
value = "com/apihug/demo/user/proto/infra/settings/admin/constant.proto",
entity = "UserStatusEnum",
kind = Kind.ENUM
)
public enum UserStatusEnum implements Enumeration<UserStatusEnum> {
NA(-1, "Default Placeholder Should NEVER be used", "默认占位枚举请勿使用"),
NORMAL(1, "normal", "user normal status"),
BLOCKED(2, "blocked", "user blocked");
}