srl-labs / gnxi-browser

A collection of generated docs for Openconfig's network interfaces
https://gnxi.srlinux.dev
6 stars 0 forks source link

support for one-of feature #1

Closed hellt closed 1 year ago

hellt commented 1 year ago

proto files have a choice-like statement called oneof oneof means that the filed can take one of the following values, consider this example:

message QualificationConfiguration {
  oneof timing {
    NTPSyncedTiming ntp = 101;
    RPCSyncedTiming rpc = 102;
  }

The use of oneof denotes that timing can be set to either NTP or RPC. We have to display that choice in the UI. Luckily, the json data has this info - https://github.com/srl-labs/gnxi-browser/blob/e763acdc378d6c45fd77eaa31550f8a30c72dea6/static/interfaces/gnoi/packet_link_qualification/0.1.0/proto-doc.json#L1052-L1061

hellt commented 1 year ago

done sometime ago:D