UNPKG

k-fastify-gateway

Version:
93 lines (92 loc) 1.97 kB
{ "$id": "https://github.com/jkyberneees/fastify-gateway/src/config-schema.json", "type": "object", "properties": { "middlewares": { "type": "array" }, "pathRegex": { "type": "string", "title": "Global PathRegex Schema ", "examples": [ "/*", "*", "" ] }, "routes": { "type": "array", "items": { "type": "object", "properties": { "prefix": { "type": "string", "title": "The Prefix Schema ", "minLength": 2, "examples": [ "/v1/users" ] }, "prefixRewrite": { "type": "string", "title": "The PrefixRewrite Schema ", "examples": [ "/v1" ] }, "target": { "type": "string", "title": "The Target Schema ", "examples": [ "http://users.api:3000" ] }, "pathRegex": { "type": "string", "title": "The PathRegex Schema ", "examples": [ "/*", "*" ] }, "methods": { "type": "array", "items": { "type": "string", "enum": [ "DELETE", "GET", "HEAD", "PATCH", "POST", "PUT", "OPTIONS" ] }, "examples": [ [ "GET" ] ] }, "middlewares": { "type": "array" }, "bodyLimit": { "type": "number" }, "hooks": { "type": "object" } }, "required": [ "target", "prefix" ] } } }, "required": [ "routes" ] }