Does the Caddy 2.0 JSON have a schema?

Simply put, having a schema allows my editor to do auto completion when creating a json file

I couldn’t find any, thought I would ask !

Not really. There was work done to set up a CUE schema but that’s not exactly relevant.

The current JSON structure is pretty easily navigable here:

You can also start from a Caddyfile and use the caddy adapt command to get some JSON as a starting point for additional tweaking.

If you want to set up a JSON schema, that’d be pretty cool!

hmm all right, if none exists that’s fine then. Thank you!

Wouldn’t that be really hard to do, since the JSON is extensible? I mean, the schema could really only consist of the values on this page: https://caddyserver.com/docs/json/ - since everything under “…” are plugins/modules.

@harisund FYI there’s now a Caddy plugin that lets you generate a JSON schema!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.