nycmesh-tool uisp devices getDevices would fail, because the uisp_swagger.yaml incorrectly labeled "date-time" fields as "date", causing deserializing Devices to fail at runtime. I had to make some manual tweaks to the uisp_swagger.yaml (captured in diffs in spec/) to make it compile.
Also note that some manual commenting was necessary to make the generated code compile (comment out sfp1/sfp2 fields and validation, and makeClient())
Old Behavior:
$ nycmesh-tool uisp devices getDevices
Using config file: /home/gabe/.nycmesh-tool.yaml
Error: parsing time "2022-01-09T00:13:34.554Z": extra text: "T00:13:34.554Z"
Usage:
nycmesh-tool uisp devices getDevices [flags]
Flags:
--authorized
-h, --help help for getDevices
--role strings
--siteId string
--type strings
--withInterfaces
Global Flags:
--config string config file path
--debug output debug logs
--dry-run do not send the request to server
-f, --format string output format (table or json) (default "json")
--hostname string hostname of the service (default "localhost")
--scheme string Choose from: [http] (default "http")
--skip-verify-tls sets &tls.Config{InsecureSkipVerify: true} in UISP HTTP Client
--x-auth-token string User authorization token
2022/01/08 16:14:30 Error: parsing time "2022-01-09T00:13:34.554Z": extra text: "T00:13:34.554Z"
nycmesh-tool uisp devices getDevices
would fail, because theuisp_swagger.yaml
incorrectly labeled"date-time"
fields as"date"
, causing deserializing Devices to fail at runtime. I had to make some manual tweaks to theuisp_swagger.yaml
(captured in diffs inspec/
) to make it compile.Also note that some manual commenting was necessary to make the generated code compile (comment out sfp1/sfp2 fields and validation, and makeClient())
Old Behavior:
New Behavior: