Closed deadlysnek closed 3 years ago
I just got this same error. I see the issue was logged in October. Has anyone looked at this?
Hi. It's caused by Outputs []interface{}
definition in http.handler.map.
A quick fix would be to add this to interface.go:
func (f *Interface) populate(s interface{}) {
if s == nil {
f.Type = "string"
return
}
But I don't see how multiple types can be added to the json schema: "type": ["string", "null"]
would be better.
@ghostwheel42 Thanks so much. I have not tested all the functionality. I just needed to get this module working.
$ caddy json-schema --vscode
json-schema .vscode/caddy_schema.json written.
json-schema .vscode/settings.json written.
Thanks @ghostwheel42 for this. Better late than never :)
Everything should be fine now and the broken documentation has also been fixed for standard and third party plugins.
I'm compiling Caddy 2.2.1 with xcaddy using Go 1.14.4 on Ubuntu 20.04.1 LTS
Caddy builds and runs fine, executing
caddy json-schema --vscode
gives me this message