@Restricted(NoExternalUse.class)
    public void doSchema(StaplerRequest2 req, StaplerResponse2 res) throws Exception {
        if (!Jenkins.get().hasPermission(Jenkins.SYSTEM_READ)) {
            res.sendError(HttpServletResponse.SC_FORBIDDEN);
            return;
        }

        res.setContentType("application/json; charset=utf-8");
        res.getWriter().print(writeJSONSchema());
    }
Export JSONSchema to URL
@throws Exception
plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java