Open lars-t-hansen opened 1 month ago
The tool we may want to use is Swagger, there is a Go implementation at https://github.com/swaggo/swag for example. Since our REST API is fairly narrow - there's basically one API for every command verb, and there are few verbs - we'll have to see if this is the most appropriate technology, but there's anyway a lot of inspiration to be had here.
We can also get rid of the xxxxxtruexxxxx
hack, this was an artifact of using the Rust command line parser.
One thing that came up in discussions at the AHM was that we need to define the REST API to naic-monitor in a way that allows it to be used by clients that don't want to go via sonalyze. This probably involves using some sort of standard API spec tech (something was mentioned but I forget which). cc @ashenr. We need to define both the query packets and the result packets, with explicit syntax & semantics for all the data fields. This is better defined and documented in the new Go version of the server than in the old Rust version, but it's still going to be a substantial job.