MCPcopy
hub / github.com/NginxProxyManager/nginx-proxy-manager / getValidationSchema

Function getValidationSchema

backend/schema/index.js:31–44  ·  view source on GitHub ↗
(path, method)

Source from the content-addressed store, hash-verified

29 * @returns string|null
30 */
31const getValidationSchema = (path, method) => {
32 if (
33 compiledSchema !== null &&
34 typeof compiledSchema.paths[path] !== "undefined" &&
35 typeof compiledSchema.paths[path][method] !== "undefined" &&
36 typeof compiledSchema.paths[path][method].requestBody !== "undefined" &&
37 typeof compiledSchema.paths[path][method].requestBody.content !== "undefined" &&
38 typeof compiledSchema.paths[path][method].requestBody.content["application/json"] !== "undefined" &&
39 typeof compiledSchema.paths[path][method].requestBody.content["application/json"].schema !== "undefined"
40 ) {
41 return compiledSchema.paths[path][method].requestBody.content["application/json"].schema;
42 }
43 return null;
44};
45
46export { getCompiledSchema, getValidationSchema };

Callers 9

tokens.jsFile · 0.90
users.jsFile · 0.90
settings.jsFile · 0.90
proxy_hosts.jsFile · 0.90
access_lists.jsFile · 0.90
streams.jsFile · 0.90
certificates.jsFile · 0.90
dead_hosts.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected