All Projects → abiosoft → caddy-json-schema

abiosoft / caddy-json-schema

Licence: Apache-2.0 License
JSON schema generator for Caddy v2

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to caddy-json-schema

souin
An HTTP cache system, RFC compliant, compatible with @TykTechnologies, @traefik, @caddyserver, @go-chi, @bnkamalesh, @beego, @devfeel, @labstack, @gofiber, @go-goyave, @gin-gonic, @zalando, @zeromicro, @nginx and @apache
Stars: ✭ 269 (+326.98%)
Mutual labels:  caddy, caddyserver, caddy-plugin, caddy-module
caddy-authorize
Authorization Plugin for Caddy v2 (JWT/PASETO)
Stars: ✭ 235 (+273.02%)
Mutual labels:  caddy, caddy-plugin, caddy-module
caddygit
Git module for Caddy v2
Stars: ✭ 67 (+6.35%)
Mutual labels:  caddy, caddy-plugin, caddy-module
caddy-exec
Caddy v2 module for running one-off commands
Stars: ✭ 48 (-23.81%)
Mutual labels:  caddy, caddyserver, caddy-module
caddy-esi
Middleware for Caddy Server integrating ESI (edge side includes) tags with parallel loading. Able to connect to HTTP/S/2, Memcache, Redis, shell scripts, gRPC and SQL backends 🐜🐜🐜
Stars: ✭ 28 (-55.56%)
Mutual labels:  caddy, caddyserver
caddy-ratelimit
HTTP rate limiting module for Caddy 2
Stars: ✭ 72 (+14.29%)
Mutual labels:  caddy, caddy-module
Loginsrv
JWT login microservice with plugable backends such as OAuth2, Google, Github, htpasswd, osiam, ..
Stars: ✭ 1,835 (+2812.7%)
Mutual labels:  caddy, caddyserver
ssss
Stupid Simple Seedbox Script
Stars: ✭ 19 (-69.84%)
Mutual labels:  caddy, caddyserver
caddy-tlsconsul
🔒 Consul K/V storage for Caddy Web Server / Certmagic TLS data
Stars: ✭ 89 (+41.27%)
Mutual labels:  caddy, caddyserver
coraza-caddy
OWASP Coraza middleware for Caddy. It provides Web Application Firewall capabilities
Stars: ✭ 75 (+19.05%)
Mutual labels:  caddy, caddyserver
vscode-caddyfile-support
Rich Caddyfile support for Visual Studio Code
Stars: ✭ 30 (-52.38%)
Mutual labels:  caddy, caddyserver
caddy-crowdsec-bouncer
A Caddy module that blocks malicious traffic based on decisions made by CrowdSec.
Stars: ✭ 40 (-36.51%)
Mutual labels:  caddy, caddyserver
caddy-trace
Request Debugging Middleware Plugin for Caddy v2
Stars: ✭ 25 (-60.32%)
Mutual labels:  caddy, caddy-plugin
form-pa
A flexible and configurable form based on json schema
Stars: ✭ 13 (-79.37%)
Mutual labels:  json-schema
json-schema-inferrer
Java library for inferring JSON schema from sample JSONs
Stars: ✭ 78 (+23.81%)
Mutual labels:  json-schema
home
This is the home page for the API specification toolbox.
Stars: ✭ 16 (-74.6%)
Mutual labels:  json-schema
jarvis
🍿 Simple Home Media Stack
Stars: ✭ 28 (-55.56%)
Mutual labels:  caddy
caddy-docker
Generate Caddy configuration on-the-fly from currently running Docker containers
Stars: ✭ 72 (+14.29%)
Mutual labels:  caddy
svelte-form
JSON Schema form for Svelte v3
Stars: ✭ 47 (-25.4%)
Mutual labels:  json-schema
JSON-NLP
JSON-NLP Schema for transfer of NLP output using JSON
Stars: ✭ 38 (-39.68%)
Mutual labels:  json-schema

caddy-json-schema

JSON schema generator for Caddy v2.

The generated schema can be integrated with editors for intellisense and better experience with configuration and plugin development.

Demonstration

Installation

The generated schema is for the caddy binary. i.e. all modules in the binary will be include in the schema.

xcaddy build v2.4.1 \
    --with github.com/abiosoft/caddy-json-schema \
    # any other module you want to include in the generated schema

Usage

Run caddy help json-schema to view help.

usage:
  caddy json-schema [--output <file>] [--indent <int>] [--vscode] [--no-cache]

flags:
  -indent int
        Number of spaces to indent the generated JSON with (default 2)
  -no-cache
        Discard local cache and fetch latest API docs
  -output string
        The file to write the generated schema (default "./caddy_schema.json")
  -vscode
        Generate VSCode configuration

Editors

Visual Studio Code

caddy json-schema --vscode generates Visual Studio Code configuration in the current directory.

Open the directory in Visual Studio Code and it should just work. Ensure the config filename is of the format *caddy*.[json|yaml].

Note that you need vscode-yaml plugin to get similar experience for YAML files.

Vim/NeoVim

There are multiple Vim/NeoVim plugins with language server and JSON schema support.

Below is a config for coc-json and coc-yaml. The path to schema file is relative to the config file being edited.

{
  "json.schemas": [
    {
      "fileMatch": ["*caddy*.json"],
      "url": "./caddy_schema.json"
    }
  ],
  "yaml.schemas": {
    ".vscode/caddy_schema.json": ["*caddy*.yaml", "*caddy*.yml"]
  }
}

Features

Modules Intellisense Documentation
Standard Supported Supported
Third Party Supported Supported (if plugin is registered on caddyserver.com)

License

Apache 2

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].