Bump to 6.0.43, use go generate

Also moved fetching of JSON information to Go for cross-OS usage.
This commit is contained in:
Paul Tyng
2021-04-09 09:41:43 -04:00
parent 5219e06753
commit 4ab4036985
76 changed files with 504 additions and 429 deletions

View File

@@ -10,6 +10,8 @@ Many of the naming adjustments are breaking changes, but to simplify things, tre
The data models and basic REST methods are "generated" from JSON files in the JAR that show all fields and the associated regex/validation information.
This is kind of gross, I wanted to switch to using the java classes in the jar like scala2go but the jar is obfuscated and I couldn't find a way to extract that information from anywhere else. Maybe it exists somewhere in the web UI, but I was unable to find it in there in a way that was extractable in a practical way.
To regenerate the code, you can bump the Unifi Controller version number in [unifi/gen.go] and run `go generate` inside the `unifi` directory.
This code generation is kind of gross, I wanted to switch to using the java classes in the jar like scala2go but the jar is obfuscated and I couldn't find a way to extract that information from anywhere else. Maybe it exists somewhere in the web UI, but I was unable to find it in there in a way that was extractable in a practical way.
Still planning to dig through the bits some more later on.