From 774506b85771c0de469d8a4fccb105703eef682d Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 7 Aug 2019 21:43:33 +0530 Subject: [PATCH 01/93] Added initial schema test --- .../io/jenkins/plugins/casc/SchemaTest.java | 31 +++++++++++++++++++ .../io/jenkins/plugins/casc/SchemaTest.yml | 0 2 files changed, 31 insertions(+) create mode 100644 integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java create mode 100644 integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java new file mode 100644 index 0000000000..aa17d7e9a5 --- /dev/null +++ b/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java @@ -0,0 +1,31 @@ +package io.jenkins.plugins.casc; + +import com.gargoylesoftware.htmlunit.WebRequest; +import com.gargoylesoftware.htmlunit.WebResponse; +import io.jenkins.plugins.casc.misc.ConfiguredWithCode; +import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; +import org.junit.Rule; +import org.junit.Test; +import org.jvnet.hudson.test.JenkinsRule; + +import static com.gargoylesoftware.htmlunit.HttpMethod.POST; +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; + +public class SchemaTest { + + @Rule + public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); + + @Test + @ConfiguredWithCode("SchemaTest.yml") + public void schemaConfigurationTest() throws Exception { + JenkinsRule.WebClient client = j.createWebClient(); + WebRequest request = + new WebRequest(client.createCrumbedUrl("configuration-as-code/schema"), POST); + WebResponse response = client.loadWebResponse(request); + assertThat(response.getStatusCode(), is(200)); + + } + +} diff --git a/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml b/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml new file mode 100644 index 0000000000..e69de29bb2 From 7051ca90458f60a4f8225a868f39fda3ac284b8e Mon Sep 17 00:00:00 2001 From: Sladyn Date: Thu, 8 Aug 2019 19:23:55 +0530 Subject: [PATCH 02/93] Added Schema Validation functions --- .../io/jenkins/plugins/casc/SchemaTest.java | 41 +++++++++++++++++++ .../io/jenkins/plugins/casc/SchemaTest.yml | 5 +++ 2 files changed, 46 insertions(+) diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java index aa17d7e9a5..ca13fcdf9e 100644 --- a/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java +++ b/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java @@ -1,16 +1,28 @@ package io.jenkins.plugins.casc; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.gargoylesoftware.htmlunit.WebRequest; import com.gargoylesoftware.htmlunit.WebResponse; import io.jenkins.plugins.casc.misc.ConfiguredWithCode; import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; +import org.jenkinsci.plugins.pipeline.modeldefinition.shaded.com.fasterxml.jackson.databind.JsonNode; +import org.jenkinsci.plugins.pipeline.modeldefinition.shaded.com.github.fge.jsonschema.main.JsonSchemaFactory; +import org.jenkinsci.plugins.pipeline.modeldefinition.shaded.com.github.fge.jsonschema.main.JsonValidator; +import org.jenkinsci.plugins.pipeline.modeldefinition.shaded.com.github.fge.jsonschema.report.ProcessingReport; +import org.jenkinsci.plugins.pipeline.modeldefinition.shaded.com.github.fge.jsonschema.util.JsonLoader; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; + import static com.gargoylesoftware.htmlunit.HttpMethod.POST; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; public class SchemaTest { @@ -25,7 +37,36 @@ public void schemaConfigurationTest() throws Exception { new WebRequest(client.createCrumbedUrl("configuration-as-code/schema"), POST); WebResponse response = client.loadWebResponse(request); assertThat(response.getStatusCode(), is(200)); + String schema = response.getContentAsString(); + String contents = new String(Files.readAllBytes(Paths.get("./src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml"))); + String json = convertYamlToJson((contents)); + validateJsonData(schema,json); + + } + + String convertYamlToJson(String yaml) throws IOException { + ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory()); + Object obj = yamlReader.readValue(yaml, Object.class); + ObjectMapper jsonWriter = new ObjectMapper(); + return jsonWriter.writeValueAsString(obj); } + private void validateJsonData(final String jsonSchema, final String jsonData) throws IOException { + final JsonNode data = JsonLoader.fromString(jsonData); + final JsonNode schema = JsonLoader.fromString(jsonSchema); + + final JsonSchemaFactory factory = JsonSchemaFactory.byDefault(); + JsonValidator validator = factory.getValidator(); + + ProcessingReport report = null; + try { + report = validator.validate(schema, data); + } catch (Exception e) { + System.out.println("Invalid Schema"); + e.printStackTrace(); + } + + assertTrue(report.isSuccess()); + } } diff --git a/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml b/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml index e69de29bb2..32b94cdfd1 100644 --- a/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml +++ b/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml @@ -0,0 +1,5 @@ +Jenkins: + systemMessage: "Jenkins configured automatically by Jenkins Configuration as Code plugin\n\n" + numExecutors: 2 + scmCheckoutRetryCount: 2 + mode: NORMAL \ No newline at end of file From f1b2d300136f462d11c06552b2d5d691b787997b Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 10 Aug 2019 14:44:21 +0530 Subject: [PATCH 03/93] Added test jsonSchemGenerator --- .../io/jenkins/plugins/casc/SchemaTest.java | 4 ++-- plugin/pom.xml | 6 ++++++ .../jenkins/plugins/casc/SchemaGenerator.java | 20 +++++++++++++++++++ .../jenkins/plugins/casc/SchemaObjects.java | 9 +++++++++ .../plugins/casc/SchemaGeneratorTest.java | 19 ++++++++++++++++++ pom.xml | 6 ++++++ 6 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 plugin/src/main/java/io/jenkins/plugins/casc/SchemaGenerator.java create mode 100644 plugin/src/main/java/io/jenkins/plugins/casc/SchemaObjects.java create mode 100644 plugin/src/test/java/io/jenkins/plugins/casc/SchemaGeneratorTest.java diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java index ca13fcdf9e..8452a66987 100644 --- a/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java +++ b/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java @@ -38,10 +38,10 @@ public void schemaConfigurationTest() throws Exception { WebResponse response = client.loadWebResponse(request); assertThat(response.getStatusCode(), is(200)); String schema = response.getContentAsString(); - String contents = new String(Files.readAllBytes(Paths.get("./src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml"))); + System.out.println("This is the schema" + schema); + String contents = new String(Files.readAllBytes(Paths.get(getClass().getResource("SchemaTest.yml").toURI()))); String json = convertYamlToJson((contents)); validateJsonData(schema,json); - } String convertYamlToJson(String yaml) throws IOException { diff --git a/plugin/pom.xml b/plugin/pom.xml index 0b5955ea96..0af971fe31 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -68,6 +68,12 @@ 1.10.6 test + + com.fasterxml.jackson.core + jackson-databind + 2.9.8 + compile + diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGenerator.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGenerator.java new file mode 100644 index 0000000000..26006f3da2 --- /dev/null +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGenerator.java @@ -0,0 +1,20 @@ +package io.jenkins.plugins.casc; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.kjetland.jackson.jsonSchema.JsonSchemaGenerator; + +public class SchemaGenerator { + + + public String generateSchema() throws JsonProcessingException { + + ObjectMapper objectMapper = new ObjectMapper(); + JsonSchemaGenerator jsonSchemaGenerator = new JsonSchemaGenerator(objectMapper); + JsonNode jsonSchema = jsonSchemaGenerator.generateJsonSchema(SchemaObjects.class); + String jsonSchemaAsString = objectMapper.writeValueAsString(jsonSchema); + return jsonSchemaAsString; + + } +} diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaObjects.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaObjects.java new file mode 100644 index 0000000000..bd5e95a852 --- /dev/null +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaObjects.java @@ -0,0 +1,9 @@ +package io.jenkins.plugins.casc; + +import javax.validation.constraints.NotNull; + +public class SchemaObjects { + + @NotNull + public String foo; +} diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGeneratorTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGeneratorTest.java new file mode 100644 index 0000000000..7445cafa79 --- /dev/null +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGeneratorTest.java @@ -0,0 +1,19 @@ +package io.jenkins.plugins.casc; + +import org.apache.commons.httpclient.HttpStatus; +import org.junit.Test; +import org.kohsuke.stapler.RequestImpl; +import org.kohsuke.stapler.ResponseImpl; + +import java.io.IOException; + +public class SchemaGeneratorTest { + + @Test + public void schemaShouldSucceed() throws IOException { + + SchemaGenerator schemaGenerator = new SchemaGenerator(); + System.out.println(schemaGenerator.generateSchema()); + + } +} diff --git a/pom.xml b/pom.xml index f89cc7c77a..8f19b2569c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,12 @@ 4.0.0 + + + com.kjetland + mbknor-jackson-jsonschema_2.12 + 1.0.34 + org.jenkins-ci.plugins plugin From 17079c789b2ed07a7006f601b8e59203a1976fcd Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 16 Aug 2019 23:31:42 +0530 Subject: [PATCH 04/93] Added test to generate an intermediate schema --- .../io/jenkins/plugins/casc/SchemaTest.java | 72 ------------------- .../io/jenkins/plugins/casc/SchemaTest.yml | 11 +-- plugin/pom.xml | 18 +++++ .../plugins/casc/SchemaGeneration.java | 21 ++++++ .../jenkins/plugins/casc/SchemaGenerator.java | 20 ------ .../plugins/casc/SchemaGenerationTest.java | 62 ++++++++++++++++ .../plugins/casc/SchemaGeneratorTest.java | 19 ----- 7 files changed, 107 insertions(+), 116 deletions(-) delete mode 100644 integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java create mode 100644 plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java delete mode 100644 plugin/src/main/java/io/jenkins/plugins/casc/SchemaGenerator.java create mode 100644 plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java delete mode 100644 plugin/src/test/java/io/jenkins/plugins/casc/SchemaGeneratorTest.java diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java deleted file mode 100644 index 8452a66987..0000000000 --- a/integrations/src/test/java/io/jenkins/plugins/casc/SchemaTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package io.jenkins.plugins.casc; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; -import com.gargoylesoftware.htmlunit.WebRequest; -import com.gargoylesoftware.htmlunit.WebResponse; -import io.jenkins.plugins.casc.misc.ConfiguredWithCode; -import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; -import org.jenkinsci.plugins.pipeline.modeldefinition.shaded.com.fasterxml.jackson.databind.JsonNode; -import org.jenkinsci.plugins.pipeline.modeldefinition.shaded.com.github.fge.jsonschema.main.JsonSchemaFactory; -import org.jenkinsci.plugins.pipeline.modeldefinition.shaded.com.github.fge.jsonschema.main.JsonValidator; -import org.jenkinsci.plugins.pipeline.modeldefinition.shaded.com.github.fge.jsonschema.report.ProcessingReport; -import org.jenkinsci.plugins.pipeline.modeldefinition.shaded.com.github.fge.jsonschema.util.JsonLoader; -import org.junit.Rule; -import org.junit.Test; -import org.jvnet.hudson.test.JenkinsRule; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; - -import static com.gargoylesoftware.htmlunit.HttpMethod.POST; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - -public class SchemaTest { - - @Rule - public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); - - @Test - @ConfiguredWithCode("SchemaTest.yml") - public void schemaConfigurationTest() throws Exception { - JenkinsRule.WebClient client = j.createWebClient(); - WebRequest request = - new WebRequest(client.createCrumbedUrl("configuration-as-code/schema"), POST); - WebResponse response = client.loadWebResponse(request); - assertThat(response.getStatusCode(), is(200)); - String schema = response.getContentAsString(); - System.out.println("This is the schema" + schema); - String contents = new String(Files.readAllBytes(Paths.get(getClass().getResource("SchemaTest.yml").toURI()))); - String json = convertYamlToJson((contents)); - validateJsonData(schema,json); - } - - String convertYamlToJson(String yaml) throws IOException { - ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory()); - Object obj = yamlReader.readValue(yaml, Object.class); - - ObjectMapper jsonWriter = new ObjectMapper(); - return jsonWriter.writeValueAsString(obj); - } - - private void validateJsonData(final String jsonSchema, final String jsonData) throws IOException { - final JsonNode data = JsonLoader.fromString(jsonData); - final JsonNode schema = JsonLoader.fromString(jsonSchema); - - final JsonSchemaFactory factory = JsonSchemaFactory.byDefault(); - JsonValidator validator = factory.getValidator(); - - ProcessingReport report = null; - try { - report = validator.validate(schema, data); - } catch (Exception e) { - System.out.println("Invalid Schema"); - e.printStackTrace(); - } - - assertTrue(report.isSuccess()); - } -} diff --git a/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml b/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml index 32b94cdfd1..c9eeb3aaf9 100644 --- a/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml +++ b/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml @@ -1,5 +1,6 @@ -Jenkins: - systemMessage: "Jenkins configured automatically by Jenkins Configuration as Code plugin\n\n" - numExecutors: 2 - scmCheckoutRetryCount: 2 - mode: NORMAL \ No newline at end of file +jenkins: + globalNodeProperties: + - envVars: + env: + - key: FOO + value: BAR diff --git a/plugin/pom.xml b/plugin/pom.xml index 0af971fe31..b723d04da2 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -74,6 +74,24 @@ 2.9.8 compile + + org.jenkins-ci.plugins + credentials + 2.2.0 + compile + + + io.jenkins + configuration-as-code + 1.28-SNAPSHOT + compile + + + io.jenkins + configuration-as-code + 1.28-SNAPSHOT + compile + diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java new file mode 100644 index 0000000000..90f6a5e849 --- /dev/null +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -0,0 +1,21 @@ +package io.jenkins.plugins.casc; + + +import java.util.LinkedHashSet; + +public class SchemaGeneration { + + + public String generateSchema() { + + /* + * + * The Code to generate the schema needs to be attached here. + * + * + * + * */ + + return null; + } +} diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGenerator.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGenerator.java deleted file mode 100644 index 26006f3da2..0000000000 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGenerator.java +++ /dev/null @@ -1,20 +0,0 @@ -package io.jenkins.plugins.casc; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.kjetland.jackson.jsonSchema.JsonSchemaGenerator; - -public class SchemaGenerator { - - - public String generateSchema() throws JsonProcessingException { - - ObjectMapper objectMapper = new ObjectMapper(); - JsonSchemaGenerator jsonSchemaGenerator = new JsonSchemaGenerator(objectMapper); - JsonNode jsonSchema = jsonSchemaGenerator.generateJsonSchema(SchemaObjects.class); - String jsonSchemaAsString = objectMapper.writeValueAsString(jsonSchema); - return jsonSchemaAsString; - - } -} diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java new file mode 100644 index 0000000000..5a73bf9fd0 --- /dev/null +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -0,0 +1,62 @@ +package io.jenkins.plugins.casc; + +import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; +import org.apache.log4j.spi.Configurator; +import org.junit.Rule; +import org.junit.Test; +import java.util.*; + + +import java.io.IOException; +import java.util.LinkedHashSet; + +import static org.junit.Assert.*; + +public class SchemaGenerationTest { + + + @Rule + public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); + + + @Test + public void schemaShouldSucceed() { + + LinkedHashSet linkedHashSet = new LinkedHashSet <> (ConfigurationAsCode.get().getRootConfigurators()); + Iterator i = linkedHashSet.iterator(); + + StringBuilder schemaString = new StringBuilder(); + schemaString.append("{\n" + + " \"$schema\": \"http://json-schema.org/draft-06/schema#\",\n" + + " \"id\": \"http://jenkins.io/configuration-as-code#\",\n" + + " \"description\": \"Jenkins Configuration as Code\",\n" + + " \"type\": \"object\",\n" + + " \"properties\": {\n" + + ""); + + while (i.hasNext()) { + List attributeList = new ArrayList<>(i.next().getAttributes()); + for (Attribute a :attributeList) { + String type; + + if(a.type.toString().equals("int")){ + type = "int"; + } else if (a.type.toString().equals("class java.lang.String")) { + type = "string"; + } else if (a.type.toString().equals("boolean")) { + type = "boolean"; + } else { + type = "object"; + } + + schemaString.append(a.name + ": " + "{\n" + + " \"type\": \"" + type + "\",\n" + + " \"$ref\": \"#/definitions/" + a.type.getName() + "\"\n" + + " },"); + + } + } + + System.out.println(schemaString); + } +} \ No newline at end of file diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGeneratorTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGeneratorTest.java deleted file mode 100644 index 7445cafa79..0000000000 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGeneratorTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package io.jenkins.plugins.casc; - -import org.apache.commons.httpclient.HttpStatus; -import org.junit.Test; -import org.kohsuke.stapler.RequestImpl; -import org.kohsuke.stapler.ResponseImpl; - -import java.io.IOException; - -public class SchemaGeneratorTest { - - @Test - public void schemaShouldSucceed() throws IOException { - - SchemaGenerator schemaGenerator = new SchemaGenerator(); - System.out.println(schemaGenerator.generateSchema()); - - } -} From 886bc5aa69b1ed4c99d4269c48a66bce4aec04b7 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 17 Aug 2019 21:53:12 +0530 Subject: [PATCH 05/93] Added schema generation for a single descriptor --- plugin/pom.xml | 12 --- .../jenkins/plugins/casc/SchemaObjects.java | 9 -- .../plugins/casc/SchemaGenerationTest.java | 94 ++++++++++++++++--- pom.xml | 6 -- 4 files changed, 81 insertions(+), 40 deletions(-) delete mode 100644 plugin/src/main/java/io/jenkins/plugins/casc/SchemaObjects.java diff --git a/plugin/pom.xml b/plugin/pom.xml index b723d04da2..587c8dfb64 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -80,18 +80,6 @@ 2.2.0 compile - - io.jenkins - configuration-as-code - 1.28-SNAPSHOT - compile - - - io.jenkins - configuration-as-code - 1.28-SNAPSHOT - compile - diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaObjects.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaObjects.java deleted file mode 100644 index bd5e95a852..0000000000 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaObjects.java +++ /dev/null @@ -1,9 +0,0 @@ -package io.jenkins.plugins.casc; - -import javax.validation.constraints.NotNull; - -public class SchemaObjects { - - @NotNull - public String foo; -} diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 5a73bf9fd0..3174b8feef 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -1,28 +1,35 @@ package io.jenkins.plugins.casc; +import hudson.DescriptorExtensionList; +import hudson.model.UpdateSite; +import hudson.util.DirScanner; +import io.jenkins.plugins.casc.core.*; +import io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator; +import io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator; +import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; -import org.apache.log4j.spi.Configurator; import org.junit.Rule; import org.junit.Test; import java.util.*; -import java.io.IOException; import java.util.LinkedHashSet; -import static org.junit.Assert.*; -public class SchemaGenerationTest { +public class SchemaGenerationTest{ @Rule public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); - @Test public void schemaShouldSucceed() { - LinkedHashSet linkedHashSet = new LinkedHashSet <> (ConfigurationAsCode.get().getRootConfigurators()); + + /** + * Used to generate the schema for root configurators + */ + LinkedHashSet linkedHashSet = new LinkedHashSet<>(ConfigurationAsCode.get().getRootConfigurators()); Iterator i = linkedHashSet.iterator(); StringBuilder schemaString = new StringBuilder(); @@ -35,12 +42,12 @@ public void schemaShouldSucceed() { ""); while (i.hasNext()) { + List attributeList = new ArrayList<>(i.next().getAttributes()); - for (Attribute a :attributeList) { + for (Attribute a : attributeList) { String type; - - if(a.type.toString().equals("int")){ - type = "int"; + if (a.type.toString().equals("int")) { + type = "int"; } else if (a.type.toString().equals("class java.lang.String")) { type = "string"; } else if (a.type.toString().equals("boolean")) { @@ -48,15 +55,76 @@ public void schemaShouldSucceed() { } else { type = "object"; } - schemaString.append(a.name + ": " + "{\n" + " \"type\": \"" + type + "\",\n" + " \"$ref\": \"#/definitions/" + a.type.getName() + "\"\n" + " },"); - } } +// System.out.println(schemaString); + + /** + * Used to generate the schema for the descriptors + * Finds out the instance of each of the configurators + * and gets the required descriptors from the instance method. + */ + ConfigurationAsCode configurationAsCode = ConfigurationAsCode.get(); + configurationAsCode.getConfigurators() + .stream() + .forEach(configurator -> { + + DescriptorExtensionList descriptorExtensionList = null; + + if(configurator instanceof HeteroDescribableConfigurator) { + HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configurator; + descriptorExtensionList = j.jenkins.getDescriptorList(heteroDescribableConfigurator.getTarget()); + + } else if (configurator instanceof DataBoundConfigurator){ + DataBoundConfigurator dataBoundConfigurator = (DataBoundConfigurator) configurator; + descriptorExtensionList = j.jenkins.getDescriptorList(dataBoundConfigurator.getTarget()); + + + } else if (configurator instanceof JenkinsConfigurator) { + JenkinsConfigurator jenkinsConfigurator = (JenkinsConfigurator) configurator; + descriptorExtensionList = j.jenkins.getDescriptorList(jenkinsConfigurator.getTarget()); + + } else if (configurator instanceof GlobalConfigurationCategoryConfigurator) { + GlobalConfigurationCategoryConfigurator globalConfigurationCategoryConfigurator = (GlobalConfigurationCategoryConfigurator) configurator; + descriptorExtensionList = j.jenkins.getDescriptorList(globalConfigurationCategoryConfigurator.getTarget()); + + } else if (configurator instanceof UnsecuredAuthorizationStrategyConfigurator) { + UnsecuredAuthorizationStrategyConfigurator unsecuredAuthorizationStrategyConfigurator = (UnsecuredAuthorizationStrategyConfigurator) configurator; + descriptorExtensionList = j.jenkins.getDescriptorList(unsecuredAuthorizationStrategyConfigurator.getTarget()); + + } else if (configurator instanceof UpdateCenterConfigurator) { + UpdateCenterConfigurator updateCenterConfigurator = (UpdateCenterConfigurator) configurator; + descriptorExtensionList = j.jenkins.getDescriptorList(updateCenterConfigurator.getTarget()); + + } else if (configurator instanceof HudsonPrivateSecurityRealmConfigurator) { + HudsonPrivateSecurityRealmConfigurator hudsonPConfigurator = (HudsonPrivateSecurityRealmConfigurator) configurator; + descriptorExtensionList = j.jenkins.getDescriptorList(hudsonPConfigurator.getTarget()); + + } else if (configurator instanceof UpdateSiteConfigurator) { + UpdateSiteConfigurator updateSiteConfigurator = (UpdateSiteConfigurator) configurator; + descriptorExtensionList = j.jenkins.getDescriptorList(updateSiteConfigurator.getTarget()); + + } else if (configurator instanceof JNLPLauncherConfigurator) { + JNLPLauncherConfigurator jLaunchConfigurator = (JNLPLauncherConfigurator) configurator; + descriptorExtensionList = j.jenkins.getDescriptorList(jLaunchConfigurator.getTarget()); + } + + /** + * Iterate over the list and generate the schema + */ + +// + for (Object obj: descriptorExtensionList) { + /* + * Iterate over the obj list and construct the schema. + * */ + } + }); - System.out.println(schemaString); } + } \ No newline at end of file diff --git a/pom.xml b/pom.xml index 8f19b2569c..f89cc7c77a 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,6 @@ 4.0.0 - - - com.kjetland - mbknor-jackson-jsonschema_2.12 - 1.0.34 - org.jenkins-ci.plugins plugin From 0271cd3d133d8b7407ba5acdd468303a37727ba4 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 21 Aug 2019 09:47:23 +0530 Subject: [PATCH 06/93] Completed the string generation 2/4 of the schema --- integrations/pom.xml | 2 +- .../plugins/casc/SchemaGeneration.java | 126 ++++++++++++++++-- .../plugins/casc/SchemaGenerationTest.java | 110 +-------------- 3 files changed, 120 insertions(+), 118 deletions(-) diff --git a/integrations/pom.xml b/integrations/pom.xml index 04b55a4e2e..a24974b27e 100644 --- a/integrations/pom.xml +++ b/integrations/pom.xml @@ -253,7 +253,7 @@ org.jenkins-ci.plugins structs - 1.17 + 1.19 test diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 90f6a5e849..bdb2d8f851 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,21 +1,127 @@ package io.jenkins.plugins.casc; - +import hudson.DescriptorExtensionList; +import io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator; +import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; +import java.util.ArrayList; +import java.util.Iterator; import java.util.LinkedHashSet; +import java.util.List; +import jenkins.model.Jenkins; public class SchemaGeneration { - public String generateSchema() { - /* - * - * The Code to generate the schema needs to be attached here. - * - * - * - * */ + LinkedHashSet linkedHashSet = new LinkedHashSet<>(ConfigurationAsCode.get().getRootConfigurators()); + Iterator i = linkedHashSet.iterator(); + + StringBuilder schemaString = new StringBuilder(); + schemaString.append("{\n" + + " \"$schema\": \"http://json-schema.org/draft-06/schema#\",\n" + + " \"id\": \"http://jenkins.io/configuration-as-code#\",\n" + + " \"description\": \"Jenkins Configuration as Code\",\n" + + " \"type\": \"object\",\n" + + " \"properties\": {\n" + + ""); + + while (i.hasNext()) { + + List attributeList = new ArrayList<>(i.next().getAttributes()); + for (Attribute a : attributeList) { + String type; + if (a.type.toString().equals("int")) { + type = "int"; + } else if (a.type.toString().equals("class java.lang.String")) { + type = "string"; + } else if (a.type.toString().equals("boolean")) { + type = "boolean"; + } else { + type = "object"; + } + schemaString.append(a.name + ": " + "{\n" + + " \"type\": \"" + type + "\",\n" + + " \"$ref\": \"#/definitions/" + a.type.getName() + "\"\n" + + " },"); + } + } + System.out.println(schemaString); + + /** + * Used to generate the schema for the descriptors + * Finds out the instance of each of the configurators + * and gets the required descriptors from the instance method. + * Appending the oneOf tag to the schema. + */ + + schemaString.append("schema\" : {\n" + + " \"oneOf\": ["); + + ConfigurationAsCode configurationAsCode = ConfigurationAsCode.get(); + configurationAsCode.getConfigurators() + .stream() + .forEach(configurator -> { + + DescriptorExtensionList descriptorExtensionList = null; + System.out.println(configurator.getClass().getName()); + if(configurator instanceof HeteroDescribableConfigurator) { + HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configurator; + descriptorExtensionList = Jenkins.getInstance().getDescriptorList(heteroDescribableConfigurator.getTarget()); + + } else if (configurator instanceof DataBoundConfigurator) { + DataBoundConfigurator dataBoundConfigurator = (DataBoundConfigurator) configurator; + descriptorExtensionList = Jenkins.getInstance().getDescriptorList(dataBoundConfigurator.getTarget()); + } + +// } else if (configurator instanceof JenkinsConfigurator) { +// JenkinsConfigurator jenkinsConfigurator = (JenkinsConfigurator) configurator; +// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(jenkinsConfigurator.getTarget()); +// +// } else if (configurator instanceof GlobalConfigurationCategoryConfigurator) { +// GlobalConfigurationCategoryConfigurator globalConfigurationCategoryConfigurator = (GlobalConfigurationCategoryConfigurator) configurator; +// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(globalConfigurationCategoryConfigurator.getTarget()); +// +// } else if (configurator instanceof UnsecuredAuthorizationStrategyConfigurator) { +// UnsecuredAuthorizationStrategyConfigurator unsecuredAuthorizationStrategyConfigurator = (UnsecuredAuthorizationStrategyConfigurator) configurator; +// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(unsecuredAuthorizationStrategyConfigurator.getTarget()); +// +// } else if (configurator instanceof UpdateCenterConfigurator) { +// UpdateCenterConfigurator updateCenterConfigurator = (UpdateCenterConfigurator) configurator; +// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(updateCenterConfigurator.getTarget()); +// +// } else if (configurator instanceof HudsonPrivateSecurityRealmConfigurator) { +// HudsonPrivateSecurityRealmConfigurator hudsonPConfigurator = (HudsonPrivateSecurityRealmConfigurator) configurator; +// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(hudsonPConfigurator.getTarget()); +// +// } else if (configurator instanceof UpdateSiteConfigurator) { +// UpdateSiteConfigurator updateSiteConfigurator = (UpdateSiteConfigurator) configurator; +// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(updateSiteConfigurator.getTarget()); +// +// } else if (configurator instanceof JNLPLauncherConfigurator) { +// JNLPLauncherConfigurator jLaunchConfigurator = (JNLPLauncherConfigurator) configurator; +// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(jLaunchConfigurator.getTarget()); +// +// } else if (configurator instanceof AdminWhitelistRuleConfigurator) { +// AdminWhitelistRuleConfigurator adminWhitelistRuleConfigurator = (AdminWhitelistRuleConfigurator) configurator; +// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(adminWhitelistRuleConfigurator.getTarget()); +// +// } else if(configurator instanceof MavenConfigurator ) { +// MavenConfigurator mavenConfigurator = (MavenConfigurator) configurator; +// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(mavenConfigurator.getTarget()); +// } + /** + * Iterate over the list and generate the schema + */ + + for (Object obj: descriptorExtensionList) { + schemaString.append("{\n" + + " \"properties\" : {" + + " \"" + obj.getClass().getName() +"\"" + ": { \"$ref\" : \"#/definitions/" + + obj.toString() + "\" }" + + " }"); + } + }); - return null; + return schemaString.toString(); } } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 3174b8feef..01a51e5668 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -1,19 +1,8 @@ package io.jenkins.plugins.casc; -import hudson.DescriptorExtensionList; -import hudson.model.UpdateSite; -import hudson.util.DirScanner; -import io.jenkins.plugins.casc.core.*; -import io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator; -import io.jenkins.plugins.casc.impl.configurators.GlobalConfigurationCategoryConfigurator; -import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import org.junit.Rule; import org.junit.Test; -import java.util.*; - - -import java.util.LinkedHashSet; public class SchemaGenerationTest{ @@ -26,105 +15,12 @@ public class SchemaGenerationTest{ public void schemaShouldSucceed() { - /** - * Used to generate the schema for root configurators - */ - LinkedHashSet linkedHashSet = new LinkedHashSet<>(ConfigurationAsCode.get().getRootConfigurators()); - Iterator i = linkedHashSet.iterator(); - - StringBuilder schemaString = new StringBuilder(); - schemaString.append("{\n" + - " \"$schema\": \"http://json-schema.org/draft-06/schema#\",\n" + - " \"id\": \"http://jenkins.io/configuration-as-code#\",\n" + - " \"description\": \"Jenkins Configuration as Code\",\n" + - " \"type\": \"object\",\n" + - " \"properties\": {\n" + - ""); - - while (i.hasNext()) { - - List attributeList = new ArrayList<>(i.next().getAttributes()); - for (Attribute a : attributeList) { - String type; - if (a.type.toString().equals("int")) { - type = "int"; - } else if (a.type.toString().equals("class java.lang.String")) { - type = "string"; - } else if (a.type.toString().equals("boolean")) { - type = "boolean"; - } else { - type = "object"; - } - schemaString.append(a.name + ": " + "{\n" + - " \"type\": \"" + type + "\",\n" + - " \"$ref\": \"#/definitions/" + a.type.getName() + "\"\n" + - " },"); - } - } -// System.out.println(schemaString); /** - * Used to generate the schema for the descriptors - * Finds out the instance of each of the configurators - * and gets the required descriptors from the instance method. + *Validate the schema against a validator + * or against the already defined schema. */ - ConfigurationAsCode configurationAsCode = ConfigurationAsCode.get(); - configurationAsCode.getConfigurators() - .stream() - .forEach(configurator -> { - - DescriptorExtensionList descriptorExtensionList = null; - - if(configurator instanceof HeteroDescribableConfigurator) { - HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configurator; - descriptorExtensionList = j.jenkins.getDescriptorList(heteroDescribableConfigurator.getTarget()); - - } else if (configurator instanceof DataBoundConfigurator){ - DataBoundConfigurator dataBoundConfigurator = (DataBoundConfigurator) configurator; - descriptorExtensionList = j.jenkins.getDescriptorList(dataBoundConfigurator.getTarget()); - } else if (configurator instanceof JenkinsConfigurator) { - JenkinsConfigurator jenkinsConfigurator = (JenkinsConfigurator) configurator; - descriptorExtensionList = j.jenkins.getDescriptorList(jenkinsConfigurator.getTarget()); - - } else if (configurator instanceof GlobalConfigurationCategoryConfigurator) { - GlobalConfigurationCategoryConfigurator globalConfigurationCategoryConfigurator = (GlobalConfigurationCategoryConfigurator) configurator; - descriptorExtensionList = j.jenkins.getDescriptorList(globalConfigurationCategoryConfigurator.getTarget()); - - } else if (configurator instanceof UnsecuredAuthorizationStrategyConfigurator) { - UnsecuredAuthorizationStrategyConfigurator unsecuredAuthorizationStrategyConfigurator = (UnsecuredAuthorizationStrategyConfigurator) configurator; - descriptorExtensionList = j.jenkins.getDescriptorList(unsecuredAuthorizationStrategyConfigurator.getTarget()); - - } else if (configurator instanceof UpdateCenterConfigurator) { - UpdateCenterConfigurator updateCenterConfigurator = (UpdateCenterConfigurator) configurator; - descriptorExtensionList = j.jenkins.getDescriptorList(updateCenterConfigurator.getTarget()); - - } else if (configurator instanceof HudsonPrivateSecurityRealmConfigurator) { - HudsonPrivateSecurityRealmConfigurator hudsonPConfigurator = (HudsonPrivateSecurityRealmConfigurator) configurator; - descriptorExtensionList = j.jenkins.getDescriptorList(hudsonPConfigurator.getTarget()); - - } else if (configurator instanceof UpdateSiteConfigurator) { - UpdateSiteConfigurator updateSiteConfigurator = (UpdateSiteConfigurator) configurator; - descriptorExtensionList = j.jenkins.getDescriptorList(updateSiteConfigurator.getTarget()); - - } else if (configurator instanceof JNLPLauncherConfigurator) { - JNLPLauncherConfigurator jLaunchConfigurator = (JNLPLauncherConfigurator) configurator; - descriptorExtensionList = j.jenkins.getDescriptorList(jLaunchConfigurator.getTarget()); - } - - /** - * Iterate over the list and generate the schema - */ - -// - for (Object obj: descriptorExtensionList) { - /* - * Iterate over the obj list and construct the schema. - * */ - } - }); - } - -} \ No newline at end of file +} From 522f4e5115ff70d54c297d11d523abe4e347d7ec Mon Sep 17 00:00:00 2001 From: Sladyn Date: Thu, 22 Aug 2019 21:16:02 +0530 Subject: [PATCH 07/93] Added exclusion --- plugin/pom.xml | 6 ++++++ .../main/java/io/jenkins/plugins/casc/SchemaGeneration.java | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index 587c8dfb64..557aea12e4 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -79,6 +79,12 @@ credentials 2.2.0 compile + + + io.jenkins.configuration-as-code + configuration-as-code + + diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index bdb2d8f851..aac5433b87 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -73,11 +73,13 @@ public String generateSchema() { descriptorExtensionList = Jenkins.getInstance().getDescriptorList(dataBoundConfigurator.getTarget()); } -// } else if (configurator instanceof JenkinsConfigurator) { +// else if (configurator instanceof JenkinsConfigurator) { // JenkinsConfigurator jenkinsConfigurator = (JenkinsConfigurator) configurator; // descriptorExtensionList = Jenkins.getInstance().getDescriptorList(jenkinsConfigurator.getTarget()); // -// } else if (configurator instanceof GlobalConfigurationCategoryConfigurator) { +// } +// +// else if (configurator instanceof GlobalConfigurationCategoryConfigurator) { // GlobalConfigurationCategoryConfigurator globalConfigurationCategoryConfigurator = (GlobalConfigurationCategoryConfigurator) configurator; // descriptorExtensionList = Jenkins.getInstance().getDescriptorList(globalConfigurationCategoryConfigurator.getTarget()); // From f264c70ca759081877b4d44559d3b898e53a98c3 Mon Sep 17 00:00:00 2001 From: Joseph Petersen Date: Thu, 22 Aug 2019 19:45:20 +0200 Subject: [PATCH 08/93] generic get configurators --- plugin/pom.xml | 24 +++------ .../plugins/casc/SchemaGeneration.java | 50 ++++++++----------- .../plugins/casc/SchemaGenerationTest.java | 5 +- 3 files changed, 31 insertions(+), 48 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index 557aea12e4..ea0825702b 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -68,24 +68,12 @@ 1.10.6 test - - com.fasterxml.jackson.core - jackson-databind - 2.9.8 - compile - - - org.jenkins-ci.plugins - credentials - 2.2.0 - compile - - - io.jenkins.configuration-as-code - configuration-as-code - - - + + com.fasterxml.jackson.core + jackson-databind + 2.9.8 + compile + diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index aac5433b87..d6acd2f640 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,8 +1,6 @@ package io.jenkins.plugins.casc; import hudson.DescriptorExtensionList; -import io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator; -import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashSet; @@ -11,7 +9,7 @@ public class SchemaGeneration { - public String generateSchema() { + public static String generateSchema() { LinkedHashSet linkedHashSet = new LinkedHashSet<>(ConfigurationAsCode.get().getRootConfigurators()); Iterator i = linkedHashSet.iterator(); @@ -58,20 +56,15 @@ public String generateSchema() { " \"oneOf\": ["); ConfigurationAsCode configurationAsCode = ConfigurationAsCode.get(); - configurationAsCode.getConfigurators() - .stream() - .forEach(configurator -> { + for (Object configurator : configurationAsCode.getConfigurators()) { + DescriptorExtensionList descriptorExtensionList = null; + System.out.println(configurator.getClass().getName()); + if (configurator instanceof Configurator) { + Configurator c = (Configurator) configurator; + descriptorExtensionList = Jenkins.getInstance() + .getDescriptorList(c.getTarget()); - DescriptorExtensionList descriptorExtensionList = null; - System.out.println(configurator.getClass().getName()); - if(configurator instanceof HeteroDescribableConfigurator) { - HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configurator; - descriptorExtensionList = Jenkins.getInstance().getDescriptorList(heteroDescribableConfigurator.getTarget()); - - } else if (configurator instanceof DataBoundConfigurator) { - DataBoundConfigurator dataBoundConfigurator = (DataBoundConfigurator) configurator; - descriptorExtensionList = Jenkins.getInstance().getDescriptorList(dataBoundConfigurator.getTarget()); - } + } // else if (configurator instanceof JenkinsConfigurator) { // JenkinsConfigurator jenkinsConfigurator = (JenkinsConfigurator) configurator; @@ -111,19 +104,20 @@ public String generateSchema() { // MavenConfigurator mavenConfigurator = (MavenConfigurator) configurator; // descriptorExtensionList = Jenkins.getInstance().getDescriptorList(mavenConfigurator.getTarget()); // } - /** - * Iterate over the list and generate the schema - */ + /** + * Iterate over the list and generate the schema + */ - for (Object obj: descriptorExtensionList) { - schemaString.append("{\n" + - " \"properties\" : {" + - " \"" + obj.getClass().getName() +"\"" + ": { \"$ref\" : \"#/definitions/" + - obj.toString() + "\" }" + - " }"); - } - }); + for (Object obj : descriptorExtensionList) { + schemaString.append("{\n" + + " \"properties\" : {" + + " \"" + obj.getClass().getName() + "\"" + ": { \"$ref\" : \"#/definitions/" + + + obj.toString() + "\" }" + + " }"); + } + } - return schemaString.toString(); + return schemaString.toString(); } } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 01a51e5668..3f1614544c 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -4,6 +4,7 @@ import org.junit.Rule; import org.junit.Test; +import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; public class SchemaGenerationTest{ @@ -20,7 +21,7 @@ public void schemaShouldSucceed() { *Validate the schema against a validator * or against the already defined schema. */ - - + String s = generateSchema(); + System.out.println(s); } } From 076fe144957f8c74d9daf531821bed5bfad9b6c4 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Thu, 22 Aug 2019 23:42:58 +0530 Subject: [PATCH 09/93] Finished Descriptor Configuration generation --- .../plugins/casc/SchemaGeneration.java | 43 +------------------ 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index d6acd2f640..2d80555c74 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -58,7 +58,6 @@ public static String generateSchema() { ConfigurationAsCode configurationAsCode = ConfigurationAsCode.get(); for (Object configurator : configurationAsCode.getConfigurators()) { DescriptorExtensionList descriptorExtensionList = null; - System.out.println(configurator.getClass().getName()); if (configurator instanceof Configurator) { Configurator c = (Configurator) configurator; descriptorExtensionList = Jenkins.getInstance() @@ -66,54 +65,16 @@ public static String generateSchema() { } -// else if (configurator instanceof JenkinsConfigurator) { -// JenkinsConfigurator jenkinsConfigurator = (JenkinsConfigurator) configurator; -// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(jenkinsConfigurator.getTarget()); -// -// } -// -// else if (configurator instanceof GlobalConfigurationCategoryConfigurator) { -// GlobalConfigurationCategoryConfigurator globalConfigurationCategoryConfigurator = (GlobalConfigurationCategoryConfigurator) configurator; -// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(globalConfigurationCategoryConfigurator.getTarget()); -// -// } else if (configurator instanceof UnsecuredAuthorizationStrategyConfigurator) { -// UnsecuredAuthorizationStrategyConfigurator unsecuredAuthorizationStrategyConfigurator = (UnsecuredAuthorizationStrategyConfigurator) configurator; -// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(unsecuredAuthorizationStrategyConfigurator.getTarget()); -// -// } else if (configurator instanceof UpdateCenterConfigurator) { -// UpdateCenterConfigurator updateCenterConfigurator = (UpdateCenterConfigurator) configurator; -// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(updateCenterConfigurator.getTarget()); -// -// } else if (configurator instanceof HudsonPrivateSecurityRealmConfigurator) { -// HudsonPrivateSecurityRealmConfigurator hudsonPConfigurator = (HudsonPrivateSecurityRealmConfigurator) configurator; -// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(hudsonPConfigurator.getTarget()); -// -// } else if (configurator instanceof UpdateSiteConfigurator) { -// UpdateSiteConfigurator updateSiteConfigurator = (UpdateSiteConfigurator) configurator; -// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(updateSiteConfigurator.getTarget()); -// -// } else if (configurator instanceof JNLPLauncherConfigurator) { -// JNLPLauncherConfigurator jLaunchConfigurator = (JNLPLauncherConfigurator) configurator; -// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(jLaunchConfigurator.getTarget()); -// -// } else if (configurator instanceof AdminWhitelistRuleConfigurator) { -// AdminWhitelistRuleConfigurator adminWhitelistRuleConfigurator = (AdminWhitelistRuleConfigurator) configurator; -// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(adminWhitelistRuleConfigurator.getTarget()); -// -// } else if(configurator instanceof MavenConfigurator ) { -// MavenConfigurator mavenConfigurator = (MavenConfigurator) configurator; -// descriptorExtensionList = Jenkins.getInstance().getDescriptorList(mavenConfigurator.getTarget()); -// } /** * Iterate over the list and generate the schema */ for (Object obj : descriptorExtensionList) { schemaString.append("{\n" + - " \"properties\" : {" + + " \"properties\" : {\n" + " \"" + obj.getClass().getName() + "\"" + ": { \"$ref\" : \"#/definitions/" + - obj.toString() + "\" }" + + obj.toString() + "\" }\n" + " }"); } } From 2bd7f9d09c06415a4ccb027151c4358b49334c19 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 23 Aug 2019 03:30:31 +0530 Subject: [PATCH 10/93] Base configurator and HetroDescribable Configurator Schema Generation fully validated --- .../plugins/casc/SchemaGeneration.java | 104 +++++++++--------- .../plugins/casc/SchemaGenerationTest.java | 29 ++++- 2 files changed, 75 insertions(+), 58 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 2d80555c74..e0e97175be 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,19 +1,19 @@ package io.jenkins.plugins.casc; import hudson.DescriptorExtensionList; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedHashSet; -import java.util.List; + +import java.util.*; + +import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import jenkins.model.Jenkins; public class SchemaGeneration { public static String generateSchema() { - LinkedHashSet linkedHashSet = new LinkedHashSet<>(ConfigurationAsCode.get().getRootConfigurators()); - Iterator i = linkedHashSet.iterator(); - + /** + * The initial template for the JSON Schema + */ StringBuilder schemaString = new StringBuilder(); schemaString.append("{\n" + " \"$schema\": \"http://json-schema.org/draft-06/schema#\",\n" + @@ -23,62 +23,56 @@ public static String generateSchema() { " \"properties\": {\n" + ""); - while (i.hasNext()) { - - List attributeList = new ArrayList<>(i.next().getAttributes()); - for (Attribute a : attributeList) { - String type; - if (a.type.toString().equals("int")) { - type = "int"; - } else if (a.type.toString().equals("class java.lang.String")) { - type = "string"; - } else if (a.type.toString().equals("boolean")) { - type = "boolean"; - } else { - type = "object"; - } - schemaString.append(a.name + ": " + "{\n" + - " \"type\": \"" + type + "\",\n" + - " \"$ref\": \"#/definitions/" + a.type.getName() + "\"\n" + - " },"); - } - } - System.out.println(schemaString); /** - * Used to generate the schema for the descriptors - * Finds out the instance of each of the configurators - * and gets the required descriptors from the instance method. - * Appending the oneOf tag to the schema. + * This generates the schema for the root configurators */ - schemaString.append("schema\" : {\n" + - " \"oneOf\": ["); + LinkedHashSet linkedHashSet = new LinkedHashSet<>(ConfigurationAsCode.get().getRootConfigurators()); + Iterator i = linkedHashSet.iterator(); + while (i.hasNext()) { + RootElementConfigurator rootElementConfigurator = i.next(); + schemaString.append("\"" + rootElementConfigurator.getName() + "\": {" + "\"type\": \"object\",\n" + + " },"); + } + schemaString.append("},\n"); + Set configObjects = new LinkedHashSet<>(ConfigurationAsCode.get().getConfigurators()); + System.out.println(configObjects.size()); + Iterator obj = configObjects.iterator(); + /** + * Used to generate the schema for the implementors of + * the HetroDescribable Configurator + * It mimics the HetroDescribable Configurator + */ ConfigurationAsCode configurationAsCode = ConfigurationAsCode.get(); - for (Object configurator : configurationAsCode.getConfigurators()) { - DescriptorExtensionList descriptorExtensionList = null; - if (configurator instanceof Configurator) { - Configurator c = (Configurator) configurator; - descriptorExtensionList = Jenkins.getInstance() - .getDescriptorList(c.getTarget()); - - } + configurationAsCode.getConfigurators() + .stream() + .forEach(configurator -> { + if(configurator instanceof HeteroDescribableConfigurator) { + HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configurator; + Map implementorsMap = heteroDescribableConfigurator.getImplementors(); - /** - * Iterate over the list and generate the schema - */ - - for (Object obj : descriptorExtensionList) { - schemaString.append("{\n" + - " \"properties\" : {\n" + - " \"" + obj.getClass().getName() + "\"" + ": { \"$ref\" : \"#/definitions/" - + - obj.toString() + "\" }\n" + - " }"); - } - } + if(implementorsMap.size() != 0) { + schemaString.append("\"" + heteroDescribableConfigurator.getTarget().getName() + "\": {\n" + + " \"type\": \"object\"\n" + + " ," + "\"oneOf\" : ["); + Iterator> itr = implementorsMap.entrySet().iterator(); + while (itr.hasNext()) { + Map.Entry entry = itr.next(); + schemaString.append("{\n" + + " \"properties\" : {\n" + + " \"" + entry.getKey() + "\" : { \"$ref\" : \"#/definitions/ " + entry.getValue() + "\" }\n" + + " }\n" + + " }\n" + + " ,"); + } + schemaString.append("]\n" + " \n" + " }\n" + ","); + } + } + }); + schemaString.append("}"); return schemaString.toString(); } } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 3f1614544c..c8bf92561a 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -1,9 +1,17 @@ package io.jenkins.plugins.casc; +import com.gargoylesoftware.htmlunit.WebRequest; +import com.gargoylesoftware.htmlunit.WebResponse; import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import org.junit.Rule; import org.junit.Test; +import org.jvnet.hudson.test.JenkinsRule; +import java.io.BufferedWriter; +import java.io.FileWriter; +import java.io.IOException; + +import static com.gargoylesoftware.htmlunit.HttpMethod.POST; import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; public class SchemaGenerationTest{ @@ -13,9 +21,7 @@ public class SchemaGenerationTest{ public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); @Test - public void schemaShouldSucceed() { - - + public void schemaShouldSucceed() throws IOException { /** *Validate the schema against a validator @@ -23,5 +29,22 @@ public void schemaShouldSucceed() { */ String s = generateSchema(); System.out.println(s); +// String fileName = "Schema"; +// BufferedWriter writer = new BufferedWriter(new FileWriter(fileName)); +// writer.write(s); +// writer.close(); + } + + @Test + public void downloadOldSchema() throws Exception { + + String fileName = "OldSchema"; + JenkinsRule.WebClient client = j.createWebClient(); + WebRequest request = new WebRequest(client.createCrumbedUrl("configuration-as-code/schema"), POST); + WebResponse response = client.loadWebResponse(request); + BufferedWriter writer = new BufferedWriter(new FileWriter(fileName)); + writer.write(response.getContentAsString() + ); + writer.close(); } } From 0da381bc11457f85072cfa3bf15037eb2a5a3358 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 23 Aug 2019 11:44:24 +0530 Subject: [PATCH 11/93] Added Base configurators with no attributes --- plugin/pom.xml | 5 +++ .../plugins/casc/SchemaGeneration.java | 38 ++++++++++++++++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index ea0825702b..540ca31897 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -74,6 +74,11 @@ 2.9.8 compile + + org.json + json + 20080701 + diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index e0e97175be..8b2c24b782 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,11 +1,12 @@ package io.jenkins.plugins.casc; +import com.fasterxml.jackson.databind.ObjectMapper; import hudson.DescriptorExtensionList; import java.util.*; - import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; -import jenkins.model.Jenkins; +import org.json.JSONException; +import org.json.JSONObject; public class SchemaGeneration { @@ -26,8 +27,8 @@ public static String generateSchema() { /** * This generates the schema for the root configurators + * Iterates over the root elements and adds them to the schema. */ - LinkedHashSet linkedHashSet = new LinkedHashSet<>(ConfigurationAsCode.get().getRootConfigurators()); Iterator i = linkedHashSet.iterator(); while (i.hasNext()) { @@ -36,9 +37,34 @@ public static String generateSchema() { " },"); } schemaString.append("},\n"); - Set configObjects = new LinkedHashSet<>(ConfigurationAsCode.get().getConfigurators()); - System.out.println(configObjects.size()); - Iterator obj = configObjects.iterator(); + + + /** + * This generates the schema for the base configurators + * Iterates over the base configurators and adds them to the schema. + */ + + String output = "{"; + ConfigurationAsCode configurationAsCode1 = ConfigurationAsCode.get(); + for (Object configurator1 : configurationAsCode1.getConfigurators()) { + if (configurator1 instanceof BaseConfigurator) { + BaseConfigurator baseConfigurator = (BaseConfigurator) configurator1; + if(baseConfigurator.getAttributes().size() ==0 ) { + output += "\"" + ((BaseConfigurator) configurator1).getTarget().toString() + + "\":{" + "\"type\": \"object\"," + "\"properties\": {}},"; + } + } + } + output += "}"; + System.out.println("Look at the beautiful Json data"); + System.out.println(output); + try { + String indented = (new JSONObject(output)).toString(4); + System.out.println(indented); + } catch (JSONException e) { + e.printStackTrace(); + } + /** * Used to generate the schema for the implementors of From 3d45f6bfbb090b88bc44f813d779cb30c73da46b Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 23 Aug 2019 13:13:33 +0530 Subject: [PATCH 12/93] Added Base configurator attribute enumeration schema --- .../plugins/casc/SchemaGeneration.java | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 8b2c24b782..cad44596bc 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,8 +1,5 @@ package io.jenkins.plugins.casc; -import com.fasterxml.jackson.databind.ObjectMapper; -import hudson.DescriptorExtensionList; - import java.util.*; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import org.json.JSONException; @@ -45,13 +42,36 @@ public static String generateSchema() { */ String output = "{"; - ConfigurationAsCode configurationAsCode1 = ConfigurationAsCode.get(); - for (Object configurator1 : configurationAsCode1.getConfigurators()) { - if (configurator1 instanceof BaseConfigurator) { - BaseConfigurator baseConfigurator = (BaseConfigurator) configurator1; - if(baseConfigurator.getAttributes().size() ==0 ) { - output += "\"" + ((BaseConfigurator) configurator1).getTarget().toString() + + ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); + for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { + if (configuratorObject instanceof BaseConfigurator) { + BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; + List baseConfigAttributeList = baseConfigurator.getAttributes(); + if(baseConfigAttributeList.size() == 0 ) { + output += "\"" + ((BaseConfigurator) configuratorObject).getTarget().toString() + "\":{" + "\"type\": \"object\"," + "\"properties\": {}},"; + } else { + for (Attribute attribute:baseConfigAttributeList) { + if(attribute.multiple) { +// System.out.println("Attribute type is multiple"); + } else { + if(attribute.type.isEnum()) { + if(attribute.type.getEnumConstants().length == 0){ + output += "\"" + attribute.getName() + "\":" + " {" + + " \"type\": \"string\"}"; + } + else { + output += "\"" + attribute.getName() + "\":" + " {" + + " \"type\": \"string\"," + "\"enum\": ["; + for (Object obj : attribute.type.getEnumConstants()) { + System.out.println(obj + " " + attribute.getName()); + output += "\"" + obj + "\","; + } + output += "]},"; + } + } + } + } } } } From cd9a9ddba60823131d7ce759d669c99a62d771b6 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 23 Aug 2019 14:01:32 +0530 Subject: [PATCH 13/93] Added Non-enumerated attributes to schema --- .../plugins/casc/SchemaGeneration.java | 45 ++++++++++++++++--- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index cad44596bc..a1dc277b4f 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -20,8 +20,7 @@ public static String generateSchema() { " \"type\": \"object\",\n" + " \"properties\": {\n" + ""); - - + /** * This generates the schema for the root configurators * Iterates over the root elements and adds them to the schema. @@ -42,6 +41,7 @@ public static String generateSchema() { */ String output = "{"; + String output1=""; ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { if (configuratorObject instanceof BaseConfigurator) { @@ -58,17 +58,50 @@ public static String generateSchema() { if(attribute.type.isEnum()) { if(attribute.type.getEnumConstants().length == 0){ output += "\"" + attribute.getName() + "\":" + " {" + - " \"type\": \"string\"}"; + "\"type\": \"string\"}"; } else { output += "\"" + attribute.getName() + "\":" + " {" + - " \"type\": \"string\"," + "\"enum\": ["; + "\"type\": \"string\"," + "\"enum\": ["; for (Object obj : attribute.type.getEnumConstants()) { - System.out.println(obj + " " + attribute.getName()); output += "\"" + obj + "\","; } output += "]},"; } + } else { + output += "\"" + attribute.getName() + "\":"; + switch (attribute.type.getName()){ + + case "java.lang.String": + output += "{\"type\": \"string\"},"; + break; + + case "int": + output += "{\"type\": \"integer\"},"; + break; + + case "boolean": + output += "{\"type\": \"boolean\"},"; + break; + + case "java.lang.Boolean": + output += "{\"type\": \"boolean\"},"; + break; + + case "java.lang.Integer": + output += "{\"type\": \"integer\"},"; + break; + + case "java.lang.Long": + output += "{\"type\": \"integer\"},"; + break; + + default: + output += "{\"type\": \"object\"," + + "\"$ref\": \"#/definitions/" + attribute.type.getName() + "\"},"; + break; + } + } } } @@ -77,7 +110,7 @@ public static String generateSchema() { } output += "}"; System.out.println("Look at the beautiful Json data"); - System.out.println(output); + System.out.println(output1); try { String indented = (new JSONObject(output)).toString(4); System.out.println(indented); From 4bf306c8ab46058638fa47ee6ede55b2a7a8b5c3 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 24 Aug 2019 00:40:50 +0530 Subject: [PATCH 14/93] Added fully validated Configured schema --- .../plugins/casc/SchemaGeneration.java | 69 +++++++++---------- .../plugins/casc/SchemaGenerationTest.java | 24 +++++-- 2 files changed, 54 insertions(+), 39 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index a1dc277b4f..0c4f27b3e3 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,9 +1,12 @@ package io.jenkins.plugins.casc; import java.util.*; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; -import org.json.JSONException; -import org.json.JSONObject; public class SchemaGeneration { @@ -20,7 +23,7 @@ public static String generateSchema() { " \"type\": \"object\",\n" + " \"properties\": {\n" + ""); - + /** * This generates the schema for the root configurators * Iterates over the root elements and adds them to the schema. @@ -32,7 +35,7 @@ public static String generateSchema() { schemaString.append("\"" + rootElementConfigurator.getName() + "\": {" + "\"type\": \"object\",\n" + " },"); } - schemaString.append("},\n"); + schemaString.append("},\n\"definitions\": {"); /** @@ -40,65 +43,71 @@ public static String generateSchema() { * Iterates over the base configurators and adds them to the schema. */ - String output = "{"; - String output1=""; ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { if (configuratorObject instanceof BaseConfigurator) { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; List baseConfigAttributeList = baseConfigurator.getAttributes(); if(baseConfigAttributeList.size() == 0 ) { - output += "\"" + ((BaseConfigurator) configuratorObject).getTarget().toString() + - "\":{" + "\"type\": \"object\"," + "\"properties\": {}},"; + schemaString.append("\"" + ((BaseConfigurator) configuratorObject).getTarget().toString() + + "\":{" + "\"type\": \"object\"," + "\"properties\": {}},"); } else { for (Attribute attribute:baseConfigAttributeList) { if(attribute.multiple) { -// System.out.println("Attribute type is multiple"); + schemaString.append("\"" + attribute.getName() + "\":"); + + if(attribute.type.getName().equals("java.lang.String")) { + schemaString.append("{\"type\": \"string\"},"); + } else { + schemaString.append("{\"type\": \"object\"," + + "\"$ref\": \"#/definitions/" + attribute.type.getName() + "\"},"); + } } else { if(attribute.type.isEnum()) { if(attribute.type.getEnumConstants().length == 0){ - output += "\"" + attribute.getName() + "\":" + " {" + - "\"type\": \"string\"}"; + schemaString.append("\"" + attribute.getName() + "\":" + " {" + + "\"type\": \"string\"}"); } else { - output += "\"" + attribute.getName() + "\":" + " {" + - "\"type\": \"string\"," + "\"enum\": ["; + schemaString.append("\"" + attribute.getName() + "\":" + " {" + + "\"type\": \"string\"," + "\"enum\": ["); + for (Object obj : attribute.type.getEnumConstants()) { - output += "\"" + obj + "\","; + schemaString.append("\"" + obj + "\","); } - output += "]},"; + schemaString.append("]},"); } } else { - output += "\"" + attribute.getName() + "\":"; + schemaString.append("\"" + attribute.getName() + "\":"); switch (attribute.type.getName()){ case "java.lang.String": - output += "{\"type\": \"string\"},"; + schemaString.append("{\n\"type\": \"string\"},\n"); break; case "int": - output += "{\"type\": \"integer\"},"; + schemaString.append("{\n\"type\": \"integer\"},\n"); break; case "boolean": - output += "{\"type\": \"boolean\"},"; + schemaString.append("{\n\"type\": \"boolean\"},\n"); break; case "java.lang.Boolean": - output += "{\"type\": \"boolean\"},"; + schemaString.append("{\"type\": \"boolean\"},\n"); break; case "java.lang.Integer": - output += "{\"type\": \"integer\"},"; + schemaString.append("{\n\"type\": \"integer\"},\n"); break; case "java.lang.Long": - output += "{\"type\": \"integer\"},"; + schemaString.append("{\n\"type\": \"integer\"},\n"); break; default: - output += "{\"type\": \"object\"," + - "\"$ref\": \"#/definitions/" + attribute.type.getName() + "\"},"; + schemaString.append("{\n\"type\": \"object\",\n" + + "\"$ref\": \"#/definitions/" + attribute.type.getName() + "\"},\n"); break; } @@ -108,16 +117,6 @@ public static String generateSchema() { } } } - output += "}"; - System.out.println("Look at the beautiful Json data"); - System.out.println(output1); - try { - String indented = (new JSONObject(output)).toString(4); - System.out.println(indented); - } catch (JSONException e) { - e.printStackTrace(); - } - /** * Used to generate the schema for the implementors of @@ -151,7 +150,7 @@ public static String generateSchema() { } }); - schemaString.append("}"); + schemaString.append("}\n}"); return schemaString.toString(); } } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index c8bf92561a..f6810e655d 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -29,10 +29,10 @@ public void schemaShouldSucceed() throws IOException { */ String s = generateSchema(); System.out.println(s); -// String fileName = "Schema"; -// BufferedWriter writer = new BufferedWriter(new FileWriter(fileName)); -// writer.write(s); -// writer.close(); + String fileName = "Schema"; + BufferedWriter writer = new BufferedWriter(new FileWriter(fileName)); + writer.write(s); + writer.close(); } @Test @@ -47,4 +47,20 @@ public void downloadOldSchema() throws Exception { ); writer.close(); } + + + @Test + public void validateSchema() { + + } + + @Test + public void checkRootConfigurators() { + + } + + @Test + public void checkInitialTemplate() { + + } } From 4657e0c7bcb8fbe4572cf98379b6c7b35720c520 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 24 Aug 2019 17:52:54 +0530 Subject: [PATCH 15/93] Added validation initial test --- plugin/pom.xml | 17 +- .../plugins/casc/SchemaGeneration.java | 215 +++++++++--------- .../plugins/casc/SchemaGenerationTest.java | 61 ++--- 3 files changed, 150 insertions(+), 143 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index 540ca31897..01c860efd5 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -62,23 +62,18 @@ test + + org.everit.json + org.everit.json.schema + 1.3.0 + + org.testcontainers vault 1.10.6 test - - com.fasterxml.jackson.core - jackson-databind - 2.9.8 - compile - - - org.json - json - 20080701 - diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 0c4f27b3e3..88d8ddb69c 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,15 +1,17 @@ package io.jenkins.plugins.casc; -import java.util.*; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; +import java.io.BufferedWriter; +import java.io.FileWriter; +import java.io.IOException; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; public class SchemaGeneration { + public static String generateSchema() { /** @@ -17,140 +19,145 @@ public static String generateSchema() { */ StringBuilder schemaString = new StringBuilder(); schemaString.append("{\n" + - " \"$schema\": \"http://json-schema.org/draft-06/schema#\",\n" + - " \"id\": \"http://jenkins.io/configuration-as-code#\",\n" + - " \"description\": \"Jenkins Configuration as Code\",\n" + - " \"type\": \"object\",\n" + - " \"properties\": {\n" + - ""); + " \"$schema\": \"http://json-schema.org/draft-06/schema#\",\n" + + " \"id\": \"http://jenkins.io/configuration-as-code#\",\n" + + " \"description\": \"Jenkins Configuration as Code\",\n" + + " \"type\": \"object\",\n" + + " \"properties\": {\n" + + ""); /** * This generates the schema for the root configurators * Iterates over the root elements and adds them to the schema. */ - LinkedHashSet linkedHashSet = new LinkedHashSet<>(ConfigurationAsCode.get().getRootConfigurators()); + LinkedHashSet linkedHashSet = new LinkedHashSet<>( + ConfigurationAsCode.get().getRootConfigurators()); Iterator i = linkedHashSet.iterator(); while (i.hasNext()) { RootElementConfigurator rootElementConfigurator = i.next(); - schemaString.append("\"" + rootElementConfigurator.getName() + "\": {" + "\"type\": \"object\",\n" + + schemaString.append( + "\"" + rootElementConfigurator.getName() + "\": {" + "\"type\": \"object\",\n" + " },"); } schemaString.append("},\n\"definitions\": {"); - /** * This generates the schema for the base configurators * Iterates over the base configurators and adds them to the schema. */ ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); - for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { - if (configuratorObject instanceof BaseConfigurator) { - BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; - List baseConfigAttributeList = baseConfigurator.getAttributes(); - if(baseConfigAttributeList.size() == 0 ) { - schemaString.append("\"" + ((BaseConfigurator) configuratorObject).getTarget().toString() + - "\":{" + "\"type\": \"object\"," + "\"properties\": {}},"); - } else { - for (Attribute attribute:baseConfigAttributeList) { - if(attribute.multiple) { - schemaString.append("\"" + attribute.getName() + "\":"); - - if(attribute.type.getName().equals("java.lang.String")) { - schemaString.append("{\"type\": \"string\"},"); - } else { - schemaString.append("{\"type\": \"object\"," + - "\"$ref\": \"#/definitions/" + attribute.type.getName() + "\"},"); - } + for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { + if (configuratorObject instanceof BaseConfigurator) { + BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; + List baseConfigAttributeList = baseConfigurator.getAttributes(); + if (baseConfigAttributeList.size() == 0) { + schemaString.append( + "\"" + ((BaseConfigurator) configuratorObject).getTarget().toString() + + "\":{" + "\"type\": \"object\"," + "\"properties\": {}},"); + } else { + for (Attribute attribute : baseConfigAttributeList) { + if (attribute.multiple) { + schemaString.append("\"" + attribute.getName() + "\":"); + + if (attribute.type.getName().equals("java.lang.String")) { + schemaString.append("{\"type\": \"string\"},"); } else { - if(attribute.type.isEnum()) { - if(attribute.type.getEnumConstants().length == 0){ - schemaString.append("\"" + attribute.getName() + "\":" + " {" + - "\"type\": \"string\"}"); - } - else { - schemaString.append("\"" + attribute.getName() + "\":" + " {" + - "\"type\": \"string\"," + "\"enum\": ["); - - for (Object obj : attribute.type.getEnumConstants()) { - schemaString.append("\"" + obj + "\","); - } - schemaString.append("]},"); - } + schemaString.append("{\"type\": \"object\"," + + "\"$ref\": \"#/definitions/" + attribute.type.getName() + + "\"},"); + } + } else { + if (attribute.type.isEnum()) { + if (attribute.type.getEnumConstants().length == 0) { + schemaString.append("\"" + attribute.getName() + "\":" + " {" + + "\"type\": \"string\"}"); } else { - schemaString.append("\"" + attribute.getName() + "\":"); - switch (attribute.type.getName()){ + schemaString.append("\"" + attribute.getName() + "\":" + " {" + + "\"type\": \"string\"," + "\"enum\": ["); - case "java.lang.String": - schemaString.append("{\n\"type\": \"string\"},\n"); - break; + for (Object obj : attribute.type.getEnumConstants()) { + schemaString.append("\"" + obj + "\","); + } + schemaString.append("]},"); + } + } else { + schemaString.append("\"" + attribute.getName() + "\":"); + switch (attribute.type.getName()) { - case "int": - schemaString.append("{\n\"type\": \"integer\"},\n"); - break; + case "java.lang.String": + schemaString.append("{\n\"type\": \"string\"},\n"); + break; - case "boolean": - schemaString.append("{\n\"type\": \"boolean\"},\n"); - break; + case "int": + schemaString.append("{\n\"type\": \"integer\"},\n"); + break; - case "java.lang.Boolean": - schemaString.append("{\"type\": \"boolean\"},\n"); - break; + case "boolean": + schemaString.append("{\n\"type\": \"boolean\"},\n"); + break; - case "java.lang.Integer": - schemaString.append("{\n\"type\": \"integer\"},\n"); - break; + case "java.lang.Boolean": + schemaString.append("{\"type\": \"boolean\"},\n"); + break; - case "java.lang.Long": - schemaString.append("{\n\"type\": \"integer\"},\n"); - break; + case "java.lang.Integer": + schemaString.append("{\n\"type\": \"integer\"},\n"); + break; - default: - schemaString.append("{\n\"type\": \"object\",\n" + - "\"$ref\": \"#/definitions/" + attribute.type.getName() + "\"},\n"); - break; - } + case "java.lang.Long": + schemaString.append("{\n\"type\": \"integer\"},\n"); + break; + default: + schemaString.append("{\n\"type\": \"object\",\n" + + "\"$ref\": \"#/definitions/" + attribute.type.getName() + + "\"},\n"); + break; } + } } } } - } - - /** - * Used to generate the schema for the implementors of - * the HetroDescribable Configurator - * It mimics the HetroDescribable Configurator - */ - ConfigurationAsCode configurationAsCode = ConfigurationAsCode.get(); - configurationAsCode.getConfigurators() - .stream() - .forEach(configurator -> { - if(configurator instanceof HeteroDescribableConfigurator) { - HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configurator; - Map implementorsMap = heteroDescribableConfigurator.getImplementors(); - - if(implementorsMap.size() != 0) { - schemaString.append("\"" + heteroDescribableConfigurator.getTarget().getName() + "\": {\n" + - " \"type\": \"object\"\n" + - " ," + "\"oneOf\" : ["); - Iterator> itr = implementorsMap.entrySet().iterator(); - while (itr.hasNext()) { - Map.Entry entry = itr.next(); - schemaString.append("{\n" + - " \"properties\" : {\n" + - " \"" + entry.getKey() + "\" : { \"$ref\" : \"#/definitions/ " + entry.getValue() + "\" }\n" + - " }\n" + - " }\n" + - " ,"); - } - schemaString.append("]\n" + " \n" + " }\n" + ","); - } + } + /** + * Used to generate the schema for the implementors of + * the HetroDescribable Configurator + * It mimics the HetroDescribable Configurator.jelly + */ + + else if (configuratorObject instanceof HeteroDescribableConfigurator) { + + HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject; + Map implementorsMap = heteroDescribableConfigurator + .getImplementors(); + + if (implementorsMap.size() != 0) { + schemaString.append( + "\"" + heteroDescribableConfigurator.getTarget().getName() + "\": {\n" + + " \"type\": \"object\"\n" + + " ," + "\"oneOf\" : ["); + Iterator> itr = implementorsMap.entrySet().iterator(); + while (itr.hasNext()) { + Map.Entry entry = itr.next(); + schemaString.append("{\n" + + " \"properties\" : {\n" + + " \"" + entry.getKey() + "\" : { \"$ref\" : \"#/definitions/ " + + entry.getValue() + "\" }\n" + + " }\n" + + " }\n" + + " ,"); } - }); + schemaString.append("]\n" + " \n" + " }\n" + ","); + } + + } + } schemaString.append("}\n}"); return schemaString.toString(); } + + } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index f6810e655d..642f355db8 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -1,8 +1,15 @@ package io.jenkins.plugins.casc; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.gargoylesoftware.htmlunit.WebRequest; import com.gargoylesoftware.htmlunit.WebResponse; import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; +import io.jenkins.plugins.casc.misc.Util; +import java.net.URISyntaxException; +import java.nio.file.Files; +import java.nio.file.Paths; +import org.json.JSONObject; +import org.json.JSONTokener; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; @@ -20,47 +27,45 @@ public class SchemaGenerationTest{ @Rule public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); - @Test - public void schemaShouldSucceed() throws IOException { - - /** - *Validate the schema against a validator - * or against the already defined schema. - */ - String s = generateSchema(); - System.out.println(s); - String fileName = "Schema"; - BufferedWriter writer = new BufferedWriter(new FileWriter(fileName)); - writer.write(s); - writer.close(); - } - @Test public void downloadOldSchema() throws Exception { - String fileName = "OldSchema"; JenkinsRule.WebClient client = j.createWebClient(); WebRequest request = new WebRequest(client.createCrumbedUrl("configuration-as-code/schema"), POST); WebResponse response = client.loadWebResponse(request); - BufferedWriter writer = new BufferedWriter(new FileWriter(fileName)); - writer.write(response.getContentAsString() - ); - writer.close(); + System.out.println(response); } @Test - public void validateSchema() { - + public void validateSchema() throws IOException { + String schema = generateSchema(); + JSONObject jsonSchema = new JSONObject( + new JSONTokener(schema)); + + String answer = ""; + try { + answer = Util.toStringFromYamlFile(this, "merge3.yml"); + } catch (URISyntaxException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + System.out.println(answer); } - @Test - public void checkRootConfigurators() { - } +// @Test +// public void checkRootConfigurators() { +// +// +// } +// +// @Test +// public void checkInitialTemplate() { +// +// } - @Test - public void checkInitialTemplate() { - } } From c734c0f4675ba4124e43976c8f355d30eef572bd Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sun, 25 Aug 2019 03:20:44 +0530 Subject: [PATCH 16/93] Using JSON objects to construct Schema --- plugin/pom.xml | 7 +- .../plugins/casc/SchemaGeneration.java | 129 ++++++++++-------- .../plugins/casc/SchemaGenerationTest.java | 62 +++++---- 3 files changed, 111 insertions(+), 87 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index 01c860efd5..8e276259ad 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -69,10 +69,9 @@ - org.testcontainers - vault - 1.10.6 - test + com.google.code.gson + gson + 2.5 diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 88d8ddb69c..bb7095bf61 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,126 +1,147 @@ package io.jenkins.plugins.casc; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; +import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import org.json.JSONArray; +import org.json.JSONObject; public class SchemaGeneration { - public static String generateSchema() { + final static JSONObject schemaTemplateObject = new JSONObject() + .put("$schema", "http://json-schema.org/draft-06/schema#") + .put("id", "http://jenkins.io/configuration-as-code#") + .put("description", "Jenkins Configuration as Code") + .put("type", "object"); + + public static JSONObject generateSchema() { /** * The initial template for the JSON Schema */ - StringBuilder schemaString = new StringBuilder(); - schemaString.append("{\n" + - " \"$schema\": \"http://json-schema.org/draft-06/schema#\",\n" + - " \"id\": \"http://jenkins.io/configuration-as-code#\",\n" + - " \"description\": \"Jenkins Configuration as Code\",\n" + - " \"type\": \"object\",\n" + - " \"properties\": {\n" + - ""); + + JSONObject schemaObject = new JSONObject(schemaTemplateObject.toString()); /** * This generates the schema for the root configurators * Iterates over the root elements and adds them to the schema. */ + + JSONObject rootConfiguratorObject = new JSONObject(); LinkedHashSet linkedHashSet = new LinkedHashSet<>( ConfigurationAsCode.get().getRootConfigurators()); Iterator i = linkedHashSet.iterator(); while (i.hasNext()) { RootElementConfigurator rootElementConfigurator = i.next(); - schemaString.append( - "\"" + rootElementConfigurator.getName() + "\": {" + "\"type\": \"object\",\n" + - " },"); + rootConfiguratorObject + .put(rootElementConfigurator.getName(), new JSONObject().put("type", "object")); } - schemaString.append("},\n\"definitions\": {"); + schemaObject.put("properties", rootConfiguratorObject); + /** * This generates the schema for the base configurators * Iterates over the base configurators and adds them to the schema. */ + JSONObject schemaConfiguratorObjects = new JSONObject(); ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { if (configuratorObject instanceof BaseConfigurator) { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; List baseConfigAttributeList = baseConfigurator.getAttributes(); if (baseConfigAttributeList.size() == 0) { - schemaString.append( - "\"" + ((BaseConfigurator) configuratorObject).getTarget().toString() + - "\":{" + "\"type\": \"object\"," + "\"properties\": {}},"); + schemaConfiguratorObjects + .put(((BaseConfigurator) configuratorObject).getTarget().toString(), + new JSONObject() + .put("type", "object") + .put("properties", "{}")); + } else { for (Attribute attribute : baseConfigAttributeList) { if (attribute.multiple) { - schemaString.append("\"" + attribute.getName() + "\":"); if (attribute.type.getName().equals("java.lang.String")) { - schemaString.append("{\"type\": \"string\"},"); + schemaConfiguratorObjects.put(attribute.getName(), + new JSONObject() + .put("type", "string")); } else { - schemaString.append("{\"type\": \"object\"," + - "\"$ref\": \"#/definitions/" + attribute.type.getName() - + "\"},"); + schemaConfiguratorObjects.put(attribute.getName(), + new JSONObject() + .put("type", "object") + .put("$ref", "#/definitions/" + attribute.type.getName())); } } else { if (attribute.type.isEnum()) { if (attribute.type.getEnumConstants().length == 0) { - schemaString.append("\"" + attribute.getName() + "\":" + " {" + - "\"type\": \"string\"}"); + schemaConfiguratorObjects.put(attribute.getName(), + new JSONObject() + .put("type", "string")); } else { - schemaString.append("\"" + attribute.getName() + "\":" + " {" + - "\"type\": \"string\"," + "\"enum\": ["); + ArrayList attributeList = new ArrayList<>(); for (Object obj : attribute.type.getEnumConstants()) { - schemaString.append("\"" + obj + "\","); + attributeList.add(obj.toString()); } - schemaString.append("]},"); + schemaConfiguratorObjects.put(attribute.getName(), + new JSONObject() + .put("type", "string") + .put("enum", new JSONArray(attributeList))); } } else { - schemaString.append("\"" + attribute.getName() + "\":"); + JSONObject attributeType = new JSONObject(); switch (attribute.type.getName()) { case "java.lang.String": - schemaString.append("{\n\"type\": \"string\"},\n"); + attributeType.put("type", "string"); break; case "int": - schemaString.append("{\n\"type\": \"integer\"},\n"); + attributeType.put("type", "integer"); break; case "boolean": - schemaString.append("{\n\"type\": \"boolean\"},\n"); + attributeType.put("type", "boolean"); break; case "java.lang.Boolean": - schemaString.append("{\"type\": \"boolean\"},\n"); + attributeType.put("type", "boolean"); break; case "java.lang.Integer": - schemaString.append("{\n\"type\": \"integer\"},\n"); + attributeType.put("type", "integer"); break; case "java.lang.Long": - schemaString.append("{\n\"type\": \"integer\"},\n"); + attributeType.put("type", "integer"); break; default: - schemaString.append("{\n\"type\": \"object\",\n" + - "\"$ref\": \"#/definitions/" + attribute.type.getName() - + "\"},\n"); + attributeType.put("type", "object"); + attributeType.put("$ref", + "#/definitions/" + attribute.type.getName()); break; } + schemaConfiguratorObjects.put(attribute.getName(), attributeType); + } } } } } + /** * Used to generate the schema for the implementors of * the HetroDescribable Configurator @@ -128,36 +149,32 @@ public static String generateSchema() { */ else if (configuratorObject instanceof HeteroDescribableConfigurator) { - HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject; Map implementorsMap = heteroDescribableConfigurator .getImplementors(); - if (implementorsMap.size() != 0) { - schemaString.append( - "\"" + heteroDescribableConfigurator.getTarget().getName() + "\": {\n" + - " \"type\": \"object\"\n" + - " ," + "\"oneOf\" : ["); Iterator> itr = implementorsMap.entrySet().iterator(); + + JSONObject implementorObject = new JSONObject(); + implementorObject.put("type", "object"); while (itr.hasNext()) { Map.Entry entry = itr.next(); - schemaString.append("{\n" + - " \"properties\" : {\n" + - " \"" + entry.getKey() + "\" : { \"$ref\" : \"#/definitions/ " - + entry.getValue() + "\" }\n" + - " }\n" + - " }\n" + - " ,"); + implementorObject.put("properties", + new JSONObject().put(entry.getKey(), + new JSONObject().put("$ref","#/definitions/" + entry.getValue()))); } - schemaString.append("]\n" + " \n" + " }\n" + ","); - } + JSONArray oneOfJsonArray = new JSONArray(); + oneOfJsonArray.put(implementorObject); + implementorObject.put("oneOf", oneOfJsonArray); + + schemaConfiguratorObjects.put(heteroDescribableConfigurator.getTarget().getName(), implementorObject); + } } } - schemaString.append("}\n}"); - return schemaString.toString(); + schemaObject.put("definitions", schemaConfiguratorObjects); + return schemaObject; } - - } + diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 642f355db8..96558b425e 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -1,8 +1,11 @@ package io.jenkins.plugins.casc; -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.gargoylesoftware.htmlunit.WebRequest; import com.gargoylesoftware.htmlunit.WebResponse; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import io.jenkins.plugins.casc.misc.Util; import java.net.URISyntaxException; @@ -14,8 +17,7 @@ import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; -import java.io.BufferedWriter; -import java.io.FileWriter; + import java.io.IOException; import static com.gargoylesoftware.htmlunit.HttpMethod.POST; @@ -39,33 +41,39 @@ public void downloadOldSchema() throws Exception { @Test public void validateSchema() throws IOException { - String schema = generateSchema(); - JSONObject jsonSchema = new JSONObject( - new JSONTokener(schema)); - - String answer = ""; - try { - answer = Util.toStringFromYamlFile(this, "merge3.yml"); - } catch (URISyntaxException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - - System.out.println(answer); + JSONObject schemaObject = generateSchema(); + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + JsonParser jp = new JsonParser(); + JsonElement je = jp.parse(schemaObject.toString()); + String prettyJsonString = gson.toJson(je); + System.out.println(prettyJsonString); + +// JSONObject jsonSchema = new JSONObject( +// new JSONTokener(schema)); + +// String yamlContents = ""; +// try { +// yamlContents = Util.toStringFromYamlFile(this, "merge3.yml"); +// } catch (URISyntaxException e) { +// e.printStackTrace(); +// } catch (IOException e) { +// e.printStackTrace(); +// } +// +// System.out.println(yamlContents); } -// @Test -// public void checkRootConfigurators() { -// -// -// } -// -// @Test -// public void checkInitialTemplate() { -// -// } + @Test + public void checkRootConfigurators() { + + + } + + @Test + public void checkInitialTemplate() { + + } } From fe1ce605c85e3a8980b11a00b3da557cda202893 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sun, 25 Aug 2019 22:18:06 +0530 Subject: [PATCH 17/93] Added valid schema integration tests --- plugin/pom.xml | 19 +++++ .../plugins/casc/SchemaGeneration.java | 44 ++++++------ .../plugins/casc/SchemaGenerationTest.java | 71 +++++++++++-------- .../io/jenkins/plugins/casc/misc/Util.java | 23 ++++++ .../plugins/casc/invalidSchemaConfig.yml | 3 + .../plugins/casc/validSchemaConfig.yml | 6 ++ 6 files changed, 115 insertions(+), 51 deletions(-) create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml diff --git a/plugin/pom.xml b/plugin/pom.xml index 8e276259ad..3e351bdd5c 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -68,11 +68,30 @@ 1.3.0 + + org.testcontainers + vault + 1.10.6 + test + + com.google.code.gson gson 2.5 + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + 2.7.7 + test + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + 2.7.7 + test + diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index bb7095bf61..ac9c49ed6e 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,12 +1,5 @@ package io.jenkins.plugins.casc; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; -import com.google.gson.JsonParser; -import java.io.BufferedWriter; -import java.io.FileWriter; -import java.io.IOException; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import java.util.ArrayList; import java.util.Iterator; @@ -63,21 +56,22 @@ public static JSONObject generateSchema() { List baseConfigAttributeList = baseConfigurator.getAttributes(); if (baseConfigAttributeList.size() == 0) { schemaConfiguratorObjects - .put(((BaseConfigurator) configuratorObject).getTarget().toString(), + .put(((BaseConfigurator) configuratorObject).getTarget().getName(), new JSONObject() .put("type", "object") - .put("properties", "{}")); + .put("properties", new JSONObject())); } else { + JSONObject attributeSchema = new JSONObject(); for (Attribute attribute : baseConfigAttributeList) { if (attribute.multiple) { if (attribute.type.getName().equals("java.lang.String")) { - schemaConfiguratorObjects.put(attribute.getName(), + attributeSchema.put(attribute.getName(), new JSONObject() .put("type", "string")); } else { - schemaConfiguratorObjects.put(attribute.getName(), + attributeSchema.put(attribute.getName(), new JSONObject() .put("type", "object") .put("$ref", "#/definitions/" + attribute.type.getName())); @@ -85,7 +79,7 @@ public static JSONObject generateSchema() { } else { if (attribute.type.isEnum()) { if (attribute.type.getEnumConstants().length == 0) { - schemaConfiguratorObjects.put(attribute.getName(), + attributeSchema.put(attribute.getName(), new JSONObject() .put("type", "string")); } else { @@ -94,7 +88,7 @@ public static JSONObject generateSchema() { for (Object obj : attribute.type.getEnumConstants()) { attributeList.add(obj.toString()); } - schemaConfiguratorObjects.put(attribute.getName(), + attributeSchema.put(attribute.getName(), new JSONObject() .put("type", "string") .put("enum", new JSONArray(attributeList))); @@ -134,8 +128,12 @@ public static JSONObject generateSchema() { break; } - schemaConfiguratorObjects.put(attribute.getName(), attributeType); - + attributeSchema.put(attribute.getName(), attributeType); + schemaConfiguratorObjects + .put(((BaseConfigurator) configuratorObject).getTarget().getName(), + new JSONObject() + .put("type", "object") + .put("properties", attributeSchema)); } } } @@ -155,20 +153,20 @@ else if (configuratorObject instanceof HeteroDescribableConfigurator) { if (implementorsMap.size() != 0) { Iterator> itr = implementorsMap.entrySet().iterator(); - JSONObject implementorObject = new JSONObject(); - implementorObject.put("type", "object"); + JSONArray oneOfJsonArray = new JSONArray(); + JSONObject finalHetroConfiguratorObject = new JSONObject(); while (itr.hasNext()) { Map.Entry entry = itr.next(); + JSONObject implementorObject = new JSONObject(); implementorObject.put("properties", - new JSONObject().put(entry.getKey(), - new JSONObject().put("$ref","#/definitions/" + entry.getValue()))); + new JSONObject().put(entry.getKey(), new JSONObject().put("$ref","#/definitions/" + entry.getValue().getName()))); + oneOfJsonArray.put(implementorObject); } - JSONArray oneOfJsonArray = new JSONArray(); - oneOfJsonArray.put(implementorObject); - implementorObject.put("oneOf", oneOfJsonArray); + finalHetroConfiguratorObject.put("type","object"); + finalHetroConfiguratorObject.put("oneOf",oneOfJsonArray); - schemaConfiguratorObjects.put(heteroDescribableConfigurator.getTarget().getName(), implementorObject); + schemaConfiguratorObjects.put(heteroDescribableConfigurator.getTarget().getName(), finalHetroConfiguratorObject); } } } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 96558b425e..f38bb7e876 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -8,22 +8,18 @@ import com.google.gson.JsonParser; import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import io.jenkins.plugins.casc.misc.Util; -import java.net.URISyntaxException; -import java.nio.file.Files; -import java.nio.file.Paths; +import org.everit.json.schema.Schema; +import org.everit.json.schema.loader.SchemaLoader; import org.json.JSONObject; import org.json.JSONTokener; import org.junit.Rule; import org.junit.Test; import org.jvnet.hudson.test.JenkinsRule; - -import java.io.IOException; - import static com.gargoylesoftware.htmlunit.HttpMethod.POST; import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; -public class SchemaGenerationTest{ +public class SchemaGenerationTest { @Rule @@ -33,41 +29,59 @@ public class SchemaGenerationTest{ public void downloadOldSchema() throws Exception { JenkinsRule.WebClient client = j.createWebClient(); - WebRequest request = new WebRequest(client.createCrumbedUrl("configuration-as-code/schema"), POST); + WebRequest request = new WebRequest(client.createCrumbedUrl("configuration-as-code/schema"), + POST); WebResponse response = client.loadWebResponse(request); System.out.println(response); } @Test - public void validateSchema() throws IOException { - JSONObject schemaObject = generateSchema(); + public void validSchemaShouldSucceed() throws Exception { + + JSONObject schemaObject = generateSchema(); Gson gson = new GsonBuilder().setPrettyPrinting().create(); - JsonParser jp = new JsonParser(); - JsonElement je = jp.parse(schemaObject.toString()); - String prettyJsonString = gson.toJson(je); + JsonParser jsonParser = new JsonParser(); + JsonElement jsonElement = jsonParser.parse(schemaObject.toString()); + String prettyJsonString = gson.toJson(jsonElement); + System.out.println(prettyJsonString); - -// JSONObject jsonSchema = new JSONObject( -// new JSONTokener(schema)); - -// String yamlContents = ""; -// try { -// yamlContents = Util.toStringFromYamlFile(this, "merge3.yml"); -// } catch (URISyntaxException e) { -// e.printStackTrace(); -// } catch (IOException e) { -// e.printStackTrace(); -// } -// -// System.out.println(yamlContents); + + JSONObject jsonSchema = new JSONObject( + new JSONTokener(prettyJsonString)); + + String yamlStringContents = Util.toStringFromYamlFile(this, "validSchemaConfig.yml"); + JSONObject jsonSubject = new JSONObject( + new JSONTokener(Util.convertToJson(yamlStringContents))); + Schema schema = SchemaLoader.load(jsonSchema); + schema.validate(jsonSubject); + } + + @Test + public void invalidSchemaShouldNotSucceed() throws Exception { + + JSONObject schemaObject = generateSchema(); + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + JsonParser jsonParser = new JsonParser(); + JsonElement jsonElement = jsonParser.parse(schemaObject.toString()); + String prettyJsonString = gson.toJson(jsonElement); + JSONObject jsonSchema = new JSONObject( + new JSONTokener(prettyJsonString)); + String yamlStringContents = Util.toStringFromYamlFile(this, "invalidSchemaConfig.yml"); + System.out.println(Util.convertToJson(yamlStringContents)); + JSONObject jsonSubject = new JSONObject( + new JSONTokener(Util.convertToJson(yamlStringContents))); + Schema schema = SchemaLoader.load(jsonSchema); + schema.validate(jsonSubject); } + + + @Test public void checkRootConfigurators() { - } @Test @@ -76,4 +90,5 @@ public void checkInitialTemplate() { } + } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java b/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java index 5f3a16c9e6..2d3bf13967 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java @@ -1,5 +1,6 @@ package io.jenkins.plugins.casc.misc; +import com.fasterxml.jackson.dataformat.yaml.snakeyaml.Yaml; import hudson.ExtensionList; import io.jenkins.plugins.casc.ConfigurationAsCode; import io.jenkins.plugins.casc.ConfigurationContext; @@ -16,9 +17,11 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; +import java.util.Map; import java.util.Objects; import jenkins.model.GlobalConfigurationCategory; import jenkins.tools.ToolConfigurationCategory; +import org.json.JSONObject; import org.jvnet.hudson.test.LoggerRule; import static io.jenkins.plugins.casc.ConfigurationAsCode.serializeYamlNode; @@ -183,4 +186,24 @@ public static void assertLogContains(LoggerRule logging, String expectedText) { assertTrue("The log should contain '" + expectedText + "'", logging.getMessages().stream().anyMatch(m -> m.contains(expectedText))); } + + /** + * Converts a given yamlString into a JsonString. + * Example Usage: + *
{@code
+     * String jsonString = convertToJson(yourYamlString);}
+     * 
+ * @param yamlString + * @return JsonString + */ + + public static String convertToJson(String yamlString) { + Yaml yaml= new Yaml(); + Map map= (Map) yaml.load(yamlString); + JSONObject jsonObject=new JSONObject(map); + return jsonObject.toString(); + } + + + } diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml new file mode 100644 index 0000000000..e9878fdbe0 --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml @@ -0,0 +1,3 @@ +jenkins: + systemMessage: "Benchmark started with Configuration as Code" + numExecutors: 22 diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml new file mode 100644 index 0000000000..c9eeb3aaf9 --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml @@ -0,0 +1,6 @@ +jenkins: + globalNodeProperties: + - envVars: + env: + - key: FOO + value: BAR From 81080387d36154bc781057d513eb1b266c61117a Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 26 Aug 2019 13:14:48 +0530 Subject: [PATCH 18/93] Converted class names to simple names --- .../java/io/jenkins/plugins/casc/SchemaGeneration.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index ac9c49ed6e..add1f9c63b 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -55,13 +55,17 @@ public static JSONObject generateSchema() { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; List baseConfigAttributeList = baseConfigurator.getAttributes(); if (baseConfigAttributeList.size() == 0) { + + schemaConfiguratorObjects - .put(((BaseConfigurator) configuratorObject).getTarget().getName(), + .put(((BaseConfigurator) configuratorObject).getTarget().getSimpleName().toLowerCase(), new JSONObject() .put("type", "object") .put("properties", new JSONObject())); } else { + + JSONObject attributeSchema = new JSONObject(); for (Attribute attribute : baseConfigAttributeList) { if (attribute.multiple) { @@ -130,7 +134,7 @@ public static JSONObject generateSchema() { attributeSchema.put(attribute.getName(), attributeType); schemaConfiguratorObjects - .put(((BaseConfigurator) configuratorObject).getTarget().getName(), + .put(((BaseConfigurator) configuratorObject).getTarget().getSimpleName().toLowerCase(), new JSONObject() .put("type", "object") .put("properties", attributeSchema)); @@ -166,7 +170,7 @@ else if (configuratorObject instanceof HeteroDescribableConfigurator) { finalHetroConfiguratorObject.put("type","object"); finalHetroConfiguratorObject.put("oneOf",oneOfJsonArray); - schemaConfiguratorObjects.put(heteroDescribableConfigurator.getTarget().getName(), finalHetroConfiguratorObject); + schemaConfiguratorObjects.put(heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), finalHetroConfiguratorObject); } } } From 38dad381538dcd48df464d2786ba7b9cf511bd23 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 26 Aug 2019 13:31:33 +0530 Subject: [PATCH 19/93] Upgraded schema version Bumped up schema version to v07. Added id instead of ref Added basic schema validation tests. --- plugin/pom.xml | 47 +++++++++-------- .../plugins/casc/SchemaGeneration.java | 10 ++-- .../plugins/casc/SchemaGenerationTest.java | 52 ++++--------------- .../plugins/casc/invalidSchemaConfig.yml | 4 +- .../plugins/casc/validSchemaConfig.yml | 7 +-- 5 files changed, 44 insertions(+), 76 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index 3e351bdd5c..d4c5ed661f 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -15,11 +15,19 @@ Configuration as Code Plugin Manage Jenkins master configuration as code - https://wiki.jenkins.io/display/JENKINS/Configuration+as+Code+Plugin + https://github.com/jenkinsci/configuration-as-code-plugin - - 1.25 + + 1.28 + https://github.com/jenkinsci/configuration-as-code-plugin/releases + https://raw.githubusercontent.com/jenkinsci/configuration-as-code-plugin/master/plugin/src/main/webapp/img/logo-head.svg @@ -27,6 +35,14 @@ casz Joseph Petersen + + timja + Tim Jacomb + + + oleg_nenashev + Oleg Nenashev + @@ -42,13 +58,6 @@ - - - com.bettercloud - vault-java-driver - 4.0.0 - - io.vavr vavr @@ -69,29 +78,25 @@ - org.testcontainers - vault - 1.10.6 - test - + org.testcontainers + vault + 1.10.6 + test + com.google.code.gson gson 2.5 + com.fasterxml.jackson.dataformat jackson-dataformat-yaml 2.7.7 test - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - 2.7.7 - test - + diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index add1f9c63b..42166d0097 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -13,7 +13,7 @@ public class SchemaGeneration { final static JSONObject schemaTemplateObject = new JSONObject() - .put("$schema", "http://json-schema.org/draft-06/schema#") + .put("$schema", "http://json-schema.org/draft-07/schema#") .put("id", "http://jenkins.io/configuration-as-code#") .put("description", "Jenkins Configuration as Code") .put("type", "object"); @@ -78,7 +78,7 @@ public static JSONObject generateSchema() { attributeSchema.put(attribute.getName(), new JSONObject() .put("type", "object") - .put("$ref", "#/definitions/" + attribute.type.getName())); + .put("$id", "#/definitions/" + attribute.type.getName())); } } else { if (attribute.type.isEnum()) { @@ -127,7 +127,7 @@ public static JSONObject generateSchema() { default: attributeType.put("type", "object"); - attributeType.put("$ref", + attributeType.put("$id", "#/definitions/" + attribute.type.getName()); break; } @@ -163,7 +163,7 @@ else if (configuratorObject instanceof HeteroDescribableConfigurator) { Map.Entry entry = itr.next(); JSONObject implementorObject = new JSONObject(); implementorObject.put("properties", - new JSONObject().put(entry.getKey(), new JSONObject().put("$ref","#/definitions/" + entry.getValue().getName()))); + new JSONObject().put(entry.getKey(), new JSONObject().put("$id","#/definitions/" + entry.getValue().getName()))); oneOfJsonArray.put(implementorObject); } @@ -175,7 +175,7 @@ else if (configuratorObject instanceof HeteroDescribableConfigurator) { } } - schemaObject.put("definitions", schemaConfiguratorObjects); + schemaObject.put("properties", schemaConfiguratorObjects); return schemaObject; } } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index f38bb7e876..2799bb742f 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -14,10 +14,9 @@ import org.json.JSONTokener; import org.junit.Rule; import org.junit.Test; -import org.jvnet.hudson.test.JenkinsRule; - -import static com.gargoylesoftware.htmlunit.HttpMethod.POST; +import org.everit.json.schema.ValidationException; import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; +import static org.junit.Assert.fail; public class SchemaGenerationTest { @@ -25,31 +24,11 @@ public class SchemaGenerationTest { @Rule public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); - @Test - public void downloadOldSchema() throws Exception { - - JenkinsRule.WebClient client = j.createWebClient(); - WebRequest request = new WebRequest(client.createCrumbedUrl("configuration-as-code/schema"), - POST); - WebResponse response = client.loadWebResponse(request); - System.out.println(response); - } - - @Test public void validSchemaShouldSucceed() throws Exception { - JSONObject schemaObject = generateSchema(); - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - JsonParser jsonParser = new JsonParser(); - JsonElement jsonElement = jsonParser.parse(schemaObject.toString()); - String prettyJsonString = gson.toJson(jsonElement); - - System.out.println(prettyJsonString); - JSONObject jsonSchema = new JSONObject( - new JSONTokener(prettyJsonString)); - + new JSONTokener(schemaObject.toString())); String yamlStringContents = Util.toStringFromYamlFile(this, "validSchemaConfig.yml"); JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); @@ -68,27 +47,14 @@ public void invalidSchemaShouldNotSucceed() throws Exception { JSONObject jsonSchema = new JSONObject( new JSONTokener(prettyJsonString)); String yamlStringContents = Util.toStringFromYamlFile(this, "invalidSchemaConfig.yml"); - System.out.println(Util.convertToJson(yamlStringContents)); JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); Schema schema = SchemaLoader.load(jsonSchema); - schema.validate(jsonSubject); + try { + schema.validate(jsonSubject); + fail(); + } catch (ValidationException ve) { + ve.printStackTrace(); + } } - - - - - - @Test - public void checkRootConfigurators() { - - } - - @Test - public void checkInitialTemplate() { - - } - - - } diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml index e9878fdbe0..d2a92d8c02 100644 --- a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml @@ -1,3 +1,3 @@ jenkins: - systemMessage: "Benchmark started with Configuration as Code" - numExecutors: 22 + systemMessage: "Configured by Configuration as Code plugin" + numExecutors: "Hello" diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml index c9eeb3aaf9..aa17b7a17b 100644 --- a/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml @@ -1,6 +1,3 @@ jenkins: - globalNodeProperties: - - envVars: - env: - - key: FOO - value: BAR + systemMessage: "Configured by Configuration as Code plugin" + numExecutors: 3 From d89e24c8039473224f1ca893c54a222c1943cd92 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 26 Aug 2019 15:21:46 +0530 Subject: [PATCH 20/93] Changes to test and pom.xml --- plugin/pom.xml | 48 +++++++++---------- .../plugins/casc/SchemaGenerationTest.java | 5 +- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index d4c5ed661f..229db8a4d1 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -46,30 +46,6 @@ - - io.jenkins.configuration-as-code - snakeyaml - ${project.version} - - - org.yaml - snakeyaml - - - - - - io.vavr - vavr - 0.9.2 - - - - com.github.stefanbirkner - system-rules - 1.19.0 - test - org.everit.json @@ -97,6 +73,30 @@ test + + io.jenkins.configuration-as-code + snakeyaml + ${project.version} + + + org.yaml + snakeyaml + + + + + + io.vavr + vavr + 0.9.2 + + + + com.github.stefanbirkner + system-rules + 1.19.0 + test + diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 2799bb742f..4135812a9e 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -1,7 +1,5 @@ package io.jenkins.plugins.casc; -import com.gargoylesoftware.htmlunit.WebRequest; -import com.gargoylesoftware.htmlunit.WebResponse; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; @@ -9,12 +7,13 @@ import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import io.jenkins.plugins.casc.misc.Util; import org.everit.json.schema.Schema; +import org.everit.json.schema.ValidationException; import org.everit.json.schema.loader.SchemaLoader; import org.json.JSONObject; import org.json.JSONTokener; import org.junit.Rule; import org.junit.Test; -import org.everit.json.schema.ValidationException; + import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; import static org.junit.Assert.fail; From 3c4510c7de92101133a6126bb1867f99fdf21a91 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 26 Aug 2019 22:10:27 +0530 Subject: [PATCH 21/93] Added functions to split up the generateSchema() function --- .../io/jenkins/plugins/casc/SchemaTest.yml | 6 - .../plugins/casc/SchemaGeneration.java | 158 +++++++++--------- .../plugins/casc/SchemaGenerationTest.java | 9 +- 3 files changed, 81 insertions(+), 92 deletions(-) delete mode 100644 integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml diff --git a/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml b/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml deleted file mode 100644 index c9eeb3aaf9..0000000000 --- a/integrations/src/test/resources/io/jenkins/plugins/casc/SchemaTest.yml +++ /dev/null @@ -1,6 +0,0 @@ -jenkins: - globalNodeProperties: - - envVars: - env: - - key: FOO - value: BAR diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 42166d0097..92e6238eb0 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -11,43 +11,26 @@ public class SchemaGeneration { - final static JSONObject schemaTemplateObject = new JSONObject() .put("$schema", "http://json-schema.org/draft-07/schema#") .put("id", "http://jenkins.io/configuration-as-code#") .put("description", "Jenkins Configuration as Code") .put("type", "object"); - public static JSONObject generateSchema() { /** * The initial template for the JSON Schema */ - JSONObject schemaObject = new JSONObject(schemaTemplateObject.toString()); - /** * This generates the schema for the root configurators * Iterates over the root elements and adds them to the schema. */ - - JSONObject rootConfiguratorObject = new JSONObject(); - LinkedHashSet linkedHashSet = new LinkedHashSet<>( - ConfigurationAsCode.get().getRootConfigurators()); - Iterator i = linkedHashSet.iterator(); - while (i.hasNext()) { - RootElementConfigurator rootElementConfigurator = i.next(); - rootConfiguratorObject - .put(rootElementConfigurator.getName(), new JSONObject().put("type", "object")); - } - schemaObject.put("properties", rootConfiguratorObject); - - + schemaObject.put("properties", generateRootConfiguratorObject()); /** * This generates the schema for the base configurators * Iterates over the base configurators and adds them to the schema. */ - JSONObject schemaConfiguratorObjects = new JSONObject(); ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { @@ -55,8 +38,6 @@ public static JSONObject generateSchema() { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; List baseConfigAttributeList = baseConfigurator.getAttributes(); if (baseConfigAttributeList.size() == 0) { - - schemaConfiguratorObjects .put(((BaseConfigurator) configuratorObject).getTarget().getSimpleName().toLowerCase(), new JSONObject() @@ -64,12 +45,9 @@ public static JSONObject generateSchema() { .put("properties", new JSONObject())); } else { - - JSONObject attributeSchema = new JSONObject(); for (Attribute attribute : baseConfigAttributeList) { if (attribute.multiple) { - if (attribute.type.getName().equals("java.lang.String")) { attributeSchema.put(attribute.getName(), new JSONObject() @@ -87,7 +65,6 @@ public static JSONObject generateSchema() { new JSONObject() .put("type", "string")); } else { - ArrayList attributeList = new ArrayList<>(); for (Object obj : attribute.type.getEnumConstants()) { attributeList.add(obj.toString()); @@ -98,41 +75,7 @@ public static JSONObject generateSchema() { .put("enum", new JSONArray(attributeList))); } } else { - JSONObject attributeType = new JSONObject(); - switch (attribute.type.getName()) { - - case "java.lang.String": - attributeType.put("type", "string"); - break; - - case "int": - attributeType.put("type", "integer"); - break; - - case "boolean": - attributeType.put("type", "boolean"); - break; - - case "java.lang.Boolean": - attributeType.put("type", "boolean"); - break; - - case "java.lang.Integer": - attributeType.put("type", "integer"); - break; - - case "java.lang.Long": - attributeType.put("type", "integer"); - break; - - default: - attributeType.put("type", "object"); - attributeType.put("$id", - "#/definitions/" + attribute.type.getName()); - break; - } - - attributeSchema.put(attribute.getName(), attributeType); + attributeSchema.put(attribute.getName(), generateNonEnumAttributeObject(attribute)); schemaConfiguratorObjects .put(((BaseConfigurator) configuratorObject).getTarget().getSimpleName().toLowerCase(), new JSONObject() @@ -143,40 +86,91 @@ public static JSONObject generateSchema() { } } } - /** * Used to generate the schema for the implementors of * the HetroDescribable Configurator * It mimics the HetroDescribable Configurator.jelly */ - else if (configuratorObject instanceof HeteroDescribableConfigurator) { HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject; - Map implementorsMap = heteroDescribableConfigurator - .getImplementors(); - if (implementorsMap.size() != 0) { - Iterator> itr = implementorsMap.entrySet().iterator(); - - JSONArray oneOfJsonArray = new JSONArray(); - JSONObject finalHetroConfiguratorObject = new JSONObject(); - while (itr.hasNext()) { - Map.Entry entry = itr.next(); - JSONObject implementorObject = new JSONObject(); - implementorObject.put("properties", - new JSONObject().put(entry.getKey(), new JSONObject().put("$id","#/definitions/" + entry.getValue().getName()))); - oneOfJsonArray.put(implementorObject); - } - - finalHetroConfiguratorObject.put("type","object"); - finalHetroConfiguratorObject.put("oneOf",oneOfJsonArray); - - schemaConfiguratorObjects.put(heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), finalHetroConfiguratorObject); + schemaConfiguratorObjects.put(heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), + generateHetroDescribableConfigObject(heteroDescribableConfigurator)); } } - } - schemaObject.put("properties", schemaConfiguratorObjects); return schemaObject; } + + private static JSONObject generateHetroDescribableConfigObject(HeteroDescribableConfigurator heteroDescribableConfiguratorObject) { + Map implementorsMap = heteroDescribableConfiguratorObject + .getImplementors(); + JSONObject finalHetroConfiguratorObject = new JSONObject(); + if (implementorsMap.size() != 0) { + Iterator> itr = implementorsMap.entrySet().iterator(); + + JSONArray oneOfJsonArray = new JSONArray(); + while (itr.hasNext()) { + Map.Entry entry = itr.next(); + JSONObject implementorObject = new JSONObject(); + implementorObject.put("properties", + new JSONObject().put(entry.getKey(), new JSONObject() + .put("$id", "#/definitions/" + entry.getValue().getName()))); + oneOfJsonArray.put(implementorObject); + } + + finalHetroConfiguratorObject.put("type", "object"); + finalHetroConfiguratorObject.put("oneOf", oneOfJsonArray); + } + return finalHetroConfiguratorObject; + } + + private static JSONObject generateNonEnumAttributeObject(Attribute attribute) { + JSONObject attributeType = new JSONObject(); + switch (attribute.type.getName()) { + case "java.lang.String": + attributeType.put("type", "string"); + break; + + case "int": + attributeType.put("type", "integer"); + break; + + case "boolean": + attributeType.put("type", "boolean"); + break; + + case "java.lang.Boolean": + attributeType.put("type", "boolean"); + break; + + case "java.lang.Integer": + attributeType.put("type", "integer"); + break; + + case "java.lang.Long": + attributeType.put("type", "integer"); + break; + + default: + attributeType.put("type", "object"); + attributeType.put("$id", + "#/definitions/" + attribute.type.getName()); + break; + } + return attributeType; + } + + private static JSONObject generateRootConfiguratorObject() { + JSONObject rootConfiguratorObject = new JSONObject(); + LinkedHashSet linkedHashSet = new LinkedHashSet<>( + ConfigurationAsCode.get().getRootConfigurators()); + Iterator i = linkedHashSet.iterator(); + while (i.hasNext()) { + RootElementConfigurator rootElementConfigurator = i.next(); + rootConfiguratorObject + .put(rootElementConfigurator.getName(), new JSONObject().put("type", "object")); + } + return rootConfiguratorObject; + } } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 4135812a9e..8cdb01265c 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -18,8 +18,6 @@ import static org.junit.Assert.fail; public class SchemaGenerationTest { - - @Rule public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); @@ -32,12 +30,15 @@ public void validSchemaShouldSucceed() throws Exception { JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); Schema schema = SchemaLoader.load(jsonSchema); - schema.validate(jsonSubject); + try { + schema.validate(jsonSubject); + } catch (Exception e) { + fail(e.getMessage()); + } } @Test public void invalidSchemaShouldNotSucceed() throws Exception { - JSONObject schemaObject = generateSchema(); Gson gson = new GsonBuilder().setPrettyPrinting().create(); JsonParser jsonParser = new JsonParser(); From f079505e00e08be8ba86056b58ed79df88e47f05 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Tue, 27 Aug 2019 00:32:50 +0530 Subject: [PATCH 22/93] Added additional methods in generateSchema() --- plugin/pom.xml | 6 -- .../plugins/casc/SchemaGeneration.java | 59 +++++++++++-------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index 229db8a4d1..38ce804bf0 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -53,12 +53,6 @@ 1.3.0 - - org.testcontainers - vault - 1.10.6 - test - com.google.code.gson diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 92e6238eb0..4a8ed77f7f 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -16,6 +16,7 @@ public class SchemaGeneration { .put("id", "http://jenkins.io/configuration-as-code#") .put("description", "Jenkins Configuration as Code") .put("type", "object"); + public static JSONObject generateSchema() { /** @@ -48,32 +49,10 @@ public static JSONObject generateSchema() { JSONObject attributeSchema = new JSONObject(); for (Attribute attribute : baseConfigAttributeList) { if (attribute.multiple) { - if (attribute.type.getName().equals("java.lang.String")) { - attributeSchema.put(attribute.getName(), - new JSONObject() - .put("type", "string")); - } else { - attributeSchema.put(attribute.getName(), - new JSONObject() - .put("type", "object") - .put("$id", "#/definitions/" + attribute.type.getName())); - } + generateMultipleAttributeSchema(attributeSchema, attribute); } else { if (attribute.type.isEnum()) { - if (attribute.type.getEnumConstants().length == 0) { - attributeSchema.put(attribute.getName(), - new JSONObject() - .put("type", "string")); - } else { - ArrayList attributeList = new ArrayList<>(); - for (Object obj : attribute.type.getEnumConstants()) { - attributeList.add(obj.toString()); - } - attributeSchema.put(attribute.getName(), - new JSONObject() - .put("type", "string") - .put("enum", new JSONArray(attributeList))); - } + generateEnumAttributeSchema(attributeSchema, attribute); } else { attributeSchema.put(attribute.getName(), generateNonEnumAttributeObject(attribute)); schemaConfiguratorObjects @@ -172,5 +151,37 @@ private static JSONObject generateRootConfiguratorObject() { } return rootConfiguratorObject; } + + private static void generateMultipleAttributeSchema(JSONObject attributeSchema, Attribute attribute) { + if (attribute.type.getName().equals("java.lang.String")) { + attributeSchema.put(attribute.getName(), + new JSONObject() + .put("type", "string")); + } else { + attributeSchema.put(attribute.getName(), + new JSONObject() + .put("type", "object") + .put("$id", "#/definitions/" + attribute.type.getName())); + } + } + + private static void generateEnumAttributeSchema(JSONObject attributeSchemaTemplate, Attribute attribute) { + if (attribute.type.getEnumConstants().length == 0) { + attributeSchemaTemplate.put(attribute.getName(), + new JSONObject() + .put("type", "string")); + } else { + ArrayList attributeList = new ArrayList<>(); + for (Object obj : attribute.type.getEnumConstants()) { + attributeList.add(obj.toString()); + } + attributeSchemaTemplate.put(attribute.getName(), + new JSONObject() + .put("type", "string") + .put("enum", new JSONArray(attributeList))); + } + } + + } From 76c093235031741c9d93deaed7295e2937703810 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Tue, 27 Aug 2019 01:07:28 +0530 Subject: [PATCH 23/93] Code Cleanup --- plugin/pom.xml | 5 ----- .../main/java/io/jenkins/plugins/casc/SchemaGeneration.java | 4 +--- plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java | 3 --- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index 38ce804bf0..5ab9a9fe54 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -46,27 +46,22 @@ - org.everit.json org.everit.json.schema 1.3.0 - - com.google.code.gson gson 2.5 - com.fasterxml.jackson.dataformat jackson-dataformat-yaml 2.7.7 test - io.jenkins.configuration-as-code snakeyaml diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 4a8ed77f7f..2279ce0b83 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -16,7 +16,7 @@ public class SchemaGeneration { .put("id", "http://jenkins.io/configuration-as-code#") .put("description", "Jenkins Configuration as Code") .put("type", "object"); - + public static JSONObject generateSchema() { /** @@ -181,7 +181,5 @@ private static void generateEnumAttributeSchema(JSONObject attributeSchemaTempla .put("enum", new JSONArray(attributeList))); } } - - } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java b/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java index 2d3bf13967..50032f8157 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java @@ -203,7 +203,4 @@ public static String convertToJson(String yamlString) { JSONObject jsonObject=new JSONObject(map); return jsonObject.toString(); } - - - } From 623914f1aa21a0a9effc3604d65ed6964b86c40b Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 28 Aug 2019 02:01:51 +0530 Subject: [PATCH 24/93] Inital impl for describeStructure --- .../configurators/HeteroDescribableConfigurator.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java index 4c3a5b94ca..4b888ac0ae 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java @@ -117,6 +117,18 @@ public CNode describe(T instance, ConfigurationContext context) { }).getOrNull(); } + @CheckForNull + public void describeStructure(T instance, ConfigurationContext context) { + lookupConfigurator(context, instance.getClass()) + .map(configurator -> convertToNode(context, configurator, instance)) + .filter(Objects::nonNull) + .map(node -> { + return new Scalar(preferredSymbol(instance.getDescriptor())); + }).getOrNull(); + + System.out.println(instance.getDescriptor()); + } + @SuppressWarnings("unused") public Map> getImplementors() { return getDescriptors() From 13e893a99e4cf03690d969ca8a0034f5a8040141 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 28 Aug 2019 02:23:53 +0530 Subject: [PATCH 25/93] Incremental Impl changes --- .../configurators/HeteroDescribableConfigurator.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java index 4b888ac0ae..390ef8c4a1 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java @@ -118,15 +118,18 @@ public CNode describe(T instance, ConfigurationContext context) { } @CheckForNull - public void describeStructure(T instance, ConfigurationContext context) { + public String describeStructure(T instance, ConfigurationContext context) { lookupConfigurator(context, instance.getClass()) .map(configurator -> convertToNode(context, configurator, instance)) .filter(Objects::nonNull) .map(node -> { - return new Scalar(preferredSymbol(instance.getDescriptor())); + if(node.getClass().isEnum()){ + return instance.getDescriptor().getDisplayName(); + } else { + return null; + } }).getOrNull(); - System.out.println(instance.getDescriptor()); } @SuppressWarnings("unused") From 2ede6f60e1be94a16a378d5792fd3c61b583ec51 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 28 Aug 2019 02:49:22 +0530 Subject: [PATCH 26/93] Concept implementation --- .../HeteroDescribableConfigurator.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java index 390ef8c4a1..e28f6ada9b 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java @@ -5,6 +5,7 @@ import hudson.DescriptorExtensionList; import hudson.model.Describable; import hudson.model.Descriptor; +import hudson.model.Job.LastItemListener; import hudson.security.HudsonPrivateSecurityRealm; import hudson.security.SecurityRealm; import io.jenkins.plugins.casc.Attribute; @@ -23,6 +24,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Objects; @@ -118,18 +120,23 @@ public CNode describe(T instance, ConfigurationContext context) { } @CheckForNull - public String describeStructure(T instance, ConfigurationContext context) { + public Map> describeStructure(T instance, ConfigurationContext context) { + Map> heteroConfigurationMapper = new LinkedHashMap<>(); lookupConfigurator(context, instance.getClass()) .map(configurator -> convertToNode(context, configurator, instance)) .filter(Objects::nonNull) .map(node -> { - if(node.getClass().isEnum()){ - return instance.getDescriptor().getDisplayName(); - } else { - return null; - } + + //Could something like this be done + String BaseConfiguratorNode = node.getClass().getName(); + List propertiesList = new ArrayList<>(); + for(CNode cNode: node) { + propertiesList.add(cNode.toString()); + } + return heteroConfigurationMapper; }).getOrNull(); + return null; } @SuppressWarnings("unused") From ec07960397a41ca258dac5c817872677db525e65 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 28 Aug 2019 10:37:00 +0530 Subject: [PATCH 27/93] Added annotation and test implementations --- .../plugins/casc/SchemaGeneration.java | 3 +++ .../HeteroDescribableConfigurator.java | 25 ++++++------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 2279ce0b83..d04bdb8e34 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -8,7 +8,10 @@ import java.util.Map; import org.json.JSONArray; import org.json.JSONObject; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.NoExternalUse; +@Restricted(NoExternalUse.class) public class SchemaGeneration { final static JSONObject schemaTemplateObject = new JSONObject() diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java index e28f6ada9b..b85406a311 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java @@ -3,6 +3,7 @@ import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; import hudson.DescriptorExtensionList; +import hudson.ExtensionList; import hudson.model.Describable; import hudson.model.Descriptor; import hudson.model.Job.LastItemListener; @@ -120,23 +121,13 @@ public CNode describe(T instance, ConfigurationContext context) { } @CheckForNull - public Map> describeStructure(T instance, ConfigurationContext context) { - Map> heteroConfigurationMapper = new LinkedHashMap<>(); - lookupConfigurator(context, instance.getClass()) - .map(configurator -> convertToNode(context, configurator, instance)) - .filter(Objects::nonNull) - .map(node -> { - - //Could something like this be done - String BaseConfiguratorNode = node.getClass().getName(); - List propertiesList = new ArrayList<>(); - for(CNode cNode: node) { - propertiesList.add(cNode.toString()); - } - return heteroConfigurationMapper; - }).getOrNull(); - - return null; + public CNode describeStructure(T instance, ConfigurationContext context) { + return lookupConfigurator(context, instance.getClass()) + .map(configurator -> convertToNode(context, configurator, instance)) + .filter(Objects::nonNull) + .map(node->{ + return new Scalar(preferredSymbol(instance.getDescriptor())); + }).getOrNull(); } @SuppressWarnings("unused") From 448c4a25e4f577a08e245b37c8a5bb08096e6efd Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 28 Aug 2019 12:17:03 +0530 Subject: [PATCH 28/93] Added addition configurator wise tests --- .../plugins/casc/SchemaGenerationTest.java | 29 ++++++++++++++++++- .../plugins/casc/emptyToolBaseConfig.yml | 13 +++++++++ .../plugins/casc/invalidDataFormat.yml | 3 ++ .../plugins/casc/invalidToolBaseConfig.yml | 5 ++++ .../plugins/casc/validToolBaseConfig.yml | 5 ++++ 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/emptyToolBaseConfig.yml create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/invalidDataFormat.yml create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/invalidToolBaseConfig.yml create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/validToolBaseConfig.yml diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 8cdb01265c..50fa26fbcb 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -6,6 +6,8 @@ import com.google.gson.JsonParser; import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import io.jenkins.plugins.casc.misc.Util; +import java.io.IOException; +import java.net.URISyntaxException; import org.everit.json.schema.Schema; import org.everit.json.schema.ValidationException; import org.everit.json.schema.loader.SchemaLoader; @@ -57,4 +59,29 @@ public void invalidSchemaShouldNotSucceed() throws Exception { ve.printStackTrace(); } } -} + + @Test + public void invalidJenkinsDataForBaseConfig() throws Exception { + String yamlStringContents = Util.toStringFromYamlFile(this, "invalidDataFormat.yml"); + } + + @Test + public void validJenkinsDataForBaseConfig() throws Exception { + String yamlStringContents = Util.toStringFromYamlFile(this, "validDataFormat.yml"); + } + + @Test + public void validToolDataForBaseConfig() throws Exception { + String yamlStringContents = Util.toStringFromYamlFile(this, "validToolBaseConfig.yml"); + } + + @Test + public void invalidToolDataForBaseConfig() throws Exception { + String yamlStringContents = Util.toStringFromYamlFile(this, "invalidToolBaseConfig.yml"); + } + + @Test + public void invalidEmptyToolForBaseConfig() throws Exception { + String yamlStringContents = Util.toStringFromYamlFile(this, "emptyToolBaseConfig.yml"); + } + } diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/emptyToolBaseConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/emptyToolBaseConfig.yml new file mode 100644 index 0000000000..36f10959c3 --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/emptyToolBaseConfig.yml @@ -0,0 +1,13 @@ +tool: + maven: + settingsProvider: + filePath: + path: /usr/share/maven-settings.xml + installations: + - name: maven + home: /usr/share/maven + properties: + - installSourceProperty: + installers: + - mavenInstaller: + id: diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidDataFormat.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidDataFormat.yml new file mode 100644 index 0000000000..509d9f8f80 --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidDataFormat.yml @@ -0,0 +1,3 @@ +jenkins: + systemMessage: "Hello World" + numExecutors : "Hello world" \ No newline at end of file diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidToolBaseConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidToolBaseConfig.yml new file mode 100644 index 0000000000..ac91702c5c --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidToolBaseConfig.yml @@ -0,0 +1,5 @@ +tool: + git: + installations: + - name: git + home: 000 diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validToolBaseConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validToolBaseConfig.yml new file mode 100644 index 0000000000..b56f28f184 --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/validToolBaseConfig.yml @@ -0,0 +1,5 @@ +tool: + git: + installations: + - name: git + home: /usr/local/bin/git From 3165323bf9129eab7283896d08acd07f26bbab11 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 28 Aug 2019 15:20:13 +0530 Subject: [PATCH 29/93] Added the utlisation of describeStructure --- .../io/jenkins/plugins/casc/SchemaGeneration.java | 11 ++++++++--- .../HeteroDescribableConfigurator.java | 7 +------ .../jenkins/plugins/casc/SchemaGenerationTest.java | 13 ++----------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index d04bdb8e34..c07c9e8ff8 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,17 +1,16 @@ package io.jenkins.plugins.casc; +import hudson.ProxyConfiguration; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import jenkins.model.Jenkins; import org.json.JSONArray; import org.json.JSONObject; -import org.kohsuke.accmod.Restricted; -import org.kohsuke.accmod.restrictions.NoExternalUse; -@Restricted(NoExternalUse.class) public class SchemaGeneration { final static JSONObject schemaTemplateObject = new JSONObject() @@ -103,7 +102,13 @@ private static JSONObject generateHetroDescribableConfigObject(HeteroDescribable finalHetroConfiguratorObject.put("type", "object"); finalHetroConfiguratorObject.put("oneOf", oneOfJsonArray); } + + /*For testing purposes*/ + ConfiguratorRegistry registry = ConfiguratorRegistry.get(); + ConfigurationContext context = new ConfigurationContext(registry); + System.out.println(heteroDescribableConfiguratorObject.describeStructure(Jenkins.getInstance(), context)); return finalHetroConfiguratorObject; + } private static JSONObject generateNonEnumAttributeObject(Attribute attribute) { diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java index b85406a311..0642f150f9 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java @@ -122,12 +122,7 @@ public CNode describe(T instance, ConfigurationContext context) { @CheckForNull public CNode describeStructure(T instance, ConfigurationContext context) { - return lookupConfigurator(context, instance.getClass()) - .map(configurator -> convertToNode(context, configurator, instance)) - .filter(Objects::nonNull) - .map(node->{ - return new Scalar(preferredSymbol(instance.getDescriptor())); - }).getOrNull(); + return lookupConfigurator(context, instance.getClass()).map(configurator-> convertToNode(context, configurator, instance)).getOrNull(); } @SuppressWarnings("unused") diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 50fa26fbcb..a1bda5cefb 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -1,13 +1,8 @@ package io.jenkins.plugins.casc; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; -import com.google.gson.JsonParser; + import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import io.jenkins.plugins.casc.misc.Util; -import java.io.IOException; -import java.net.URISyntaxException; import org.everit.json.schema.Schema; import org.everit.json.schema.ValidationException; import org.everit.json.schema.loader.SchemaLoader; @@ -42,12 +37,8 @@ public void validSchemaShouldSucceed() throws Exception { @Test public void invalidSchemaShouldNotSucceed() throws Exception { JSONObject schemaObject = generateSchema(); - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - JsonParser jsonParser = new JsonParser(); - JsonElement jsonElement = jsonParser.parse(schemaObject.toString()); - String prettyJsonString = gson.toJson(jsonElement); JSONObject jsonSchema = new JSONObject( - new JSONTokener(prettyJsonString)); + new JSONTokener(schemaObject.toString())); String yamlStringContents = Util.toStringFromYamlFile(this, "invalidSchemaConfig.yml"); JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); From ad57f8dbb3452731a732664a74c5cf7f4efdf996 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Thu, 29 Aug 2019 13:17:28 +0530 Subject: [PATCH 30/93] Added default configurators describe structure --- .../io/jenkins/plugins/casc/Configurator.java | 19 +++++++++++++++++++ .../plugins/casc/SchemaGeneration.java | 12 ++++++++---- .../HeteroDescribableConfigurator.java | 10 +++++----- .../plugins/casc/SchemaGenerationTest.java | 2 +- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index 5e9368d291..b1015f7a05 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -24,8 +24,10 @@ import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; import hudson.ExtensionPoint; +import hudson.model.Describable; import io.jenkins.plugins.casc.model.CNode; import io.jenkins.plugins.casc.model.Mapping; +import io.vavr.control.Option; import java.util.Collections; import java.util.Comparator; import java.util.List; @@ -34,6 +36,8 @@ import org.apache.commons.lang.StringUtils; import org.jenkinsci.Symbol; +import static io.vavr.API.unchecked; + /** * Define a {@link Configurator} which handles a configuration element, identified by name. * @author Nicolas De Loof @@ -167,4 +171,19 @@ default CNode describe(T instance, ConfigurationContext context) throws Exceptio return mapping; } + + @CheckForNull + default CNode describeStruct(T instance, ConfigurationContext context) { + return lookupConfig(context, instance.getClass()).map(configurator-> convertToNod(context, configurator, (Describable) instance)).getOrNull(); + } + + + @NonNull + default Option> lookupConfig(ConfigurationContext context, Class descriptor) { + return Option.of(context.lookup(descriptor)); + } + + default CNode convertToNod(ConfigurationContext context, Configurator configurator, Describable instance) { + return unchecked(() -> configurator.describe(instance, context)).apply(); + } } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index c07c9e8ff8..8b1477a971 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,7 +1,9 @@ package io.jenkins.plugins.casc; -import hudson.ProxyConfiguration; +import hudson.ExtensionList; +import hudson.security.HudsonPrivateSecurityRealm; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; +import io.jenkins.plugins.casc.model.CNode; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashSet; @@ -19,7 +21,7 @@ public class SchemaGeneration { .put("description", "Jenkins Configuration as Code") .put("type", "object"); - public static JSONObject generateSchema() { + public static JSONObject generateSchema() throws Exception { /** * The initial template for the JSON Schema @@ -82,7 +84,8 @@ else if (configuratorObject instanceof HeteroDescribableConfigurator) { return schemaObject; } - private static JSONObject generateHetroDescribableConfigObject(HeteroDescribableConfigurator heteroDescribableConfiguratorObject) { + private static JSONObject generateHetroDescribableConfigObject(HeteroDescribableConfigurator heteroDescribableConfiguratorObject) + throws Exception { Map implementorsMap = heteroDescribableConfiguratorObject .getImplementors(); JSONObject finalHetroConfiguratorObject = new JSONObject(); @@ -106,7 +109,8 @@ private static JSONObject generateHetroDescribableConfigObject(HeteroDescribable /*For testing purposes*/ ConfiguratorRegistry registry = ConfiguratorRegistry.get(); ConfigurationContext context = new ConfigurationContext(registry); - System.out.println(heteroDescribableConfiguratorObject.describeStructure(Jenkins.getInstance(), context)); + final Configurator c = context.lookupOrFail(HudsonPrivateSecurityRealm.class); + System.out.println(heteroDescribableConfiguratorObject.describeStruct(Jenkins.getInstance(), context)); return finalHetroConfiguratorObject; } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java index 0642f150f9..713180a824 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java @@ -119,11 +119,11 @@ public CNode describe(T instance, ConfigurationContext context) { } }).getOrNull(); } - - @CheckForNull - public CNode describeStructure(T instance, ConfigurationContext context) { - return lookupConfigurator(context, instance.getClass()).map(configurator-> convertToNode(context, configurator, instance)).getOrNull(); - } +// +// @CheckForNull +// public CNode describeStructure(T instance, ConfigurationContext context) { +// return r +// } @SuppressWarnings("unused") public Map> getImplementors() { diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index a1bda5cefb..aeb6bda8ee 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -14,7 +14,7 @@ import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; import static org.junit.Assert.fail; -public class SchemaGenerationTest { +public class gSchemaGenerationTest { @Rule public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); From 14197bc7f427c6c1ebbb3a5225ba9985d0a2e981 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 30 Aug 2019 01:53:59 +0530 Subject: [PATCH 31/93] Added describe Strucure function to default Config --- .../io/jenkins/plugins/casc/Configurator.java | 22 +++++++-------- .../plugins/casc/SchemaGeneration.java | 27 +++++++++++++++---- .../plugins/casc/SchemaGenerationTest.java | 13 ++++++++- 3 files changed, 44 insertions(+), 18 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index b1015f7a05..084e8e08e8 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -171,19 +171,17 @@ default CNode describe(T instance, ConfigurationContext context) throws Exceptio return mapping; } - @CheckForNull - default CNode describeStruct(T instance, ConfigurationContext context) { - return lookupConfig(context, instance.getClass()).map(configurator-> convertToNod(context, configurator, (Describable) instance)).getOrNull(); - } - - - @NonNull - default Option> lookupConfig(ConfigurationContext context, Class descriptor) { - return Option.of(context.lookup(descriptor)); + default CNode describeStructure(T instance, ConfigurationContext context) + throws Exception { + Mapping mapping = new Mapping(); + for (Attribute attribute : getAttributes()) { + CNode value = attribute.describe(instance, context); + if (value != null) { + mapping.put(attribute.getName(), attribute.getType().getSimpleName()); + } + } + return mapping; } - default CNode convertToNod(ConfigurationContext context, Configurator configurator, Describable instance) { - return unchecked(() -> configurator.describe(instance, context)).apply(); - } } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 8b1477a971..3c7cadab08 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,9 +1,16 @@ package io.jenkins.plugins.casc; +import com.google.inject.Inject; import hudson.ExtensionList; import hudson.security.HudsonPrivateSecurityRealm; +import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import io.jenkins.plugins.casc.model.CNode; +import io.jenkins.plugins.casc.model.Mapping; +import io.jenkins.plugins.casc.snakeyaml.nodes.Node; +import io.jenkins.plugins.casc.snakeyaml.nodes.NodeTuple; +import io.jenkins.plugins.casc.snakeyaml.nodes.ScalarNode; +import io.jenkins.plugins.casc.snakeyaml.nodes.Tag; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashSet; @@ -13,6 +20,8 @@ import org.json.JSONArray; import org.json.JSONObject; +import static io.jenkins.plugins.casc.snakeyaml.DumperOptions.ScalarStyle.PLAIN; + public class SchemaGeneration { final static JSONObject schemaTemplateObject = new JSONObject() @@ -106,11 +115,6 @@ private static JSONObject generateHetroDescribableConfigObject(HeteroDescribable finalHetroConfiguratorObject.put("oneOf", oneOfJsonArray); } - /*For testing purposes*/ - ConfiguratorRegistry registry = ConfiguratorRegistry.get(); - ConfigurationContext context = new ConfigurationContext(registry); - final Configurator c = context.lookupOrFail(HudsonPrivateSecurityRealm.class); - System.out.println(heteroDescribableConfiguratorObject.describeStruct(Jenkins.getInstance(), context)); return finalHetroConfiguratorObject; } @@ -193,5 +197,18 @@ private static void generateEnumAttributeSchema(JSONObject attributeSchemaTempla .put("enum", new JSONArray(attributeList))); } } + + public static void rootConfigGeneration() throws Exception { + DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); + final ConfigurationContext context = new ConfigurationContext(registry); + for (RootElementConfigurator root : RootElementConfigurator.all()) { + final CNode config = root.describeStructure(root.getTargetComponent(context), context); + final Mapping mapping = config.asMapping(); + final List> entries = new ArrayList<>(mapping.entrySet()); + for (Map.Entry entry : entries) { + System.out.println(entry.getKey() + " " + entry.getValue().toString()); + } + } + } } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index aeb6bda8ee..578a3e53a0 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -1,8 +1,12 @@ package io.jenkins.plugins.casc; +import hudson.security.HudsonPrivateSecurityRealm; +import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import io.jenkins.plugins.casc.misc.Util; +import io.jenkins.plugins.casc.model.CNode; +import jenkins.model.Jenkins; import org.everit.json.schema.Schema; import org.everit.json.schema.ValidationException; import org.everit.json.schema.loader.SchemaLoader; @@ -12,9 +16,10 @@ import org.junit.Test; import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; +import static io.jenkins.plugins.casc.SchemaGeneration.rootConfigGeneration; import static org.junit.Assert.fail; -public class gSchemaGenerationTest { +public class SchemaGenerationTest { @Rule public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); @@ -27,6 +32,7 @@ public void validSchemaShouldSucceed() throws Exception { JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); Schema schema = SchemaLoader.load(jsonSchema); + try { schema.validate(jsonSubject); } catch (Exception e) { @@ -51,6 +57,11 @@ public void invalidSchemaShouldNotSucceed() throws Exception { } } + @Test + public void describeStructtest() throws Exception { + rootConfigGeneration(); + } + @Test public void invalidJenkinsDataForBaseConfig() throws Exception { String yamlStringContents = Util.toStringFromYamlFile(this, "invalidDataFormat.yml"); From a338fbcd12d59609b4c2f0748302704eee7704da Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 31 Aug 2019 01:35:29 +0530 Subject: [PATCH 32/93] Added JSON Schema mode and boolean --- .../io/jenkins/plugins/casc/Attribute.java | 20 ++++++++++++++++--- .../plugins/casc/ConfigurationContext.java | 11 ++++++++++ .../io/jenkins/plugins/casc/Configurator.java | 3 +++ .../plugins/casc/SchemaGeneration.java | 11 ++++++++++ .../plugins/casc/SchemaGenerationTest.java | 5 +++++ 5 files changed, 47 insertions(+), 3 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index 14a630b656..91777e3929 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -61,6 +61,7 @@ public class Attribute { private Setter setter; private Getter getter; private boolean secret; + private boolean isJsonSchema; private boolean deprecated; @@ -111,6 +112,10 @@ public Class[] getRestrictions() { return restrictions != null ? restrictions : EMPTY; } + public void setJsonSchema(boolean jsonSchema) { + isJsonSchema = jsonSchema; + } + public boolean isRestricted() { return restrictions != null && restrictions.length > 0; } @@ -225,9 +230,17 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi ": No configurator found for type " + type); } try { - Object o = getValue(instance); - if (o == null) { - return null; + Object o; + if(isJsonSchema) { + o = getType(); + if (o == null) { + return null; + } + } else { + o = getValue(instance); + if (o == null) { + return null; + } } // In Export we sensitive only those values which do not get rendered as secrets @@ -249,6 +262,7 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi } } + /** * Describes a node. * @param c Configurator diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java index b10eb4d27f..7a93693e97 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java @@ -30,6 +30,8 @@ public class ConfigurationContext implements ConfiguratorRegistry { private transient final ConfiguratorRegistry registry; + private String mode; + public ConfigurationContext(ConfiguratorRegistry registry) { this.registry = registry; } @@ -62,6 +64,15 @@ public void setUnknown(Unknown unknown) { this.unknown = unknown; } + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + // --- delegate methods for ConfigurationContext diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index 084e8e08e8..a8f86047f4 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -176,6 +176,9 @@ default CNode describeStructure(T instance, ConfigurationContext context) throws Exception { Mapping mapping = new Mapping(); for (Attribute attribute : getAttributes()) { + if(context.getMode().equals("JSONSchema")) { + attribute.setJsonSchema(true); + } CNode value = attribute.describe(instance, context); if (value != null) { mapping.put(attribute.getName(), attribute.getType().getSimpleName()); diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 3c7cadab08..b724571146 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -199,8 +199,11 @@ private static void generateEnumAttributeSchema(JSONObject attributeSchemaTempla } public static void rootConfigGeneration() throws Exception { + + DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); final ConfigurationContext context = new ConfigurationContext(registry); + context.setMode("JSONSchema"); for (RootElementConfigurator root : RootElementConfigurator.all()) { final CNode config = root.describeStructure(root.getTargetComponent(context), context); final Mapping mapping = config.asMapping(); @@ -208,6 +211,14 @@ public static void rootConfigGeneration() throws Exception { for (Map.Entry entry : entries) { System.out.println(entry.getKey() + " " + entry.getValue().toString()); } + + /* + * Create a separate mode for the Attribute + * Context configuration * + * Add the correct context.(Mode) + * + * */ + } } } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 578a3e53a0..4b7b32392d 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -86,4 +86,9 @@ public void invalidToolDataForBaseConfig() throws Exception { public void invalidEmptyToolForBaseConfig() throws Exception { String yamlStringContents = Util.toStringFromYamlFile(this, "emptyToolBaseConfig.yml"); } + + + private void validateYamlAgainstSchema(String yamlString) { + + } } From d0f9349ebc548dd02f09df3f6c62ec247387d8a7 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sun, 1 Sep 2019 02:11:00 +0530 Subject: [PATCH 33/93] Added describeStructure to Attribute and Configurator --- .../io/jenkins/plugins/casc/Attribute.java | 59 ++++++++++++++++++- .../io/jenkins/plugins/casc/Configurator.java | 2 +- .../plugins/casc/SchemaGeneration.java | 9 --- .../plugins/casc/SchemaGenerationTest.java | 2 +- 4 files changed, 58 insertions(+), 14 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index 91777e3929..240e65fd6b 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -248,8 +248,11 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi if (multiple) { Sequence seq = new Sequence(); if (o.getClass().isArray()) o = Arrays.asList((Object[]) o); - for (Object value : (Iterable) o) { - seq.add(_describe(c, context, value, shouldBeMasked)); + if(o instanceof Iterable) { + System.out.println("This is iterable"); + for (Object value : (Iterable) o) { + seq.add(_describe(c, context, value, shouldBeMasked)); + } } return seq; } @@ -263,6 +266,51 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi } + /** + * This function is for the JSONSchemaGeneration + * @param instance + * @param context + * @return + */ + public CNode describeStructure(Owner instance, ConfigurationContext context) { + + final Configurator c = context.lookup(type); + if (c == null) { + return new Scalar("FAILED TO EXPORT\n" + instance.getClass().getName()+"#"+name + + ": No configurator found for type " + type); + } + try { + Object o = new Object(); + if(isJsonSchema) { + o = getType(); + if (o == null) { + return null; + } + } + + // In Export we sensitive only those values which do not get rendered as secrets + boolean shouldBeMasked = isSecret(instance); + if (multiple) { + Sequence seq = new Sequence(); + if (o.getClass().isArray()) o = Arrays.asList((Object[]) o); + if(o instanceof Iterable) { + for (Object value : (Iterable) o) { + seq.add(_describe(c, context, value, shouldBeMasked)); + } + } + return seq; + } + return _describe(c, context, o, shouldBeMasked); + } catch (Exception | /* Jenkins.getDescriptorOrDie */AssertionError e) { + // Don't fail the whole export, prefer logging this error + LOGGER.log(Level.WARNING, "Failed to export", e); + return new Scalar("FAILED TO EXPORT\n" + instance.getClass().getName() + "#" + name + ": " + + printThrowable(e)); + } + + } + + /** * Describes a node. * @param c Configurator @@ -275,7 +323,12 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi */ private CNode _describe(Configurator c, ConfigurationContext context, Object value, boolean shouldBeMasked) throws Exception { - CNode node = c.describe(value, context); + CNode node; + if(isJsonSchema) { + node = c.describeStructure(value, context); + } else { + node = c.describe(value, context); + } if (shouldBeMasked && node instanceof Scalar) { ((Scalar)node).sensitive(true); } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index a8f86047f4..f398f28b85 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -179,7 +179,7 @@ default CNode describeStructure(T instance, ConfigurationContext context) if(context.getMode().equals("JSONSchema")) { attribute.setJsonSchema(true); } - CNode value = attribute.describe(instance, context); + CNode value = attribute.describeStructure(instance, context); if (value != null) { mapping.put(attribute.getName(), attribute.getType().getSimpleName()); } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index b724571146..9a748c3ff9 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -200,7 +200,6 @@ private static void generateEnumAttributeSchema(JSONObject attributeSchemaTempla public static void rootConfigGeneration() throws Exception { - DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); final ConfigurationContext context = new ConfigurationContext(registry); context.setMode("JSONSchema"); @@ -211,14 +210,6 @@ public static void rootConfigGeneration() throws Exception { for (Map.Entry entry : entries) { System.out.println(entry.getKey() + " " + entry.getValue().toString()); } - - /* - * Create a separate mode for the Attribute - * Context configuration * - * Add the correct context.(Mode) - * - * */ - } } } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 4b7b32392d..54b22e7c69 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -58,7 +58,7 @@ public void invalidSchemaShouldNotSucceed() throws Exception { } @Test - public void describeStructtest() throws Exception { + public void describeStructTest() throws Exception { rootConfigGeneration(); } From 901ac01b0cd7171badb6a35fc49aa168d7e8660b Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 6 Sep 2019 18:02:09 +0530 Subject: [PATCH 34/93] Lookup addition for configurators --- .../plugins/casc/SchemaGeneration.java | 51 +++++++++++++++---- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 9a748c3ff9..307b800c98 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,27 +1,21 @@ package io.jenkins.plugins.casc; -import com.google.inject.Inject; -import hudson.ExtensionList; -import hudson.security.HudsonPrivateSecurityRealm; +import hudson.DescriptorExtensionList; +import hudson.model.Descriptor; import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import io.jenkins.plugins.casc.model.CNode; import io.jenkins.plugins.casc.model.Mapping; -import io.jenkins.plugins.casc.snakeyaml.nodes.Node; -import io.jenkins.plugins.casc.snakeyaml.nodes.NodeTuple; -import io.jenkins.plugins.casc.snakeyaml.nodes.ScalarNode; -import io.jenkins.plugins.casc.snakeyaml.nodes.Tag; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import jenkins.model.Jenkins; import org.json.JSONArray; import org.json.JSONObject; -import static io.jenkins.plugins.casc.snakeyaml.DumperOptions.ScalarStyle.PLAIN; - public class SchemaGeneration { final static JSONObject schemaTemplateObject = new JSONObject() @@ -51,6 +45,19 @@ public static JSONObject generateSchema() throws Exception { if (configuratorObject instanceof BaseConfigurator) { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; List baseConfigAttributeList = baseConfigurator.getAttributes(); +// +// /*Get rid of this*/ +// DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); +// final ConfigurationContext context = new ConfigurationContext(registry); +// List configurators = new ArrayList<>(baseConfigurator.getConfigurators(context)) ; +// for(Configurator configurator : configurators) { +// System.out.println("BaseConfig is " + configurator.getName()); +// } +// /*Get rid of this*/ + + System.out.println("Base Configurator: " + baseConfigurator.getName()); + + if (baseConfigAttributeList.size() == 0) { schemaConfiguratorObjects .put(((BaseConfigurator) configuratorObject).getTarget().getSimpleName().toLowerCase(), @@ -61,6 +68,10 @@ public static JSONObject generateSchema() throws Exception { } else { JSONObject attributeSchema = new JSONObject(); for (Attribute attribute : baseConfigAttributeList) { + System.out.println(" Attribute : " + attribute.getName().toLowerCase() + "Attr Type: " + attribute.getType().getSimpleName()); + + + if (attribute.multiple) { generateMultipleAttributeSchema(attributeSchema, attribute); } else { @@ -84,7 +95,22 @@ public static JSONObject generateSchema() throws Exception { * It mimics the HetroDescribable Configurator.jelly */ else if (configuratorObject instanceof HeteroDescribableConfigurator) { + HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject; + + /*Get rid of this*/ + System.out.println("HeteroDescribableConfigurator: " + heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase()); + + DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); + final ConfigurationContext context = new ConfigurationContext(registry); + List configurators = new ArrayList<>(heteroDescribableConfigurator.getConfigurators(context)) ; + + for(Configurator configurator : configurators) { + System.out.println(" Descriptor is " + configurator.getName()); + } + /*Get rid of this*/ + + schemaConfiguratorObjects.put(heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), generateHetroDescribableConfigObject(heteroDescribableConfigurator)); } @@ -103,8 +129,11 @@ private static JSONObject generateHetroDescribableConfigObject(HeteroDescribable JSONArray oneOfJsonArray = new JSONArray(); while (itr.hasNext()) { + + Map.Entry entry = itr.next(); JSONObject implementorObject = new JSONObject(); + System.out.println(" SubHetro :" + entry.getValue().getName()); implementorObject.put("properties", new JSONObject().put(entry.getKey(), new JSONObject() .put("$id", "#/definitions/" + entry.getValue().getName()))); @@ -169,6 +198,7 @@ private static JSONObject generateRootConfiguratorObject() { } private static void generateMultipleAttributeSchema(JSONObject attributeSchema, Attribute attribute) { + if (attribute.type.getName().equals("java.lang.String")) { attributeSchema.put(attribute.getName(), new JSONObject() @@ -183,6 +213,7 @@ private static void generateMultipleAttributeSchema(JSONObject attributeSchema, private static void generateEnumAttributeSchema(JSONObject attributeSchemaTemplate, Attribute attribute) { if (attribute.type.getEnumConstants().length == 0) { + System.out.println(" Sub-Enum Attribute : " + attribute.getName().toLowerCase() ); attributeSchemaTemplate.put(attribute.getName(), new JSONObject() .put("type", "string")); @@ -212,5 +243,7 @@ public static void rootConfigGeneration() throws Exception { } } } + + } From 4df5e1e1f073f458270df58acba71a2073c30010 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 6 Sep 2019 21:36:06 +0530 Subject: [PATCH 35/93] Added tests and added baseConfigurator LookupFeature --- .../plugins/casc/SchemaGeneration.java | 65 ++++++++--------- .../plugins/casc/SchemaGenerationTest.java | 70 +++++++++++++++++-- 2 files changed, 94 insertions(+), 41 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 307b800c98..4ed6b6019d 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -45,22 +45,10 @@ public static JSONObject generateSchema() throws Exception { if (configuratorObject instanceof BaseConfigurator) { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; List baseConfigAttributeList = baseConfigurator.getAttributes(); -// -// /*Get rid of this*/ -// DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); -// final ConfigurationContext context = new ConfigurationContext(registry); -// List configurators = new ArrayList<>(baseConfigurator.getConfigurators(context)) ; -// for(Configurator configurator : configurators) { -// System.out.println("BaseConfig is " + configurator.getName()); -// } -// /*Get rid of this*/ - - System.out.println("Base Configurator: " + baseConfigurator.getName()); - if (baseConfigAttributeList.size() == 0) { schemaConfiguratorObjects - .put(((BaseConfigurator) configuratorObject).getTarget().getSimpleName().toLowerCase(), + .put(baseConfigurator.getName().toLowerCase(), new JSONObject() .put("type", "object") .put("properties", new JSONObject())); @@ -68,10 +56,6 @@ public static JSONObject generateSchema() throws Exception { } else { JSONObject attributeSchema = new JSONObject(); for (Attribute attribute : baseConfigAttributeList) { - System.out.println(" Attribute : " + attribute.getName().toLowerCase() + "Attr Type: " + attribute.getType().getSimpleName()); - - - if (attribute.multiple) { generateMultipleAttributeSchema(attributeSchema, attribute); } else { @@ -95,22 +79,7 @@ public static JSONObject generateSchema() throws Exception { * It mimics the HetroDescribable Configurator.jelly */ else if (configuratorObject instanceof HeteroDescribableConfigurator) { - HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject; - - /*Get rid of this*/ - System.out.println("HeteroDescribableConfigurator: " + heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase()); - - DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); - final ConfigurationContext context = new ConfigurationContext(registry); - List configurators = new ArrayList<>(heteroDescribableConfigurator.getConfigurators(context)) ; - - for(Configurator configurator : configurators) { - System.out.println(" Descriptor is " + configurator.getName()); - } - /*Get rid of this*/ - - schemaConfiguratorObjects.put(heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), generateHetroDescribableConfigObject(heteroDescribableConfigurator)); } @@ -126,14 +95,10 @@ private static JSONObject generateHetroDescribableConfigObject(HeteroDescribable JSONObject finalHetroConfiguratorObject = new JSONObject(); if (implementorsMap.size() != 0) { Iterator> itr = implementorsMap.entrySet().iterator(); - JSONArray oneOfJsonArray = new JSONArray(); while (itr.hasNext()) { - - Map.Entry entry = itr.next(); JSONObject implementorObject = new JSONObject(); - System.out.println(" SubHetro :" + entry.getValue().getName()); implementorObject.put("properties", new JSONObject().put(entry.getKey(), new JSONObject() .put("$id", "#/definitions/" + entry.getValue().getName()))); @@ -171,6 +136,10 @@ private static JSONObject generateNonEnumAttributeObject(Attribute attribute) { attributeType.put("type", "integer"); break; + case "hudson.Secret": + attributeType.put("type", "string"); + break; + case "java.lang.Long": attributeType.put("type", "integer"); break; @@ -194,6 +163,7 @@ private static JSONObject generateRootConfiguratorObject() { rootConfiguratorObject .put(rootElementConfigurator.getName(), new JSONObject().put("type", "object")); } + return rootConfiguratorObject; } @@ -213,7 +183,6 @@ private static void generateMultipleAttributeSchema(JSONObject attributeSchema, private static void generateEnumAttributeSchema(JSONObject attributeSchemaTemplate, Attribute attribute) { if (attribute.type.getEnumConstants().length == 0) { - System.out.println(" Sub-Enum Attribute : " + attribute.getName().toLowerCase() ); attributeSchemaTemplate.put(attribute.getName(), new JSONObject() .put("type", "string")); @@ -244,6 +213,28 @@ public static void rootConfigGeneration() throws Exception { } } + public static void lookupBaseConfigurator(String configName) throws Exception { + ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); + for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { + if (configuratorObject instanceof BaseConfigurator) { + BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; + if(configName.equals(baseConfigurator.getName())){ + List baseConfigAttributeList = baseConfigurator.getAttributes(); + /* + * Recursively iterate to get information + * But this does not quite get us all of the information we require. + * We would still need to iterate over heterodescribable configurators as well + * */ + } + + + } + } + + + + } + } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 54b22e7c69..b537991aca 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -16,6 +16,7 @@ import org.junit.Test; import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; +import static io.jenkins.plugins.casc.SchemaGeneration.lookupBaseConfigurator; import static io.jenkins.plugins.casc.SchemaGeneration.rootConfigGeneration; import static org.junit.Assert.fail; @@ -62,33 +63,94 @@ public void describeStructTest() throws Exception { rootConfigGeneration(); } + @Test + public void lookupConfigtest() throws Exception { + lookupBaseConfigurator("jenkins"); + } + @Test public void invalidJenkinsDataForBaseConfig() throws Exception { + JSONObject schemaObject = generateSchema(); + JSONObject jsonSchema = new JSONObject( + new JSONTokener(schemaObject.toString())); String yamlStringContents = Util.toStringFromYamlFile(this, "invalidDataFormat.yml"); + JSONObject jsonSubject = new JSONObject( + new JSONTokener(Util.convertToJson(yamlStringContents))); + Schema schema = SchemaLoader.load(jsonSchema); + try { + schema.validate(jsonSubject); + fail(); + } catch (ValidationException ve) { + ve.printStackTrace(); + } } @Test public void validJenkinsDataForBaseConfig() throws Exception { + JSONObject schemaObject = generateSchema(); + JSONObject jsonSchema = new JSONObject( + new JSONTokener(schemaObject.toString())); String yamlStringContents = Util.toStringFromYamlFile(this, "validDataFormat.yml"); + JSONObject jsonSubject = new JSONObject( + new JSONTokener(Util.convertToJson(yamlStringContents))); + Schema schema = SchemaLoader.load(jsonSchema); + + try { + schema.validate(jsonSubject); + } catch (Exception e) { + fail(e.getMessage()); + } } @Test public void validToolDataForBaseConfig() throws Exception { + JSONObject schemaObject = generateSchema(); + JSONObject jsonSchema = new JSONObject( + new JSONTokener(schemaObject.toString())); String yamlStringContents = Util.toStringFromYamlFile(this, "validToolBaseConfig.yml"); + JSONObject jsonSubject = new JSONObject( + new JSONTokener(Util.convertToJson(yamlStringContents))); + Schema schema = SchemaLoader.load(jsonSchema); + + try { + schema.validate(jsonSubject); + } catch (Exception e) { + fail(e.getMessage()); + } } @Test public void invalidToolDataForBaseConfig() throws Exception { + JSONObject schemaObject = generateSchema(); + JSONObject jsonSchema = new JSONObject( + new JSONTokener(schemaObject.toString())); String yamlStringContents = Util.toStringFromYamlFile(this, "invalidToolBaseConfig.yml"); + JSONObject jsonSubject = new JSONObject( + new JSONTokener(Util.convertToJson(yamlStringContents))); + Schema schema = SchemaLoader.load(jsonSchema); + try { + schema.validate(jsonSubject); + fail(); + } catch (ValidationException ve) { + ve.printStackTrace(); + } } @Test public void invalidEmptyToolForBaseConfig() throws Exception { + JSONObject schemaObject = generateSchema(); + JSONObject jsonSchema = new JSONObject( + new JSONTokener(schemaObject.toString())); String yamlStringContents = Util.toStringFromYamlFile(this, "emptyToolBaseConfig.yml"); + JSONObject jsonSubject = new JSONObject( + new JSONTokener(Util.convertToJson(yamlStringContents))); + Schema schema = SchemaLoader.load(jsonSchema); + try { + schema.validate(jsonSubject); + fail(); + } catch (ValidationException ve) { + ve.printStackTrace(); + } } - - private void validateYamlAgainstSchema(String yamlString) { - - } } From fd886c82533192fb8c87c1103d6a6e380d930980 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 14 Sep 2019 21:21:15 +0530 Subject: [PATCH 36/93] Added test for rootConfiguratorGeneration --- .../java/io/jenkins/plugins/casc/SchemaGenerationTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index d4cbed6788..7c944a6a96 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -11,6 +11,7 @@ import org.junit.Test; import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; +import static io.jenkins.plugins.casc.SchemaGeneration.rootConfigGeneration; import static org.junit.Assert.fail; public class SchemaGenerationTest { @@ -135,5 +136,10 @@ public void invalidEmptyToolForBaseConfig() throws Exception { } } + @Test + public void testRootConfiguratorGeneration() throws Exception { + rootConfigGeneration(); + } + } From 6c420557e05e45a1ed17319ae9510953b6e36ce3 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 20 Sep 2019 11:50:12 +0530 Subject: [PATCH 37/93] Sequence indication fix --- plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index ad1183b6a8..6c9140191d 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -177,6 +177,7 @@ default CNode describeStructure(T instance, ConfigurationContext context) attribute.setJsonSchema(true); } CNode value = attribute.describeStructure(instance, context); + System.out.println("This is " + value.asSequence()); if (value != null) { mapping.put(attribute.getName(), attribute.getType().getSimpleName()); } From b0b870b678448aeac4dd79c0b9dc01c90feafa18 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 21 Sep 2019 00:33:29 +0530 Subject: [PATCH 38/93] Configurator Lookup Addition --- .../src/main/java/io/jenkins/plugins/casc/Configurator.java | 4 +++- .../main/java/io/jenkins/plugins/casc/SchemaGeneration.java | 3 +++ .../java/io/jenkins/plugins/casc/SchemaGenerationTest.java | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index 6c9140191d..d8d80f9831 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -31,6 +31,7 @@ import java.util.List; import java.util.Set; import java.util.stream.Collectors; +import jenkins.model.Jenkins; import org.apache.commons.lang.StringUtils; import org.jenkinsci.Symbol; @@ -176,8 +177,9 @@ default CNode describeStructure(T instance, ConfigurationContext context) if(context.getMode().equals("JSONSchema")) { attribute.setJsonSchema(true); } + CNode cNode = context.lookup(attribute.getType()).describe(instance, context); +// System.out.println("Configurator name is: " + configurator.getName()); CNode value = attribute.describeStructure(instance, context); - System.out.println("This is " + value.asSequence()); if (value != null) { mapping.put(attribute.getName(), attribute.getType().getSimpleName()); } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index eebad870ca..b06129ed92 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -13,6 +13,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import jenkins.model.Jenkins; import org.json.JSONArray; import org.json.JSONObject; @@ -162,6 +163,7 @@ private static JSONObject generateRootConfiguratorObject() { RootElementConfigurator rootElementConfigurator = i.next(); rootConfiguratorObject .put(rootElementConfigurator.getName(), new JSONObject().put("type", "object")); + System.out.println("root Name" + rootElementConfigurator.getName()); } return rootConfiguratorObject; } @@ -209,5 +211,6 @@ public static void rootConfigGeneration() throws Exception { } } } + } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 7c944a6a96..227fb0262d 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -140,6 +140,5 @@ public void invalidEmptyToolForBaseConfig() throws Exception { public void testRootConfiguratorGeneration() throws Exception { rootConfigGeneration(); } - } From fe7b0b81c5588339f8f74cb2ee7e4672756db8e8 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Tue, 24 Sep 2019 20:03:01 +0530 Subject: [PATCH 39/93] Added javadoc and logger warning for failing tests --- .../src/main/java/io/jenkins/plugins/casc/Attribute.java | 5 ++++- .../main/java/io/jenkins/plugins/casc/Configurator.java | 1 - .../java/io/jenkins/plugins/casc/SchemaGeneration.java | 1 - .../java/io/jenkins/plugins/casc/SchemaGenerationTest.java | 7 +++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index ed84c0b24c..1c0c9ad92b 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -112,6 +112,10 @@ public Class[] getRestrictions() { return restrictions != null ? restrictions : EMPTY; } + /** + * Set jsonSchema is used to tell the describe function to call the describe structure + * so that it supports and returns a nested structure + */ public void setJsonSchema(boolean jsonSchema) { isJsonSchema = jsonSchema; } @@ -307,7 +311,6 @@ public CNode describeStructure(Owner instance, ConfigurationContext context) { return new Scalar("FAILED TO EXPORT\n" + instance.getClass().getName() + "#" + name + ": " + printThrowable(e)); } - } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index d8d80f9831..ec09258ea8 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -31,7 +31,6 @@ import java.util.List; import java.util.Set; import java.util.stream.Collectors; -import jenkins.model.Jenkins; import org.apache.commons.lang.StringUtils; import org.jenkinsci.Symbol; diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index b06129ed92..83f6b90a80 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -13,7 +13,6 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; -import jenkins.model.Jenkins; import org.json.JSONArray; import org.json.JSONObject; diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 227fb0262d..234f53f669 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -2,6 +2,7 @@ import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import io.jenkins.plugins.casc.misc.Util; +import java.util.logging.Logger; import org.everit.json.schema.Schema; import org.everit.json.schema.ValidationException; import org.everit.json.schema.loader.SchemaLoader; @@ -15,6 +16,10 @@ import static org.junit.Assert.fail; public class SchemaGenerationTest { + + public static final Logger LOGGER = Logger.getLogger(TokenReloadAction.class.getName()); + private final String failureMessage = "The YAML file provided for this schema is invalid"; + @Rule public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); @@ -45,6 +50,7 @@ public void invalidSchemaShouldNotSucceed() throws Exception { Schema schema = SchemaLoader.load(jsonSchema); try { schema.validate(jsonSubject); + LOGGER.warning(failureMessage); fail(); } catch (ValidationException ve) { ve.printStackTrace(); @@ -62,6 +68,7 @@ public void invalidJenkinsDataForBaseConfig() throws Exception { Schema schema = SchemaLoader.load(jsonSchema); try { schema.validate(jsonSubject); + LOGGER.warning(failureMessage); fail(); } catch (ValidationException ve) { ve.printStackTrace(); From dcd5f6f2830449bbddee960f171fd49c9d66af6b Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 25 Sep 2019 13:00:19 +0530 Subject: [PATCH 40/93] Added storeConfigurators function --- .../io/jenkins/plugins/casc/Configurator.java | 2 -- .../plugins/casc/SchemaGeneration.java | 33 ++++++++++++++++++- .../configurators/PrimitiveConfigurator.java | 1 + .../plugins/casc/SchemaGenerationTest.java | 6 ++++ 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index ec09258ea8..ad1183b6a8 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -176,8 +176,6 @@ default CNode describeStructure(T instance, ConfigurationContext context) if(context.getMode().equals("JSONSchema")) { attribute.setJsonSchema(true); } - CNode cNode = context.lookup(attribute.getType()).describe(instance, context); -// System.out.println("Configurator name is: " + configurator.getName()); CNode value = attribute.describeStructure(instance, context); if (value != null) { mapping.put(attribute.getName(), attribute.getType().getSimpleName()); diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 83f6b90a80..d6acd874d9 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -5,6 +5,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonParser; import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry; +import io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import io.jenkins.plugins.casc.model.CNode; import io.jenkins.plugins.casc.model.Mapping; @@ -206,7 +207,37 @@ public static void rootConfigGeneration() throws Exception { final Mapping mapping = config.asMapping(); final List> entries = new ArrayList<>(mapping.entrySet()); for (Map.Entry entry : entries) { - System.out.println(entry.getKey() + " " + entry.getValue().toString()); + System.out.println(entry.getKey()); + } + System.out.println("End of an iteration of configurators"); + } + } + + public static void storeConfiguratorNames() { + ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); + for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { + if (configuratorObject instanceof BaseConfigurator) { + BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; + List baseConfigAttributeList = baseConfigurator.getAttributes(); + for (Attribute attribute : baseConfigAttributeList) { + if (attribute.multiple) { + System.out.println( + "This is a multiple attribute " + attribute.getType() + " " + attribute + .getName()); + } else { + if (attribute.type.isEnum()) { + System.out.println("This is an enumeration attribute: "); + if (attribute.type.getEnumConstants().length != 0) { + System.out.println("Printing Enumeration constants for: " + attribute.getName()); + for (Object obj : attribute.type.getEnumConstants()) { + System.out.println("EConstant : " + obj.toString()); + } + } + } + } + } + } else if (configuratorObject instanceof HeteroDescribableConfigurator) { + System.out.println("Instance of HeteroDescribable Configurator"); } } } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/PrimitiveConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/PrimitiveConfigurator.java index 9d8ffc3731..f709d62e71 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/PrimitiveConfigurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/PrimitiveConfigurator.java @@ -67,6 +67,7 @@ public CNode describe(Object instance, ConfigurationContext context) { return new Scalar(((Secret) instance).getEncryptedValue()).encrypted(true); } if (target.isEnum()) { + System.out.println(instance.getClass().getSimpleName()); return new Scalar((Enum) instance); } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 234f53f669..cfb42d9e97 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -13,6 +13,7 @@ import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; import static io.jenkins.plugins.casc.SchemaGeneration.rootConfigGeneration; +import static io.jenkins.plugins.casc.SchemaGeneration.storeConfiguratorNames; import static org.junit.Assert.fail; public class SchemaGenerationTest { @@ -147,5 +148,10 @@ public void invalidEmptyToolForBaseConfig() throws Exception { public void testRootConfiguratorGeneration() throws Exception { rootConfigGeneration(); } + + @Test + public void testStoreConfiguratorNames() throws Exception { + storeConfiguratorNames(); + } } From 122c8d9dd4260bcff9be963b58f7991dc60d4ea5 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 25 Sep 2019 21:39:53 +0530 Subject: [PATCH 41/93] Added root configurator nesting --- .../plugins/casc/SchemaGeneration.java | 119 ++++++++++++------ 1 file changed, 81 insertions(+), 38 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index d6acd874d9..04ce3fa88c 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -10,10 +10,13 @@ import io.jenkins.plugins.casc.model.CNode; import io.jenkins.plugins.casc.model.Mapping; import java.util.ArrayList; +import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.Set; import org.json.JSONArray; import org.json.JSONObject; @@ -40,49 +43,69 @@ public static JSONObject generateSchema() { * Iterates over the base configurators and adds them to the schema. */ JSONObject schemaConfiguratorObjects = new JSONObject(); - ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); - for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { - if (configuratorObject instanceof BaseConfigurator) { - BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; - List baseConfigAttributeList = baseConfigurator.getAttributes(); +// ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); + DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); + final ConfigurationContext context = new ConfigurationContext(registry); - if (baseConfigAttributeList.size() == 0) { - schemaConfiguratorObjects - .put(baseConfigurator.getName().toLowerCase(), - new JSONObject() - .put("type", "object") - .put("properties", new JSONObject())); - - } else { - JSONObject attributeSchema = new JSONObject(); - for (Attribute attribute : baseConfigAttributeList) { - if (attribute.multiple) { - generateMultipleAttributeSchema(attributeSchema, attribute); - } else { - if (attribute.type.isEnum()) { - generateEnumAttributeSchema(attributeSchema, attribute); + for (RootElementConfigurator rootElementConfigurator : RootElementConfigurator.all()) { + Set elements = new LinkedHashSet<>(); + listElements(elements, rootElementConfigurator.describe(), context); + + JSONObject rootConfiguratorProperties = new JSONObject(); + rootConfiguratorProperties.put("type", "object") + .put("additionalProperties", false) + .put("title", "Configuration base for the " + rootElementConfigurator.getName() + + " classifier"); + + for (Object configuratorObject : elements) { + if (configuratorObject instanceof BaseConfigurator) { + BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; + List baseConfigAttributeList = baseConfigurator.getAttributes(); + + if (baseConfigAttributeList.size() == 0) { + schemaConfiguratorObjects + .put(baseConfigurator.getName().toLowerCase(), + new JSONObject() + .put("type", "object") + .put("properties", new JSONObject())); + + } else { + JSONObject attributeSchema = new JSONObject(); + for (Attribute attribute : baseConfigAttributeList) { + if (attribute.multiple) { + generateMultipleAttributeSchema(attributeSchema, attribute); } else { - attributeSchema.put(attribute.getName(), generateNonEnumAttributeObject(attribute)); - schemaConfiguratorObjects - .put(((BaseConfigurator) configuratorObject).getTarget().getSimpleName().toLowerCase(), - new JSONObject() - .put("type", "object") - .put("properties", attributeSchema)); + if (attribute.type.isEnum()) { + generateEnumAttributeSchema(attributeSchema, attribute); + } else { + attributeSchema.put(attribute.getName(), + generateNonEnumAttributeObject(attribute)); + schemaConfiguratorObjects + .put(((BaseConfigurator) configuratorObject).getTarget() + .getSimpleName().toLowerCase(), + new JSONObject() + .put("type", "object") + .put("properties", attributeSchema)); + } } } } - } - } else if (configuratorObject instanceof HeteroDescribableConfigurator) { - HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject; - schemaConfiguratorObjects.put(heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), - generateHeteroDescribableConfigObject(heteroDescribableConfigurator)); + } else if (configuratorObject instanceof HeteroDescribableConfigurator) { + HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject; + schemaConfiguratorObjects + .put( + heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), + generateHeteroDescribableConfigObject(heteroDescribableConfigurator)); } } + schemaObject + .put(rootElementConfigurator.getName(), rootConfiguratorProperties); + } schemaObject.put("properties", schemaConfiguratorObjects); return schemaObject; } - public static String writeJSONSchema() throws Exception{ + public static String writeJSONSchema() throws Exception { JSONObject schemaObject = generateSchema(); Gson gson = new GsonBuilder().setPrettyPrinting().create(); JsonParser jsonParser = new JsonParser(); @@ -91,7 +114,8 @@ public static String writeJSONSchema() throws Exception{ return prettyJsonString; } - private static JSONObject generateHeteroDescribableConfigObject(HeteroDescribableConfigurator heteroDescribableConfiguratorObject) { + private static JSONObject generateHeteroDescribableConfigObject( + HeteroDescribableConfigurator heteroDescribableConfiguratorObject) { Map implementorsMap = heteroDescribableConfiguratorObject .getImplementors(); JSONObject finalHeteroConfiguratorObject = new JSONObject(); @@ -111,7 +135,7 @@ private static JSONObject generateHeteroDescribableConfigObject(HeteroDescribabl finalHeteroConfiguratorObject.put("type", "object"); finalHeteroConfiguratorObject.put("oneOf", oneOfJsonArray); } - return finalHeteroConfiguratorObject; + return finalHeteroConfiguratorObject; } private static JSONObject generateNonEnumAttributeObject(Attribute attribute) { @@ -163,12 +187,13 @@ private static JSONObject generateRootConfiguratorObject() { RootElementConfigurator rootElementConfigurator = i.next(); rootConfiguratorObject .put(rootElementConfigurator.getName(), new JSONObject().put("type", "object")); - System.out.println("root Name" + rootElementConfigurator.getName()); + System.out.println("root Name: " + rootElementConfigurator.getName()); } return rootConfiguratorObject; } - private static void generateMultipleAttributeSchema(JSONObject attributeSchema, Attribute attribute) { + private static void generateMultipleAttributeSchema(JSONObject attributeSchema, + Attribute attribute) { if (attribute.type.getName().equals("java.lang.String")) { attributeSchema.put(attribute.getName(), new JSONObject() @@ -181,7 +206,8 @@ private static void generateMultipleAttributeSchema(JSONObject attributeSchema, } } - private static void generateEnumAttributeSchema(JSONObject attributeSchemaTemplate, Attribute attribute) { + private static void generateEnumAttributeSchema(JSONObject attributeSchemaTemplate, + Attribute attribute) { if (attribute.type.getEnumConstants().length == 0) { attributeSchemaTemplate.put(attribute.getName(), new JSONObject() @@ -228,7 +254,8 @@ public static void storeConfiguratorNames() { if (attribute.type.isEnum()) { System.out.println("This is an enumeration attribute: "); if (attribute.type.getEnumConstants().length != 0) { - System.out.println("Printing Enumeration constants for: " + attribute.getName()); + System.out.println( + "Printing Enumeration constants for: " + attribute.getName()); for (Object obj : attribute.type.getEnumConstants()) { System.out.println("EConstant : " + obj.toString()); } @@ -242,5 +269,21 @@ public static void storeConfiguratorNames() { } } + private static void listElements(Set elements, Set> attributes, + ConfigurationContext context) { + attributes.stream() + .map(Attribute::getType) + .map(context::lookup) + .filter(Objects::nonNull) + .map(c -> c.getConfigurators(context)) + .flatMap(Collection::stream) + .forEach(configurator -> { + if (elements.add(configurator)) { + listElements(elements, ((Configurator) configurator).describe(), + context); // some unexpected type erasure force to cast here + } + }); + } + } From e5bde57c296ca38297421b665345d5a99c4bd7cb Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 27 Sep 2019 01:00:43 +0530 Subject: [PATCH 42/93] Fixed root configurators --- .../java/io/jenkins/plugins/casc/SchemaGeneration.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 04ce3fa88c..62511ab6cc 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -33,17 +33,11 @@ public static JSONObject generateSchema() { * The initial template for the JSON Schema */ JSONObject schemaObject = new JSONObject(schemaTemplateObject.toString()); - /** - * This generates the schema for the root configurators - * Iterates over the root elements and adds them to the schema. - */ - schemaObject.put("properties", generateRootConfiguratorObject()); /** * This generates the schema for the base configurators * Iterates over the base configurators and adds them to the schema. */ JSONObject schemaConfiguratorObjects = new JSONObject(); -// ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); final ConfigurationContext context = new ConfigurationContext(registry); @@ -98,7 +92,7 @@ public static JSONObject generateSchema() { generateHeteroDescribableConfigObject(heteroDescribableConfigurator)); } } - schemaObject + schemaConfiguratorObjects .put(rootElementConfigurator.getName(), rootConfiguratorProperties); } schemaObject.put("properties", schemaConfiguratorObjects); @@ -187,7 +181,6 @@ private static JSONObject generateRootConfiguratorObject() { RootElementConfigurator rootElementConfigurator = i.next(); rootConfiguratorObject .put(rootElementConfigurator.getName(), new JSONObject().put("type", "object")); - System.out.println("root Name: " + rootElementConfigurator.getName()); } return rootConfiguratorObject; } From 1e0a6a2daa2a6add0c1c76cbc4bc085b07767409 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 27 Sep 2019 15:30:48 +0530 Subject: [PATCH 43/93] Added support for the root configurators --- .../plugins/casc/SchemaGeneration.java | 72 ++++--------------- 1 file changed, 12 insertions(+), 60 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 62511ab6cc..55f8b7fd35 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -4,19 +4,12 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.google.gson.JsonParser; -import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry; -import io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; -import io.jenkins.plugins.casc.model.CNode; -import io.jenkins.plugins.casc.model.Mapping; import java.util.ArrayList; -import java.util.Collection; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; -import java.util.Objects; -import java.util.Set; import org.json.JSONArray; import org.json.JSONObject; @@ -38,20 +31,8 @@ public static JSONObject generateSchema() { * Iterates over the base configurators and adds them to the schema. */ JSONObject schemaConfiguratorObjects = new JSONObject(); - DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); - final ConfigurationContext context = new ConfigurationContext(registry); - - for (RootElementConfigurator rootElementConfigurator : RootElementConfigurator.all()) { - Set elements = new LinkedHashSet<>(); - listElements(elements, rootElementConfigurator.describe(), context); - - JSONObject rootConfiguratorProperties = new JSONObject(); - rootConfiguratorProperties.put("type", "object") - .put("additionalProperties", false) - .put("title", "Configuration base for the " + rootElementConfigurator.getName() - + " classifier"); - - for (Object configuratorObject : elements) { + ConfigurationAsCode configurationAsCode = ConfigurationAsCode.get(); + for (Object configuratorObject : configurationAsCode.getConfigurators()) { if (configuratorObject instanceof BaseConfigurator) { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; List baseConfigAttributeList = baseConfigurator.getAttributes(); @@ -87,13 +68,10 @@ public static JSONObject generateSchema() { } else if (configuratorObject instanceof HeteroDescribableConfigurator) { HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject; schemaConfiguratorObjects - .put( - heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), + .put(heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), generateHeteroDescribableConfigObject(heteroDescribableConfigurator)); } - } - schemaConfiguratorObjects - .put(rootElementConfigurator.getName(), rootConfiguratorProperties); + generateRootConfiguratorObject(schemaConfiguratorObjects); } schemaObject.put("properties", schemaConfiguratorObjects); return schemaObject; @@ -172,15 +150,18 @@ private static JSONObject generateNonEnumAttributeObject(Attribute attribute) { return attributeType; } - private static JSONObject generateRootConfiguratorObject() { - JSONObject rootConfiguratorObject = new JSONObject(); + private static JSONObject generateRootConfiguratorObject(JSONObject rootConfiguratorObject) { LinkedHashSet linkedHashSet = new LinkedHashSet<>( ConfigurationAsCode.get().getRootConfigurators()); Iterator i = linkedHashSet.iterator(); while (i.hasNext()) { RootElementConfigurator rootElementConfigurator = i.next(); rootConfiguratorObject - .put(rootElementConfigurator.getName(), new JSONObject().put("type", "object")); + .put(rootElementConfigurator.getName(), new JSONObject().put("type", "object") + .put("additionalProperties", false) + .put("title", "Configuration base for the " + rootElementConfigurator.getName() + + " classifier") + .put("id", "#/definitions/" + rootElementConfigurator.getTarget().getSimpleName().toLowerCase())); } return rootConfiguratorObject; } @@ -201,6 +182,7 @@ private static void generateMultipleAttributeSchema(JSONObject attributeSchema, private static void generateEnumAttributeSchema(JSONObject attributeSchemaTemplate, Attribute attribute) { + if (attribute.type.getEnumConstants().length == 0) { attributeSchemaTemplate.put(attribute.getName(), new JSONObject() @@ -217,27 +199,13 @@ private static void generateEnumAttributeSchema(JSONObject attributeSchemaTempla } } - public static void rootConfigGeneration() throws Exception { - DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); - final ConfigurationContext context = new ConfigurationContext(registry); - context.setMode("JSONSchema"); - for (RootElementConfigurator root : RootElementConfigurator.all()) { - final CNode config = root.describeStructure(root.getTargetComponent(context), context); - final Mapping mapping = config.asMapping(); - final List> entries = new ArrayList<>(mapping.entrySet()); - for (Map.Entry entry : entries) { - System.out.println(entry.getKey()); - } - System.out.println("End of an iteration of configurators"); - } - } - public static void storeConfiguratorNames() { ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { if (configuratorObject instanceof BaseConfigurator) { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; List baseConfigAttributeList = baseConfigurator.getAttributes(); + for (Attribute attribute : baseConfigAttributeList) { if (attribute.multiple) { System.out.println( @@ -262,21 +230,5 @@ public static void storeConfiguratorNames() { } } - private static void listElements(Set elements, Set> attributes, - ConfigurationContext context) { - attributes.stream() - .map(Attribute::getType) - .map(context::lookup) - .filter(Objects::nonNull) - .map(c -> c.getConfigurators(context)) - .flatMap(Collection::stream) - .forEach(configurator -> { - if (elements.add(configurator)) { - listElements(elements, ((Configurator) configurator).describe(), - context); // some unexpected type erasure force to cast here - } - }); - } - } From d0083d89227a442b1aaf43a62e0ce9a25784c185 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 27 Sep 2019 15:38:15 +0530 Subject: [PATCH 44/93] Added mock test --- .../plugins/casc/SchemaGenerationTest.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index cfb42d9e97..2afc878c6d 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -2,6 +2,8 @@ import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import io.jenkins.plugins.casc.misc.Util; +import java.io.BufferedWriter; +import java.io.FileWriter; import java.util.logging.Logger; import org.everit.json.schema.Schema; import org.everit.json.schema.ValidationException; @@ -12,8 +14,7 @@ import org.junit.Test; import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; -import static io.jenkins.plugins.casc.SchemaGeneration.rootConfigGeneration; -import static io.jenkins.plugins.casc.SchemaGeneration.storeConfiguratorNames; +import static io.jenkins.plugins.casc.SchemaGeneration.writeJSONSchema; import static org.junit.Assert.fail; public class SchemaGenerationTest { @@ -144,14 +145,12 @@ public void invalidEmptyToolForBaseConfig() throws Exception { } } + // For testing purposes.To be removed @Test - public void testRootConfiguratorGeneration() throws Exception { - rootConfigGeneration(); - } - - @Test - public void testStoreConfiguratorNames() throws Exception { - storeConfiguratorNames(); + public void writeSchema() throws Exception { + BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json")); + writer.write(writeJSONSchema()); + writer.close(); } } From 2b105a4d49ec455b80f7d14f1cb453dd4ccbca1d Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 28 Sep 2019 22:35:51 +0530 Subject: [PATCH 45/93] Added nesting support for every base configurator and tests for the same --- .../plugins/casc/ConfigurationAsCode.java | 2 +- .../plugins/casc/SchemaGeneration.java | 36 +++++++--- .../plugins/casc/SchemaGenerationTest.java | 71 +------------------ .../plugins/casc/emptyToolBaseConfig.yml | 13 ---- .../plugins/casc/invalidBaseConfig.yml | 6 ++ .../plugins/casc/invalidDataFormat.yml | 3 - .../plugins/casc/validSchemaConfig.yml | 6 +- .../plugins/casc/validToolBaseConfig.yml | 5 -- 8 files changed, 40 insertions(+), 102 deletions(-) delete mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/emptyToolBaseConfig.yml create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml delete mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/invalidDataFormat.yml delete mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/validToolBaseConfig.yml diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java index f5e66d3627..f1781c14d3 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java @@ -749,7 +749,7 @@ public Collection getConfigurators() { * @param attributes siblings to find associated configurators and dive to next tree levels * @param context */ - private void listElements(Set elements, Set> attributes, ConfigurationContext context) { + public void listElements(Set elements, Set> attributes, ConfigurationContext context) { attributes.stream() .map(Attribute::getType) .map(context::lookup) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 55f8b7fd35..83a189d60d 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -4,12 +4,14 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.google.gson.JsonParser; +import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Set; import org.json.JSONArray; import org.json.JSONObject; @@ -18,6 +20,7 @@ public class SchemaGeneration { final static JSONObject schemaTemplateObject = new JSONObject() .put("$schema", "http://json-schema.org/draft-07/schema#") .put("description", "Jenkins Configuration as Code") + .put("additionalProperties", false) .put("type", "object"); public static JSONObject generateSchema() { @@ -30,9 +33,15 @@ public static JSONObject generateSchema() { * This generates the schema for the base configurators * Iterates over the base configurators and adds them to the schema. */ - JSONObject schemaConfiguratorObjects = new JSONObject(); - ConfigurationAsCode configurationAsCode = ConfigurationAsCode.get(); - for (Object configuratorObject : configurationAsCode.getConfigurators()) { + DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry(); + final ConfigurationContext context = new ConfigurationContext(registry); + + JSONObject rootConfiguratorProperties = new JSONObject(); + for(RootElementConfigurator rootElementConfigurator : RootElementConfigurator.all()) { + JSONObject schemaConfiguratorObjects = new JSONObject(); + Set elements = new LinkedHashSet<>(); + ConfigurationAsCode.get().listElements(elements, rootElementConfigurator.describe(), context); + for (Object configuratorObject : elements) { if (configuratorObject instanceof BaseConfigurator) { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; List baseConfigAttributeList = baseConfigurator.getAttributes(); @@ -41,6 +50,7 @@ public static JSONObject generateSchema() { schemaConfiguratorObjects .put(baseConfigurator.getName().toLowerCase(), new JSONObject() + .put("additionalProperties", false) .put("type", "object") .put("properties", new JSONObject())); @@ -59,6 +69,7 @@ public static JSONObject generateSchema() { .put(((BaseConfigurator) configuratorObject).getTarget() .getSimpleName().toLowerCase(), new JSONObject() + .put("additionalProperties", false) .put("type", "object") .put("properties", attributeSchema)); } @@ -68,16 +79,24 @@ public static JSONObject generateSchema() { } else if (configuratorObject instanceof HeteroDescribableConfigurator) { HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject; schemaConfiguratorObjects - .put(heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), + .put( + heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), generateHeteroDescribableConfigObject(heteroDescribableConfigurator)); } - generateRootConfiguratorObject(schemaConfiguratorObjects); + } + + rootConfiguratorProperties.put(rootElementConfigurator.getName(), + new JSONObject().put("type", "object") + .put("additionalProperties", false) + .put("properties", schemaConfiguratorObjects) + .put("title", "Configuration base for the " + rootElementConfigurator.getName() + + " classifier")); } - schemaObject.put("properties", schemaConfiguratorObjects); + schemaObject.put("properties", rootConfiguratorProperties); return schemaObject; } - public static String writeJSONSchema() throws Exception { + public static String writeJSONSchema() { JSONObject schemaObject = generateSchema(); Gson gson = new GsonBuilder().setPrettyPrinting().create(); JsonParser jsonParser = new JsonParser(); @@ -98,6 +117,7 @@ private static JSONObject generateHeteroDescribableConfigObject( while (itr.hasNext()) { Map.Entry entry = itr.next(); JSONObject implementorObject = new JSONObject(); + implementorObject.put("additionalProperties", false); implementorObject.put("properties", new JSONObject().put(entry.getKey(), new JSONObject() .put("$id", "#/definitions/" + entry.getValue().getName()))); @@ -161,7 +181,7 @@ private static JSONObject generateRootConfiguratorObject(JSONObject rootConfigur .put("additionalProperties", false) .put("title", "Configuration base for the " + rootElementConfigurator.getName() + " classifier") - .put("id", "#/definitions/" + rootElementConfigurator.getTarget().getSimpleName().toLowerCase())); + .put("id", "#/definitions/" + rootElementConfigurator.getTarget().getName().toLowerCase())); } return rootConfiguratorObject; } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 2afc878c6d..43eea1780f 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -60,11 +60,11 @@ public void invalidSchemaShouldNotSucceed() throws Exception { } @Test - public void invalidJenkinsDataForBaseConfig() throws Exception { + public void rejectsInvalidBaseConfigurator() throws Exception { JSONObject schemaObject = generateSchema(); JSONObject jsonSchema = new JSONObject( new JSONTokener(schemaObject.toString())); - String yamlStringContents = Util.toStringFromYamlFile(this, "invalidDataFormat.yml"); + String yamlStringContents = Util.toStringFromYamlFile(this, "invalidBaseConfig.yml"); JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); Schema schema = SchemaLoader.load(jsonSchema); @@ -77,73 +77,6 @@ public void invalidJenkinsDataForBaseConfig() throws Exception { } } - @Test - public void validJenkinsDataForBaseConfig() throws Exception { - JSONObject schemaObject = generateSchema(); - JSONObject jsonSchema = new JSONObject( - new JSONTokener(schemaObject.toString())); - String yamlStringContents = Util.toStringFromYamlFile(this, "validDataFormat.yml"); - JSONObject jsonSubject = new JSONObject( - new JSONTokener(Util.convertToJson(yamlStringContents))); - Schema schema = SchemaLoader.load(jsonSchema); - - try { - schema.validate(jsonSubject); - } catch (Exception e) { - fail(e.getMessage()); - } - } - - @Test - public void validToolDataForBaseConfig() throws Exception { - JSONObject schemaObject = generateSchema(); - JSONObject jsonSchema = new JSONObject( - new JSONTokener(schemaObject.toString())); - String yamlStringContents = Util.toStringFromYamlFile(this, "validToolBaseConfig.yml"); - JSONObject jsonSubject = new JSONObject( - new JSONTokener(Util.convertToJson(yamlStringContents))); - Schema schema = SchemaLoader.load(jsonSchema); - - try { - schema.validate(jsonSubject); - } catch (Exception e) { - fail(e.getMessage()); - } - } - - @Test - public void invalidToolDataForBaseConfig() throws Exception { - JSONObject schemaObject = generateSchema(); - JSONObject jsonSchema = new JSONObject( - new JSONTokener(schemaObject.toString())); - String yamlStringContents = Util.toStringFromYamlFile(this, "invalidToolBaseConfig.yml"); - JSONObject jsonSubject = new JSONObject( - new JSONTokener(Util.convertToJson(yamlStringContents))); - Schema schema = SchemaLoader.load(jsonSchema); - try { - schema.validate(jsonSubject); - fail(); - } catch (ValidationException ve) { - ve.printStackTrace(); - } - } - - @Test - public void invalidEmptyToolForBaseConfig() throws Exception { - JSONObject schemaObject = generateSchema(); - JSONObject jsonSchema = new JSONObject( - new JSONTokener(schemaObject.toString())); - String yamlStringContents = Util.toStringFromYamlFile(this, "emptyToolBaseConfig.yml"); - JSONObject jsonSubject = new JSONObject( - new JSONTokener(Util.convertToJson(yamlStringContents))); - Schema schema = SchemaLoader.load(jsonSchema); - try { - schema.validate(jsonSubject); - fail(); - } catch (ValidationException ve) { - ve.printStackTrace(); - } - } // For testing purposes.To be removed @Test diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/emptyToolBaseConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/emptyToolBaseConfig.yml deleted file mode 100644 index 36f10959c3..0000000000 --- a/plugin/src/test/resources/io/jenkins/plugins/casc/emptyToolBaseConfig.yml +++ /dev/null @@ -1,13 +0,0 @@ -tool: - maven: - settingsProvider: - filePath: - path: /usr/share/maven-settings.xml - installations: - - name: maven - home: /usr/share/maven - properties: - - installSourceProperty: - installers: - - mavenInstaller: - id: diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml new file mode 100644 index 0000000000..9e59e7c5d0 --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml @@ -0,0 +1,6 @@ +security: + cli: + enabled: false +invalidBaseConfigurator: "I do nothing" + + diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidDataFormat.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidDataFormat.yml deleted file mode 100644 index 509d9f8f80..0000000000 --- a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidDataFormat.yml +++ /dev/null @@ -1,3 +0,0 @@ -jenkins: - systemMessage: "Hello World" - numExecutors : "Hello world" \ No newline at end of file diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml index aa17b7a17b..c768f6c774 100644 --- a/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml @@ -1,3 +1,3 @@ -jenkins: - systemMessage: "Configured by Configuration as Code plugin" - numExecutors: 3 +security: + cli: + enabled: false diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validToolBaseConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validToolBaseConfig.yml deleted file mode 100644 index b56f28f184..0000000000 --- a/plugin/src/test/resources/io/jenkins/plugins/casc/validToolBaseConfig.yml +++ /dev/null @@ -1,5 +0,0 @@ -tool: - git: - installations: - - name: git - home: /usr/local/bin/git From 79892a2ae4854f837f19dbbe36f77f060bd512d0 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 28 Sep 2019 23:42:57 +0530 Subject: [PATCH 46/93] Removed functions that are not used --- .../jenkins/plugins/casc/SchemaGeneration.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 83a189d60d..a8f43820ed 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -170,22 +170,6 @@ private static JSONObject generateNonEnumAttributeObject(Attribute attribute) { return attributeType; } - private static JSONObject generateRootConfiguratorObject(JSONObject rootConfiguratorObject) { - LinkedHashSet linkedHashSet = new LinkedHashSet<>( - ConfigurationAsCode.get().getRootConfigurators()); - Iterator i = linkedHashSet.iterator(); - while (i.hasNext()) { - RootElementConfigurator rootElementConfigurator = i.next(); - rootConfiguratorObject - .put(rootElementConfigurator.getName(), new JSONObject().put("type", "object") - .put("additionalProperties", false) - .put("title", "Configuration base for the " + rootElementConfigurator.getName() - + " classifier") - .put("id", "#/definitions/" + rootElementConfigurator.getTarget().getName().toLowerCase())); - } - return rootConfiguratorObject; - } - private static void generateMultipleAttributeSchema(JSONObject attributeSchema, Attribute attribute) { if (attribute.type.getName().equals("java.lang.String")) { From 51ae5fd98e998ae8dbb7c3e83ccecea213d6a542 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 30 Sep 2019 19:02:57 +0530 Subject: [PATCH 47/93] Added jenkins base configurator test --- .../plugins/casc/SchemaGenerationTest.java | 18 ++++++++++++++++++ .../configurators/validJenkinsBaseConfig.yml | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validJenkinsBaseConfig.yml diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 43eea1780f..55f8abd3b1 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -77,6 +77,24 @@ public void rejectsInvalidBaseConfigurator() throws Exception { } } + @Test + public void validJenkinsBaseConfigurator() throws Exception { + JSONObject schemaObject = generateSchema(); + JSONObject jsonSchema = new JSONObject( + new JSONTokener(schemaObject.toString())); + String yamlStringContents = Util.toStringFromYamlFile(this, "validJenkinsBaseConfig.yml"); + JSONObject jsonSubject = new JSONObject( + new JSONTokener(Util.convertToJson(yamlStringContents))); + Schema schema = SchemaLoader.load(jsonSchema); + try { + schema.validate(jsonSubject); + LOGGER.warning(failureMessage); + fail(); + } catch (ValidationException ve) { + ve.printStackTrace(); + } + } + // For testing purposes.To be removed @Test diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validJenkinsBaseConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validJenkinsBaseConfig.yml new file mode 100644 index 0000000000..c7dc1b5682 --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validJenkinsBaseConfig.yml @@ -0,0 +1,2 @@ +jenkins: + systemMessage: "Hello world" \ No newline at end of file From cee3cf6459654c013598ab4542bd612264f2677e Mon Sep 17 00:00:00 2001 From: Sladyn Date: Mon, 30 Sep 2019 19:33:01 +0530 Subject: [PATCH 48/93] Added validSelfConfig Test --- .../plugins/casc/SchemaGenerationTest.java | 18 ++++++++++++++++++ .../impl/configurators/validSelfConfig.yml | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validSelfConfig.yml diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 55f8abd3b1..947b161cac 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -95,6 +95,24 @@ public void validJenkinsBaseConfigurator() throws Exception { } } + @Test + public void validSelfConfigurator() throws Exception { + JSONObject schemaObject = generateSchema(); + JSONObject jsonSchema = new JSONObject( + new JSONTokener(schemaObject.toString())); + String yamlStringContents = Util.toStringFromYamlFile(this, "validSelfConfig.yml"); + JSONObject jsonSubject = new JSONObject( + new JSONTokener(Util.convertToJson(yamlStringContents))); + Schema schema = SchemaLoader.load(jsonSchema); + try { + schema.validate(jsonSubject); + LOGGER.warning(failureMessage); + fail(); + } catch (ValidationException ve) { + ve.printStackTrace(); + } + } + // For testing purposes.To be removed @Test diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validSelfConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validSelfConfig.yml new file mode 100644 index 0000000000..fb54218db2 --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validSelfConfig.yml @@ -0,0 +1,5 @@ +configuration-as-code: + version: 1 + deprecated: warn + restricted: warn + unknown: warn \ No newline at end of file From 1f72339072da8be7a4a85096cab8f5eebbe6f991 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 2 Oct 2019 17:53:26 +0530 Subject: [PATCH 49/93] Added validSelfConfig and validJenkinsBaseConfig files --- .../io/jenkins/plugins/casc/validJenkinsBaseConfig.yml | 2 ++ .../resources/io/jenkins/plugins/casc/validSelfConfig.yml | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfig.yml create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfig.yml new file mode 100644 index 0000000000..a143de028f --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfig.yml @@ -0,0 +1,2 @@ +jenkins: + systemMessage: "hi" diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml new file mode 100644 index 0000000000..fb54218db2 --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml @@ -0,0 +1,5 @@ +configuration-as-code: + version: 1 + deprecated: warn + restricted: warn + unknown: warn \ No newline at end of file From 67c3f81403303aaf38672807107810b960750192 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Wed, 2 Oct 2019 15:37:31 +0100 Subject: [PATCH 50/93] Don't fetch the jenkins.model.Jenkins Caused by node linking back to jenkins Doesn't fully work, all base attributes to the jenkins field seem to be missing, i.e. systemMessage, numExecutors --- plugin/schema.json | 0 .../java/io/jenkins/plugins/casc/ConfigurationAsCode.java | 8 ++++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 plugin/schema.json diff --git a/plugin/schema.json b/plugin/schema.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java index f1781c14d3..0664a18352 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java @@ -14,6 +14,7 @@ import hudson.security.ACL; import hudson.security.ACLContext; import hudson.util.FormValidation; +import io.jenkins.plugins.casc.core.JenkinsConfigurator; import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry; import io.jenkins.plugins.casc.model.CNode; import io.jenkins.plugins.casc.model.Mapping; @@ -757,8 +758,11 @@ public void listElements(Set elements, Set> attributes, C .map(c -> c.getConfigurators(context)) .flatMap(Collection::stream) .forEach(configurator -> { - if (elements.add(configurator)) { - listElements(elements, ((Configurator)configurator).describe(), context); // some unexpected type erasure force to cast here + if (!configurator.getTarget().getName().equals("jenkins.model.Jenkins")) { + if (elements.add(configurator)) { + listElements(elements, ((Configurator) configurator).describe(), + context); // some unexpected type erasure force to cast here + } } }); } From dff9199dbd4e2ab8869dcbbbb83bc86a3925e163 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 4 Oct 2019 20:07:00 +0530 Subject: [PATCH 51/93] Resolved merge conflicts and reverted tim's changes --- .../plugins/casc/ConfigurationAsCode.java | 24 ++++++++----------- .../plugins/casc/SchemaGeneration.java | 11 +-------- .../plugins/casc/SchemaGenerationTest.java | 11 +++++---- 3 files changed, 17 insertions(+), 29 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java index 0664a18352..d02146c534 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java @@ -14,7 +14,6 @@ import hudson.security.ACL; import hudson.security.ACLContext; import hudson.util.FormValidation; -import io.jenkins.plugins.casc.core.JenkinsConfigurator; import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry; import io.jenkins.plugins.casc.model.CNode; import io.jenkins.plugins.casc.model.Mapping; @@ -752,19 +751,16 @@ public Collection getConfigurators() { */ public void listElements(Set elements, Set> attributes, ConfigurationContext context) { attributes.stream() - .map(Attribute::getType) - .map(context::lookup) - .filter(Objects::nonNull) - .map(c -> c.getConfigurators(context)) - .flatMap(Collection::stream) - .forEach(configurator -> { - if (!configurator.getTarget().getName().equals("jenkins.model.Jenkins")) { - if (elements.add(configurator)) { - listElements(elements, ((Configurator) configurator).describe(), - context); // some unexpected type erasure force to cast here - } - } - }); + .map(Attribute::getType) + .map(context::lookup) + .filter(Objects::nonNull) + .map(c -> c.getConfigurators(context)) + .flatMap(Collection::stream) + .forEach(configurator -> { + if (elements.add(configurator)) { + listElements(elements, ((Configurator)configurator).describe(), context); // some unexpected type erasure force to cast here + } + }); } // --- UI helper methods diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index a8f43820ed..320e4e3107 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,9 +1,5 @@ package io.jenkins.plugins.casc; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; -import com.google.gson.JsonParser; import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import java.util.ArrayList; @@ -97,12 +93,7 @@ public static JSONObject generateSchema() { } public static String writeJSONSchema() { - JSONObject schemaObject = generateSchema(); - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - JsonParser jsonParser = new JsonParser(); - JsonElement jsonElement = jsonParser.parse(schemaObject.toString()); - String prettyJsonString = gson.toJson(jsonElement); - return prettyJsonString; + return generateSchema().toString(4); } private static JSONObject generateHeteroDescribableConfigObject( diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 947b161cac..8afa9d0939 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -15,6 +15,7 @@ import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; import static io.jenkins.plugins.casc.SchemaGeneration.writeJSONSchema; +import static io.jenkins.plugins.casc.misc.Util.toStringFromYamlFile; import static org.junit.Assert.fail; public class SchemaGenerationTest { @@ -30,7 +31,7 @@ public void validSchemaShouldSucceed() throws Exception { JSONObject schemaObject = generateSchema(); JSONObject jsonSchema = new JSONObject( new JSONTokener(schemaObject.toString())); - String yamlStringContents = Util.toStringFromYamlFile(this, "validSchemaConfig.yml"); + String yamlStringContents = toStringFromYamlFile(this, "validSchemaConfig.yml"); JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); Schema schema = SchemaLoader.load(jsonSchema); @@ -46,7 +47,7 @@ public void invalidSchemaShouldNotSucceed() throws Exception { JSONObject schemaObject = generateSchema(); JSONObject jsonSchema = new JSONObject( new JSONTokener(schemaObject.toString())); - String yamlStringContents = Util.toStringFromYamlFile(this, "invalidSchemaConfig.yml"); + String yamlStringContents = toStringFromYamlFile(this, "invalidSchemaConfig.yml"); JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); Schema schema = SchemaLoader.load(jsonSchema); @@ -64,7 +65,7 @@ public void rejectsInvalidBaseConfigurator() throws Exception { JSONObject schemaObject = generateSchema(); JSONObject jsonSchema = new JSONObject( new JSONTokener(schemaObject.toString())); - String yamlStringContents = Util.toStringFromYamlFile(this, "invalidBaseConfig.yml"); + String yamlStringContents = toStringFromYamlFile(this, "invalidBaseConfig.yml"); JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); Schema schema = SchemaLoader.load(jsonSchema); @@ -82,7 +83,7 @@ public void validJenkinsBaseConfigurator() throws Exception { JSONObject schemaObject = generateSchema(); JSONObject jsonSchema = new JSONObject( new JSONTokener(schemaObject.toString())); - String yamlStringContents = Util.toStringFromYamlFile(this, "validJenkinsBaseConfig.yml"); + String yamlStringContents = toStringFromYamlFile(this, "validJenkinsBaseConfig.yml"); JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); Schema schema = SchemaLoader.load(jsonSchema); @@ -100,7 +101,7 @@ public void validSelfConfigurator() throws Exception { JSONObject schemaObject = generateSchema(); JSONObject jsonSchema = new JSONObject( new JSONTokener(schemaObject.toString())); - String yamlStringContents = Util.toStringFromYamlFile(this, "validSelfConfig.yml"); + String yamlStringContents = toStringFromYamlFile(this, "validSelfConfig.yml"); JSONObject jsonSubject = new JSONObject( new JSONTokener(Util.convertToJson(yamlStringContents))); Schema schema = SchemaLoader.load(jsonSchema); From e992aee3b6bff454b0b040aa0568e2735d547aa2 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Mon, 2 Dec 2019 22:11:43 +0000 Subject: [PATCH 52/93] WIP --- plugin/schema.json | 1235 +++++++++++++++++ .../plugins/casc/ConfigurationContext.java | 6 +- .../plugins/casc/SchemaGeneration.java | 42 + 3 files changed, 1281 insertions(+), 2 deletions(-) diff --git a/plugin/schema.json b/plugin/schema.json index e69de29bb2..b666b46dea 100644 --- a/plugin/schema.json +++ b/plugin/schema.json @@ -0,0 +1,1235 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Jenkins Configuration as Code", + "additionalProperties": false, + "type": "object", + "properties": { + "security": { + "additionalProperties": false, + "type": "object", + "title": "Configuration base for the security classifier", + "properties": { + "downloadSettings": { + "type": "object", + "$id": "#/definitions/jenkins.model.DownloadSettings" + }, + "cli": { + "additionalProperties": false, + "type": "object", + "properties": {"enabled": {"type": "boolean"}} + }, + "queueItemAuthenticator": { + "type": "object", + "$id": "#/definitions/jenkins.security.QueueItemAuthenticatorConfiguration" + }, + "updateSiteWarningsConfiguration": { + "type": "object", + "$id": "#/definitions/jenkins.security.UpdateSiteWarningsConfiguration" + }, + "queueitemauthenticator": { + "oneOf": [{ + "additionalProperties": false, + "properties": {"mock": {"$id": "#/definitions/org.jvnet.hudson.test.MockQueueItemAuthenticator"}} + }], + "type": "object" + }, + "masterKillSwitchConfiguration": { + "type": "object", + "$id": "#/definitions/jenkins.security.s2m.MasterKillSwitchConfiguration" + }, + "masterkillswitchconfiguration": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "remotingCLI": { + "type": "object", + "$id": "#/definitions/jenkins.CLI" + }, + "sSHD": { + "type": "object", + "$id": "#/definitions/org.jenkinsci.main.modules.sshd.SSHD" + }, + "sshd": { + "additionalProperties": false, + "type": "object", + "properties": {"port": {"type": "integer"}} + }, + "enabled": {"type": "boolean"}, + "crumb": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "port": {"type": "integer"}, + "downloadsettings": { + "additionalProperties": false, + "type": "object", + "properties": {"useBrowser": {"type": "boolean"}} + }, + "updatesitewarningsconfiguration": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "useBrowser": {"type": "boolean"} + } + }, + "unclassified": { + "additionalProperties": false, + "type": "object", + "title": "Configuration base for the unclassified classifier", + "properties": { + "jenkinslocationconfiguration": { + "additionalProperties": false, + "type": "object", + "properties": { + "adminAddress": {"type": "string"}, + "url": {"type": "string"} + } + }, + "foo": {"type": "string"}, + "nodeProperties": { + "type": "object", + "$id": "#/definitions/jenkins.model.GlobalNodePropertiesConfiguration" + }, + "cloud": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "bar": {"type": "string"}, + "quietPeriod": { + "type": "object", + "$id": "#/definitions/jenkins.model.GlobalQuietPeriodConfiguration" + }, + "foobar": { + "additionalProperties": false, + "type": "object", + "properties": { + "bar": {"type": "string"}, + "foo": {"type": "string"} + } + }, + "viewstabbar": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "usageStatistics": { + "type": "object", + "$id": "#/definitions/hudson.model.UsageStatistics" + }, + "pollSCM": { + "type": "object", + "$id": "#/definitions/hudson.triggers.SCMTrigger$DescriptorImpl" + }, + "scmretrycount": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "quietperiod": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "cascglobalconfig": { + "additionalProperties": false, + "type": "object", + "properties": {"configurationPath": {"type": "string"}} + }, + "usagestatistics": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "administrativeMonitorsConfiguration": { + "type": "object", + "$id": "#/definitions/jenkins.management.AdministrativeMonitorsConfiguration" + }, + "administrativemonitorsconfiguration": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "masterBuild": { + "type": "object", + "$id": "#/definitions/jenkins.model.MasterBuildConfiguration" + }, + "projectNamingStrategy": { + "type": "object", + "$id": "#/definitions/jenkins.model.GlobalProjectNamingStrategyConfiguration" + }, + "descriptorimpl": { + "additionalProperties": false, + "type": "object", + "properties": {"pollingThreadCount": {"type": "integer"}} + }, + "defaultview": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "myView": { + "type": "object", + "$id": "#/definitions/hudson.views.MyViewsTabBar$GlobalConfigurationImpl" + }, + "fooBarGlobal": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBarGlobalConfiguration" + }, + "foobarglobalconfiguration": { + "additionalProperties": false, + "type": "object", + "properties": {"fooBar": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBar" + }} + }, + "scmRetryCount": { + "type": "object", + "$id": "#/definitions/jenkins.model.GlobalSCMRetryCountConfiguration" + }, + "adminAddress": {"type": "string"}, + "casCGlobalConfig": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.CasCGlobalConfig" + }, + "pollingThreadCount": {"type": "integer"}, + "artifactManager": { + "type": "object", + "$id": "#/definitions/jenkins.model.ArtifactManagerConfiguration" + }, + "artifactmanagerfactory": {}, + "url": {"type": "string"}, + "fooBar": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DescriptorConfiguratorTest$FooBar" + }, + "myview": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "viewsTabBar": { + "type": "object", + "$id": "#/definitions/hudson.views.ViewsTabBar$GlobalConfigurationImpl" + }, + "configurationPath": {"type": "string"}, + "defaultView": { + "type": "object", + "$id": "#/definitions/hudson.views.GlobalDefaultViewConfiguration" + }, + "plugin": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "shell": { + "type": "object", + "$id": "#/definitions/hudson.tasks.Shell$DescriptorImpl" + }, + "foobarone": { + "additionalProperties": false, + "type": "object", + "properties": { + "bar": {"type": "string"}, + "foo": {"type": "string"} + } + }, + "location": { + "type": "object", + "$id": "#/definitions/jenkins.model.JenkinsLocationConfiguration" + }, + "nodeproperties": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "projectnamingstrategy": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "masterbuild": { + "additionalProperties": false, + "type": "object", + "properties": {} + } + } + }, + "configuration-as-code": { + "additionalProperties": false, + "type": "object", + "title": "Configuration base for the configuration-as-code classifier", + "properties": { + "mode": {"type": "string"}, + "restricted": { + "type": "string", + "enum": [ + "reject", + "beta", + "warn" + ] + }, + "deprecated": { + "type": "string", + "enum": [ + "reject", + "warn" + ] + }, + "version": { + "type": "string", + "enum": ["ONE"] + }, + "unknown": { + "type": "string", + "enum": [ + "reject", + "warn" + ] + } + } + }, + "jenkins": { + "additionalProperties": false, + "type": "object", + "title": "Configuration base for the jenkins classifier", + "properties": { + "systemMessage": {"type": "string"}, + "listview": { + "additionalProperties": false, + "type": "object", + "properties": { + "includeRegex": {"type": "string"}, + "columns": { + "type": "object", + "$id": "#/definitions/hudson.views.ListViewColumn" + }, + "recurse": {"type": "boolean"}, + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.model.ViewProperty" + }, + "jobFilters": { + "type": "object", + "$id": "#/definitions/hudson.views.ViewJobFilter" + } + } + }, + "forceExistingJobs": {"type": "boolean"}, + "computerlauncher": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"simpleCommandLauncher": {"$id": "#/definitions/org.jvnet.hudson.test.SimpleCommandLauncher"}} + }, + { + "additionalProperties": false, + "properties": {"jnlp": {"$id": "#/definitions/hudson.slaves.JNLPLauncher"}} + }, + { + "additionalProperties": false, + "properties": {"command": {"$id": "#/definitions/hudson.slaves.CommandLauncher"}} + } + ], + "type": "object" + }, + "upTimeMins": {"type": "integer"}, + "quietPeriod": {"type": "integer"}, + "markupformatter": { + "oneOf": [{ + "additionalProperties": false, + "properties": {"plainText": {"$id": "#/definitions/hudson.markup.EscapedMarkupFormatter"}} + }], + "type": "object" + }, + "password": {"type": "string"}, + "jDKs": { + "type": "object", + "$id": "#/definitions/hudson.model.JDK" + }, + "proxiedViewName": {"type": "string"}, + "retentionstrategy": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"always": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Always"}} + }, + { + "additionalProperties": false, + "properties": {"schedule": {"$id": "#/definitions/hudson.slaves.SimpleScheduledRetentionStrategy"}} + }, + { + "additionalProperties": false, + "properties": {"demand": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Demand"}} + } + ], + "type": "object" + }, + "weather": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "defaultcrumbissuer": { + "additionalProperties": false, + "type": "object", + "properties": {"excludeClientIPFromCrumb": {"type": "boolean"}} + }, + "id": {"type": "string"}, + "scmCheckoutRetryCount": {"type": "integer"}, + "patternprojectnamingstrategy": { + "additionalProperties": false, + "type": "object", + "properties": { + "namePattern": {"type": "string"}, + "description": {"type": "string"}, + "forceExistingJobs": {"type": "boolean"} + } + }, + "maveninstaller": { + "additionalProperties": false, + "type": "object", + "properties": {"id": {"type": "string"}} + }, + "allowsSignup": {"type": "boolean"}, + "nodeproperty": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"toolLocation": {"$id": "#/definitions/hudson.tools.ToolLocationNodeProperty"}} + }, + { + "additionalProperties": false, + "properties": {"envVars": {"$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty"}} + } + ], + "type": "object" + }, + "demand": { + "additionalProperties": false, + "type": "object", + "properties": { + "idleDelay": { + "type": "object", + "$id": "#/definitions/long" + }, + "inDemandDelay": { + "type": "object", + "$id": "#/definitions/long" + } + } + }, + "proxy": { + "type": "object", + "$id": "#/definitions/hudson.ProxyConfiguration" + }, + "node": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"pretendSlave": {"$id": "#/definitions/org.jvnet.hudson.test.PretendSlave"}} + }, + { + "additionalProperties": false, + "properties": {"jenkins": {"$id": "#/definitions/jenkins.model.Jenkins"}} + }, + { + "additionalProperties": false, + "properties": {"dumb": {"$id": "#/definitions/hudson.slaves.DumbSlave"}} + }, + { + "additionalProperties": false, + "properties": {"cloud1PretendSlave": {"$id": "#/definitions/io.jenkins.plugins.casc.core.JenkinsConfiguratorCloudSupportTest$Cloud1PretendSlave"}} + } + ], + "type": "object" + }, + "includeRegex": {"type": "string"}, + "cmd": {"type": "string"}, + "fullcontrolonceloggedinauthorizationstrategy": { + "additionalProperties": false, + "type": "object", + "properties": {"allowAnonymousRead": {"type": "boolean"}} + }, + "status": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "nodeName": {"type": "string"}, + "toolproperty": { + "oneOf": [{ + "additionalProperties": false, + "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}} + }], + "type": "object" + }, + "securityrealm": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacySecurityRealm"}} + }, + { + "additionalProperties": false, + "properties": {"local": {"$id": "#/definitions/hudson.security.HudsonPrivateSecurityRealm"}} + } + ], + "type": "object" + }, + "agentProtocols": {"type": "string"}, + "testUrl": {"type": "string"}, + "enabled": {"type": "boolean"}, + "crumbissuer": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"standard": {"$id": "#/definitions/hudson.security.csrf.DefaultCrumbIssuer"}} + }, + { + "additionalProperties": false, + "properties": {"test": {"$id": "#/definitions/org.jvnet.hudson.test.TestCrumbIssuer"}} + } + ], + "type": "object" + }, + "inDemandDelay": { + "type": "object", + "$id": "#/definitions/long" + }, + "viewstabbar": { + "oneOf": [{ + "additionalProperties": false, + "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultViewsTabBar"}} + }], + "type": "object" + }, + "jenkins": { + "additionalProperties": false, + "type": "object", + "properties": { + "authorizationStrategy": { + "type": "object", + "$id": "#/definitions/hudson.security.AuthorizationStrategy" + }, + "nodeName": {"type": "string"}, + "systemMessage": {"type": "string"}, + "agentProtocols": {"type": "string"}, + "clouds": { + "type": "object", + "$id": "#/definitions/hudson.slaves.Cloud" + }, + "primaryView": { + "type": "object", + "$id": "#/definitions/hudson.model.View" + }, + "nodeProperties": { + "type": "object", + "$id": "#/definitions/hudson.slaves.NodeProperty" + }, + "mode": { + "type": "string", + "enum": [ + "NORMAL", + "EXCLUSIVE" + ] + }, + "numExecutors": {"type": "integer"}, + "quietPeriod": {"type": "integer"}, + "labelString": {"type": "string"}, + "scmCheckoutRetryCount": {"type": "integer"}, + "projectNamingStrategy": { + "type": "object", + "$id": "#/definitions/jenkins.model.ProjectNamingStrategy" + }, + "views": { + "type": "object", + "$id": "#/definitions/hudson.model.View" + }, + "crumbIssuer": { + "type": "object", + "$id": "#/definitions/hudson.security.csrf.CrumbIssuer" + }, + "disableRememberMe": {"type": "boolean"}, + "markupFormatter": { + "type": "object", + "$id": "#/definitions/hudson.markup.MarkupFormatter" + }, + "globalNodeProperties": { + "type": "object", + "$id": "#/definitions/hudson.slaves.NodeProperty" + }, + "securityRealm": { + "type": "object", + "$id": "#/definitions/hudson.security.SecurityRealm" + }, + "slaveAgentPort": {"type": "integer"}, + "myViewsTabBar": { + "type": "object", + "$id": "#/definitions/hudson.views.MyViewsTabBar" + }, + "updateCenter": { + "type": "object", + "$id": "#/definitions/hudson.model.UpdateCenter" + }, + "proxy": { + "type": "object", + "$id": "#/definitions/hudson.ProxyConfiguration" + }, + "viewsTabBar": { + "type": "object", + "$id": "#/definitions/hudson.views.ViewsTabBar" + }, + "nodes": { + "type": "object", + "$id": "#/definitions/hudson.model.Node" + }, + "remotingSecurity": { + "type": "object", + "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule" + } + } + }, + "commandinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "label": {"type": "string"}, + "toolHome": {"type": "string"}, + "command": {"type": "string"} + } + }, + "key": {"type": "string"}, + "noProxyHost": {"type": "string"}, + "laststable": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "idleDelay": { + "type": "object", + "$id": "#/definitions/long" + }, + "hudsonprivatesecurityrealm": { + "additionalProperties": false, + "type": "object", + "properties": { + "captchaSupport": { + "type": "object", + "$id": "#/definitions/hudson.security.captcha.CaptchaSupport" + }, + "allowsSignup": {"type": "boolean"}, + "enableCaptcha": {"type": "boolean"}, + "users": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword" + } + } + }, + "lastfailure": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "jdkinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "id": {"type": "string"}, + "acceptLicense": {"type": "boolean"} + } + }, + "lastsuccess": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "commandlauncher": { + "additionalProperties": false, + "type": "object", + "properties": {"command": {"type": "string"}} + }, + "plaintext": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "startTimeSpec": {"type": "string"}, + "unsecured": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "userId": {"type": "string"}, + "url": {"type": "string"}, + "jdk": { + "additionalProperties": false, + "type": "object", + "properties": { + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.tools.ToolProperty" + }, + "home": {"type": "string"} + } + }, + "allview": { + "additionalProperties": false, + "type": "object", + "properties": { + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.model.ViewProperty" + } + } + }, + "remotingSecurity": { + "type": "object", + "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule" + }, + "projectnamingstrategy": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"standard": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"}} + }, + { + "additionalProperties": false, + "properties": {"pattern": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$PatternProjectNamingStrategy"}} + } + ], + "type": "object" + }, + "standard": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "keepUpWhenActive": {"type": "boolean"}, + "sites": { + "type": "object", + "$id": "#/definitions/hudson.model.UpdateSite" + }, + "cloud": {}, + "mode": { + "type": "string", + "enum": [ + "NORMAL", + "EXCLUSIVE" + ] + }, + "numExecutors": {"type": "integer"}, + "subdir": {"type": "string"}, + "view": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"all": {"$id": "#/definitions/hudson.model.AllView"}} + }, + { + "additionalProperties": false, + "properties": {"proxy": {"$id": "#/definitions/hudson.model.ProxyView"}} + }, + { + "additionalProperties": false, + "properties": {"myView": {"$id": "#/definitions/hudson.model.MyView"}} + }, + { + "additionalProperties": false, + "properties": {"list": {"$id": "#/definitions/hudson.model.ListView"}} + } + ], + "type": "object" + }, + "batchcommandinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "label": {"type": "string"}, + "toolHome": {"type": "string"}, + "command": {"type": "string"} + } + }, + "labelString": {"type": "string"}, + "listviewcolumn": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"jobName": {"$id": "#/definitions/hudson.views.JobColumn"}} + }, + { + "additionalProperties": false, + "properties": {"lastDuration": {"$id": "#/definitions/hudson.views.LastDurationColumn"}} + }, + { + "additionalProperties": false, + "properties": {"buildButton": {"$id": "#/definitions/hudson.views.BuildButtonColumn"}} + }, + { + "additionalProperties": false, + "properties": {"lastStable": {"$id": "#/definitions/hudson.views.LastStableColumn"}} + }, + { + "additionalProperties": false, + "properties": {"weather": {"$id": "#/definitions/hudson.views.WeatherColumn"}} + }, + { + "additionalProperties": false, + "properties": {"lastSuccess": {"$id": "#/definitions/hudson.views.LastSuccessColumn"}} + }, + { + "additionalProperties": false, + "properties": {"lastFailure": {"$id": "#/definitions/hudson.views.LastFailureColumn"}} + }, + { + "additionalProperties": false, + "properties": {"status": {"$id": "#/definitions/hudson.views.StatusColumn"}} + } + ], + "type": "object" + }, + "authorizationstrategy": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacyAuthorizationStrategy"}} + }, + { + "additionalProperties": false, + "properties": {"loggedInUsersCanDoAnything": {"$id": "#/definitions/hudson.security.FullControlOnceLoggedInAuthorizationStrategy"}} + }, + { + "additionalProperties": false, + "properties": {"unsecured": {"$id": "#/definitions/hudson.security.AuthorizationStrategy$Unsecured"}} + } + ], + "type": "object" + }, + "vmargs": {"type": "string"}, + "jobname": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "always": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "namePattern": {"type": "string"}, + "proxyview": { + "additionalProperties": false, + "type": "object", + "properties": { + "proxiedViewName": {"type": "string"}, + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.model.ViewProperty" + } + } + }, + "zipextractioninstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "subdir": {"type": "string"}, + "label": {"type": "string"}, + "url": {"type": "string"} + } + }, + "test": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "rawBuildsDir": {"type": "string"}, + "adminwhitelistrule": { + "additionalProperties": false, + "type": "object", + "properties": {"enabled": {"type": "boolean"}} + }, + "slaveAgentPort": {"type": "integer"}, + "captchasupport": {}, + "updateCenter": { + "type": "object", + "$id": "#/definitions/hudson.model.UpdateCenter" + }, + "users": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword" + }, + "myview": { + "additionalProperties": false, + "type": "object", + "properties": { + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.model.ViewProperty" + } + } + }, + "entry": { + "additionalProperties": false, + "type": "object", + "properties": { + "value": {"type": "string"}, + "key": {"type": "string"} + } + }, + "viewjobfilter": {}, + "port": {"type": "integer"}, + "recurse": {"type": "boolean"}, + "toolinstaller": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}} + } + ], + "type": "object" + }, + "jnlplauncher": { + "additionalProperties": false, + "type": "object", + "properties": { + "vmargs": {"type": "string"}, + "tunnel": {"type": "string"} + } + }, + "name": {"type": "string"}, + "userwithpassword": { + "additionalProperties": false, + "type": "object", + "properties": { + "password": {"type": "string"}, + "id": {"type": "string"} + } + }, + "legacy": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "simplescheduledretentionstrategy": { + "additionalProperties": false, + "type": "object", + "properties": { + "keepUpWhenActive": {"type": "boolean"}, + "startTimeSpec": {"type": "string"}, + "upTimeMins": {"type": "integer"} + } + }, + "description": {"type": "string"}, + "nodeDescription": {"type": "string"}, + "toolHome": {"type": "string"}, + "proxyconfiguration": { + "additionalProperties": false, + "type": "object", + "properties": { + "password": {"type": "string"}, + "port": {"type": "integer"}, + "name": {"type": "string"}, + "testUrl": {"type": "string"}, + "userName": {"type": "string"}, + "noProxyHost": {"type": "string"} + } + }, + "simplecommandlauncher": { + "additionalProperties": false, + "type": "object", + "properties": {"cmd": {"type": "string"}} + }, + "value": {"type": "string"}, + "buildbutton": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "enableCaptcha": {"type": "boolean"}, + "dumbslave": { + "additionalProperties": false, + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "NORMAL", + "EXCLUSIVE" + ] + }, + "nodeName": {"type": "string"}, + "numExecutors": {"type": "integer"}, + "retentionStrategy": { + "type": "object", + "$id": "#/definitions/hudson.slaves.RetentionStrategy" + }, + "labelString": {"type": "string"}, + "name": {"type": "string"}, + "nodeDescription": {"type": "string"}, + "remoteFS": {"type": "string"}, + "userId": {"type": "string"}, + "launcher": { + "type": "object", + "$id": "#/definitions/hudson.slaves.ComputerLauncher" + }, + "nodeProperties": { + "type": "object", + "$id": "#/definitions/hudson.slaves.NodeProperty" + } + } + }, + "disableRememberMe": {"type": "boolean"}, + "toollocation": { + "additionalProperties": false, + "type": "object", + "properties": { + "key": {"type": "string"}, + "home": {"type": "string"} + } + }, + "label": {"type": "string"}, + "allowAnonymousRead": {"type": "boolean"}, + "env": { + "type": "object", + "$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty$Entry" + }, + "userName": {"type": "string"}, + "command": {"type": "string"}, + "home": {"type": "string"}, + "lastduration": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "locations": { + "type": "object", + "$id": "#/definitions/hudson.tools.ToolLocationNodeProperty$ToolLocation" + }, + "myviewstabbar": { + "oneOf": [{ + "additionalProperties": false, + "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultMyViewsTabBar"}} + }], + "type": "object" + }, + "updatesite": { + "additionalProperties": false, + "type": "object", + "properties": { + "id": {"type": "string"}, + "url": {"type": "string"} + } + }, + "acceptLicense": {"type": "boolean"}, + "excludeClientIPFromCrumb": {"type": "boolean"}, + "remoteFS": {"type": "string"}, + "tunnel": {"type": "string"} + } + }, + "tool": { + "additionalProperties": false, + "type": "object", + "title": "Configuration base for the tool classifier", + "properties": { + "toolproperty": { + "oneOf": [{ + "additionalProperties": false, + "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}} + }], + "type": "object" + }, + "standard": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "globalsettingsprovider": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultGlobalSettingsProvider"}} + }, + { + "additionalProperties": false, + "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathGlobalSettingsProvider"}} + } + ], + "type": "object" + }, + "installations": { + "type": "object", + "$id": "#/definitions/hudson.model.JDK" + }, + "globalmavenconfig": { + "additionalProperties": false, + "type": "object", + "properties": { + "settingsProvider": { + "type": "object", + "$id": "#/definitions/jenkins.mvn.SettingsProvider" + }, + "installations": { + "type": "object", + "$id": "#/definitions/hudson.tasks.Maven$MavenInstallation" + }, + "globalSettingsProvider": { + "type": "object", + "$id": "#/definitions/jenkins.mvn.GlobalSettingsProvider" + } + } + }, + "filepathsettingsprovider": { + "additionalProperties": false, + "type": "object", + "properties": {"path": {"type": "string"}} + }, + "toolHome": {"type": "string"}, + "subdir": {"type": "string"}, + "path": {"type": "string"}, + "settingsprovider": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultSettingsProvider"}} + }, + { + "additionalProperties": false, + "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathSettingsProvider"}} + } + ], + "type": "object" + }, + "batchcommandinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "label": {"type": "string"}, + "toolHome": {"type": "string"}, + "command": {"type": "string"} + } + }, + "commandinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "label": {"type": "string"}, + "toolHome": {"type": "string"}, + "command": {"type": "string"} + } + }, + "id": {"type": "string"}, + "zipextractioninstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "subdir": {"type": "string"}, + "label": {"type": "string"}, + "url": {"type": "string"} + } + }, + "jdkinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "id": {"type": "string"}, + "acceptLicense": {"type": "boolean"} + } + }, + "maven": { + "type": "object", + "$id": "#/definitions/jenkins.mvn.GlobalMavenConfig" + }, + "maveninstaller": { + "additionalProperties": false, + "type": "object", + "properties": {"id": {"type": "string"}} + }, + "label": {"type": "string"}, + "url": {"type": "string"}, + "command": {"type": "string"}, + "home": {"type": "string"}, + "jdk": { + "additionalProperties": false, + "type": "object", + "properties": { + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.tools.ToolProperty" + }, + "home": {"type": "string"} + } + }, + "filepathglobalsettingsprovider": { + "additionalProperties": false, + "type": "object", + "properties": {"path": {"type": "string"}} + }, + "maveninstallation": { + "additionalProperties": false, + "type": "object", + "properties": { + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.tools.ToolProperty" + }, + "home": {"type": "string"} + } + }, + "toolinstaller": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}} + } + ], + "type": "object" + }, + "name": {"type": "string"}, + "acceptLicense": {"type": "boolean"} + } + } + } +} \ No newline at end of file diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java index 7a93693e97..1b2f20d9ba 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java @@ -6,6 +6,8 @@ import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.NoExternalUse; import org.kohsuke.stapler.Stapler; /** @@ -30,7 +32,7 @@ public class ConfigurationContext implements ConfiguratorRegistry { private transient final ConfiguratorRegistry registry; - private String mode; + private transient String mode; public ConfigurationContext(ConfiguratorRegistry registry) { this.registry = registry; @@ -64,7 +66,7 @@ public void setUnknown(Unknown unknown) { this.unknown = unknown; } - public String getMode() { + String getMode() { return mode; } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 320e4e3107..9d54d89938 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -1,12 +1,14 @@ package io.jenkins.plugins.casc; import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry; +import io.jenkins.plugins.casc.impl.attributes.DescribableAttribute; import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import org.json.JSONArray; import org.json.JSONObject; @@ -19,6 +21,7 @@ public class SchemaGeneration { .put("additionalProperties", false) .put("type", "object"); + public static JSONObject generateSchema() { /** @@ -78,6 +81,16 @@ public static JSONObject generateSchema() { .put( heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(), generateHeteroDescribableConfigObject(heteroDescribableConfigurator)); + } else if (configuratorObject instanceof Attribute) { + Attribute attribute = (Attribute) configuratorObject; + JSONObject attributeSchema = new JSONObject(); + if (attribute.type.isEnum()) { + generateEnumAttributeSchema(schemaConfiguratorObjects, attribute); + } else { + schemaConfiguratorObjects + .put(attribute.getName(), generateNonEnumAttributeObject(attribute)); + } + } } @@ -121,6 +134,35 @@ private static JSONObject generateHeteroDescribableConfigObject( return finalHeteroConfiguratorObject; } + /** + * Recursive configurators tree walk (DFS) and non-describable able attributes. Collects all + * configurators starting from root ones in {@link ConfigurationAsCode#getConfigurators()} + * + * @param elements linked set (to save order) of visited elements + * @param attributes siblings to find associated configurators and dive to next tree levels + * @param context configuration context + */ + private void listElements(Set elements, Set> attributes, ConfigurationContext context) { + // some unexpected type erasure force to cast here + attributes.stream() + .peek(attribute -> { + if (!(attribute instanceof DescribableAttribute)) { + elements.add(attribute); + } + }) + .map(attribute -> attribute.getType()) + .map(type -> context.lookup(type)) + .filter(obj -> Objects.nonNull(obj)) + .map(c -> c.getConfigurators(context)) + .flatMap(configurators -> configurators.stream()) + .filter(e -> elements.add(e)) + .forEach( + configurator -> listElements(elements, ((Configurator) configurator).describe(), + context) + ); + } + + private static JSONObject generateNonEnumAttributeObject(Attribute attribute) { JSONObject attributeType = new JSONObject(); switch (attribute.type.getName()) { From 5bacdd2e8b8b8a3031accca4cb653980c06f2314 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Mon, 2 Dec 2019 22:58:35 +0000 Subject: [PATCH 53/93] Fix self configurator --- plugin/schema.json | 1107 ++++++++++------- .../plugins/casc/ConfigurationAsCode.java | 2 +- .../plugins/casc/ConfigurationContext.java | 5 + .../plugins/casc/SchemaGeneration.java | 4 +- .../plugins/casc/SchemaGenerationTest.java | 1 - .../jenkins/plugins/casc/validSelfConfig.yml | 2 +- 6 files changed, 682 insertions(+), 439 deletions(-) diff --git a/plugin/schema.json b/plugin/schema.json index dbb891ec2a..9cc6e97d79 100644 --- a/plugin/schema.json +++ b/plugin/schema.json @@ -9,15 +9,22 @@ "type": "object", "title": "Configuration base for the security classifier", "properties": { + "downloadSettings": { + "type": "object", + "$id": "#/definitions/jenkins.model.DownloadSettings" + }, "cli": { "additionalProperties": false, "type": "object", "properties": {"enabled": {"type": "boolean"}} }, - "crumb": { - "additionalProperties": false, + "queueItemAuthenticator": { "type": "object", - "properties": {} + "$id": "#/definitions/jenkins.security.QueueItemAuthenticatorConfiguration" + }, + "updateSiteWarningsConfiguration": { + "type": "object", + "$id": "#/definitions/jenkins.security.UpdateSiteWarningsConfiguration" }, "queueitemauthenticator": { "oneOf": [{ @@ -26,16 +33,35 @@ }], "type": "object" }, + "masterKillSwitchConfiguration": { + "type": "object", + "$id": "#/definitions/jenkins.security.s2m.MasterKillSwitchConfiguration" + }, "masterkillswitchconfiguration": { "additionalProperties": false, "type": "object", "properties": {} }, + "remotingCLI": { + "type": "object", + "$id": "#/definitions/jenkins.CLI" + }, + "sSHD": { + "type": "object", + "$id": "#/definitions/org.jenkinsci.main.modules.sshd.SSHD" + }, "sshd": { "additionalProperties": false, "type": "object", "properties": {"port": {"type": "integer"}} }, + "enabled": {"type": "boolean"}, + "crumb": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "port": {"type": "integer"}, "downloadsettings": { "additionalProperties": false, "type": "object", @@ -45,7 +71,8 @@ "additionalProperties": false, "type": "object", "properties": {} - } + }, + "useBrowser": {"type": "boolean"} } }, "unclassified": { @@ -53,19 +80,6 @@ "type": "object", "title": "Configuration base for the unclassified classifier", "properties": { - "defaultview": { - "additionalProperties": false, - "type": "object", - "properties": {} - }, - "foobarglobalconfiguration": { - "additionalProperties": false, - "type": "object", - "properties": {"fooBar": { - "type": "object", - "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBar" - }} - }, "jenkinslocationconfiguration": { "additionalProperties": false, "type": "object", @@ -74,16 +88,20 @@ "url": {"type": "string"} } }, - "artifactmanagerfactory": {}, + "foo": {"type": "string"}, + "nodeProperties": { + "type": "object", + "$id": "#/definitions/jenkins.model.GlobalNodePropertiesConfiguration" + }, "cloud": { "additionalProperties": false, "type": "object", "properties": {} }, - "myview": { - "additionalProperties": false, + "bar": {"type": "string"}, + "quietPeriod": { "type": "object", - "properties": {} + "$id": "#/definitions/jenkins.model.GlobalQuietPeriodConfiguration" }, "foobar": { "additionalProperties": false, @@ -93,15 +111,18 @@ "foo": {"type": "string"} } }, - "plugin": { + "viewstabbar": { "additionalProperties": false, "type": "object", "properties": {} }, - "viewstabbar": { - "additionalProperties": false, + "usageStatistics": { "type": "object", - "properties": {} + "$id": "#/definitions/hudson.model.UsageStatistics" + }, + "pollSCM": { + "type": "object", + "$id": "#/definitions/hudson.triggers.SCMTrigger$DescriptorImpl" }, "scmretrycount": { "additionalProperties": false, @@ -113,14 +134,6 @@ "type": "object", "properties": {} }, - "foobarone": { - "additionalProperties": false, - "type": "object", - "properties": { - "bar": {"type": "string"}, - "foo": {"type": "string"} - } - }, "cascglobalconfig": { "additionalProperties": false, "type": "object", @@ -131,25 +144,113 @@ "type": "object", "properties": {} }, + "administrativeMonitorsConfiguration": { + "type": "object", + "$id": "#/definitions/jenkins.management.AdministrativeMonitorsConfiguration" + }, "administrativemonitorsconfiguration": { "additionalProperties": false, "type": "object", "properties": {} }, - "nodeproperties": { + "masterBuild": { + "type": "object", + "$id": "#/definitions/jenkins.model.MasterBuildConfiguration" + }, + "projectNamingStrategy": { + "type": "object", + "$id": "#/definitions/jenkins.model.GlobalProjectNamingStrategyConfiguration" + }, + "descriptorimpl": { + "additionalProperties": false, + "type": "object", + "properties": {"pollingThreadCount": {"type": "integer"}} + }, + "defaultview": { "additionalProperties": false, "type": "object", "properties": {} }, - "projectnamingstrategy": { + "myView": { + "type": "object", + "$id": "#/definitions/hudson.views.MyViewsTabBar$GlobalConfigurationImpl" + }, + "fooBarGlobal": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBarGlobalConfiguration" + }, + "foobarglobalconfiguration": { + "additionalProperties": false, + "type": "object", + "properties": {"fooBar": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBar" + }} + }, + "scmRetryCount": { + "type": "object", + "$id": "#/definitions/jenkins.model.GlobalSCMRetryCountConfiguration" + }, + "adminAddress": {"type": "string"}, + "casCGlobalConfig": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.CasCGlobalConfig" + }, + "pollingThreadCount": {"type": "integer"}, + "artifactManager": { + "type": "object", + "$id": "#/definitions/jenkins.model.ArtifactManagerConfiguration" + }, + "artifactmanagerfactory": {}, + "url": {"type": "string"}, + "fooBar": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DescriptorConfiguratorTest$FooBar" + }, + "myview": { "additionalProperties": false, "type": "object", "properties": {} }, - "descriptorimpl": { + "viewsTabBar": { + "type": "object", + "$id": "#/definitions/hudson.views.ViewsTabBar$GlobalConfigurationImpl" + }, + "configurationPath": {"type": "string"}, + "defaultView": { + "type": "object", + "$id": "#/definitions/hudson.views.GlobalDefaultViewConfiguration" + }, + "plugin": { "additionalProperties": false, "type": "object", - "properties": {"pollingThreadCount": {"type": "integer"}} + "properties": {} + }, + "shell": { + "type": "object", + "$id": "#/definitions/hudson.tasks.Shell$DescriptorImpl" + }, + "foobarone": { + "additionalProperties": false, + "type": "object", + "properties": { + "bar": {"type": "string"}, + "foo": {"type": "string"} + } + }, + "location": { + "type": "object", + "$id": "#/definitions/jenkins.model.JenkinsLocationConfiguration" + }, + "nodeproperties": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "projectnamingstrategy": { + "additionalProperties": false, + "type": "object", + "properties": {} }, "masterbuild": { "additionalProperties": false, @@ -162,18 +263,41 @@ "additionalProperties": false, "type": "object", "title": "Configuration base for the configuration-as-code classifier", - "properties": {} + "properties": { + "restricted": { + "type": "string", + "enum": [ + "reject", + "beta", + "warn" + ] + }, + "deprecated": { + "type": "string", + "enum": [ + "reject", + "warn" + ] + }, + "version": { + "type": "string", + "enum": ["1"] + }, + "unknown": { + "type": "string", + "enum": [ + "reject", + "warn" + ] + } + } }, "jenkins": { "additionalProperties": false, "type": "object", "title": "Configuration base for the jenkins classifier", "properties": { - "standard": { - "additionalProperties": false, - "type": "object", - "properties": {} - }, + "systemMessage": {"type": "string"}, "listview": { "additionalProperties": false, "type": "object", @@ -195,6 +319,7 @@ } } }, + "forceExistingJobs": {"type": "boolean"}, "computerlauncher": { "oneOf": [ { @@ -212,37 +337,8 @@ ], "type": "object" }, - "cloud": {}, - "view": { - "oneOf": [ - { - "additionalProperties": false, - "properties": {"all": {"$id": "#/definitions/hudson.model.AllView"}} - }, - { - "additionalProperties": false, - "properties": {"proxy": {"$id": "#/definitions/hudson.model.ProxyView"}} - }, - { - "additionalProperties": false, - "properties": {"myView": {"$id": "#/definitions/hudson.model.MyView"}} - }, - { - "additionalProperties": false, - "properties": {"list": {"$id": "#/definitions/hudson.model.ListView"}} - } - ], - "type": "object" - }, - "batchcommandinstaller": { - "additionalProperties": false, - "type": "object", - "properties": { - "label": {"type": "string"}, - "toolHome": {"type": "string"}, - "command": {"type": "string"} - } - }, + "upTimeMins": {"type": "integer"}, + "quietPeriod": {"type": "integer"}, "markupformatter": { "oneOf": [{ "additionalProperties": false, @@ -250,6 +346,12 @@ }], "type": "object" }, + "password": {"type": "string"}, + "jDKs": { + "type": "object", + "$id": "#/definitions/hudson.model.JDK" + }, + "proxiedViewName": {"type": "string"}, "retentionstrategy": { "oneOf": [ { @@ -277,144 +379,306 @@ "type": "object", "properties": {"excludeClientIPFromCrumb": {"type": "boolean"}} }, - "listviewcolumn": { + "id": {"type": "string"}, + "scmCheckoutRetryCount": {"type": "integer"}, + "patternprojectnamingstrategy": { + "additionalProperties": false, + "type": "object", + "properties": { + "namePattern": {"type": "string"}, + "description": {"type": "string"}, + "forceExistingJobs": {"type": "boolean"} + } + }, + "maveninstaller": { + "additionalProperties": false, + "type": "object", + "properties": {"id": {"type": "string"}} + }, + "allowsSignup": {"type": "boolean"}, + "nodeproperty": { "oneOf": [ { "additionalProperties": false, - "properties": {"jobName": {"$id": "#/definitions/hudson.views.JobColumn"}} + "properties": {"toolLocation": {"$id": "#/definitions/hudson.tools.ToolLocationNodeProperty"}} }, { "additionalProperties": false, - "properties": {"lastDuration": {"$id": "#/definitions/hudson.views.LastDurationColumn"}} + "properties": {"envVars": {"$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty"}} + } + ], + "type": "object" + }, + "demand": { + "additionalProperties": false, + "type": "object", + "properties": { + "idleDelay": { + "type": "object", + "$id": "#/definitions/long" }, + "inDemandDelay": { + "type": "object", + "$id": "#/definitions/long" + } + } + }, + "proxy": { + "type": "object", + "$id": "#/definitions/hudson.ProxyConfiguration" + }, + "node": { + "oneOf": [ { "additionalProperties": false, - "properties": {"buildButton": {"$id": "#/definitions/hudson.views.BuildButtonColumn"}} + "properties": {"pretendSlave": {"$id": "#/definitions/org.jvnet.hudson.test.PretendSlave"}} }, { "additionalProperties": false, - "properties": {"lastStable": {"$id": "#/definitions/hudson.views.LastStableColumn"}} + "properties": {"jenkins": {"$id": "#/definitions/jenkins.model.Jenkins"}} }, { "additionalProperties": false, - "properties": {"weather": {"$id": "#/definitions/hudson.views.WeatherColumn"}} + "properties": {"dumb": {"$id": "#/definitions/hudson.slaves.DumbSlave"}} }, { "additionalProperties": false, - "properties": {"lastSuccess": {"$id": "#/definitions/hudson.views.LastSuccessColumn"}} - }, + "properties": {"cloud1PretendSlave": {"$id": "#/definitions/io.jenkins.plugins.casc.core.JenkinsConfiguratorCloudSupportTest$Cloud1PretendSlave"}} + } + ], + "type": "object" + }, + "includeRegex": {"type": "string"}, + "cmd": {"type": "string"}, + "fullcontrolonceloggedinauthorizationstrategy": { + "additionalProperties": false, + "type": "object", + "properties": {"allowAnonymousRead": {"type": "boolean"}} + }, + "status": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "nodeName": {"type": "string"}, + "toolproperty": { + "oneOf": [{ + "additionalProperties": false, + "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}} + }], + "type": "object" + }, + "securityrealm": { + "oneOf": [ { "additionalProperties": false, - "properties": {"lastFailure": {"$id": "#/definitions/hudson.views.LastFailureColumn"}} + "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacySecurityRealm"}} }, { "additionalProperties": false, - "properties": {"status": {"$id": "#/definitions/hudson.views.StatusColumn"}} + "properties": {"local": {"$id": "#/definitions/hudson.security.HudsonPrivateSecurityRealm"}} } ], "type": "object" }, - "authorizationstrategy": { + "agentProtocols": {"type": "string"}, + "testUrl": {"type": "string"}, + "enabled": {"type": "boolean"}, + "crumbissuer": { "oneOf": [ { "additionalProperties": false, - "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacyAuthorizationStrategy"}} - }, - { - "additionalProperties": false, - "properties": {"loggedInUsersCanDoAnything": {"$id": "#/definitions/hudson.security.FullControlOnceLoggedInAuthorizationStrategy"}} + "properties": {"standard": {"$id": "#/definitions/hudson.security.csrf.DefaultCrumbIssuer"}} }, { "additionalProperties": false, - "properties": {"unsecured": {"$id": "#/definitions/hudson.security.AuthorizationStrategy$Unsecured"}} + "properties": {"test": {"$id": "#/definitions/org.jvnet.hudson.test.TestCrumbIssuer"}} } ], "type": "object" }, - "patternprojectnamingstrategy": { - "additionalProperties": false, + "inDemandDelay": { "type": "object", - "properties": { - "namePattern": {"type": "string"}, - "description": {"type": "string"}, - "forceExistingJobs": {"type": "boolean"} - } + "$id": "#/definitions/long" }, - "jobname": { + "viewstabbar": { + "oneOf": [{ + "additionalProperties": false, + "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultViewsTabBar"}} + }], + "type": "object" + }, + "jenkins": { "additionalProperties": false, "type": "object", - "properties": {} + "properties": { + "authorizationStrategy": { + "type": "object", + "$id": "#/definitions/hudson.security.AuthorizationStrategy" + }, + "nodeName": {"type": "string"}, + "systemMessage": {"type": "string"}, + "agentProtocols": {"type": "string"}, + "clouds": { + "type": "object", + "$id": "#/definitions/hudson.slaves.Cloud" + }, + "primaryView": { + "type": "object", + "$id": "#/definitions/hudson.model.View" + }, + "nodeProperties": { + "type": "object", + "$id": "#/definitions/hudson.slaves.NodeProperty" + }, + "mode": { + "type": "string", + "enum": [ + "NORMAL", + "EXCLUSIVE" + ] + }, + "numExecutors": {"type": "integer"}, + "quietPeriod": {"type": "integer"}, + "labelString": {"type": "string"}, + "scmCheckoutRetryCount": {"type": "integer"}, + "projectNamingStrategy": { + "type": "object", + "$id": "#/definitions/jenkins.model.ProjectNamingStrategy" + }, + "views": { + "type": "object", + "$id": "#/definitions/hudson.model.View" + }, + "crumbIssuer": { + "type": "object", + "$id": "#/definitions/hudson.security.csrf.CrumbIssuer" + }, + "disableRememberMe": {"type": "boolean"}, + "markupFormatter": { + "type": "object", + "$id": "#/definitions/hudson.markup.MarkupFormatter" + }, + "globalNodeProperties": { + "type": "object", + "$id": "#/definitions/hudson.slaves.NodeProperty" + }, + "securityRealm": { + "type": "object", + "$id": "#/definitions/hudson.security.SecurityRealm" + }, + "slaveAgentPort": {"type": "integer"}, + "myViewsTabBar": { + "type": "object", + "$id": "#/definitions/hudson.views.MyViewsTabBar" + }, + "updateCenter": { + "type": "object", + "$id": "#/definitions/hudson.model.UpdateCenter" + }, + "proxy": { + "type": "object", + "$id": "#/definitions/hudson.ProxyConfiguration" + }, + "viewsTabBar": { + "type": "object", + "$id": "#/definitions/hudson.views.ViewsTabBar" + }, + "nodes": { + "type": "object", + "$id": "#/definitions/hudson.model.Node" + }, + "remotingSecurity": { + "type": "object", + "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule" + } + } }, - "always": { + "commandinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "label": {"type": "string"}, + "toolHome": {"type": "string"}, + "command": {"type": "string"} + } + }, + "key": {"type": "string"}, + "noProxyHost": {"type": "string"}, + "laststable": { "additionalProperties": false, "type": "object", "properties": {} }, - "proxyview": { + "idleDelay": { + "type": "object", + "$id": "#/definitions/long" + }, + "hudsonprivatesecurityrealm": { "additionalProperties": false, "type": "object", "properties": { - "proxiedViewName": {"type": "string"}, - "name": {"type": "string"}, - "properties": { + "captchaSupport": { "type": "object", - "$id": "#/definitions/hudson.model.ViewProperty" + "$id": "#/definitions/hudson.security.captcha.CaptchaSupport" + }, + "allowsSignup": {"type": "boolean"}, + "enableCaptcha": {"type": "boolean"}, + "users": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword" } } }, - "zipextractioninstaller": { + "lastfailure": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "jdkinstaller": { "additionalProperties": false, "type": "object", "properties": { - "subdir": {"type": "string"}, - "label": {"type": "string"}, - "url": {"type": "string"} + "id": {"type": "string"}, + "acceptLicense": {"type": "boolean"} } }, - "test": { + "lastsuccess": { "additionalProperties": false, "type": "object", "properties": {} }, - "adminwhitelistrule": { + "commandlauncher": { "additionalProperties": false, "type": "object", - "properties": {"enabled": {"type": "boolean"}} + "properties": {"command": {"type": "string"}} }, - "maveninstaller": { + "plaintext": { "additionalProperties": false, "type": "object", - "properties": {"id": {"type": "string"}} + "properties": {} }, - "captchasupport": {}, - "nodeproperty": { - "oneOf": [ - { - "additionalProperties": false, - "properties": {"toolLocation": {"$id": "#/definitions/hudson.tools.ToolLocationNodeProperty"}} - }, - { - "additionalProperties": false, - "properties": {"envVars": {"$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty"}} - } - ], - "type": "object" + "startTimeSpec": {"type": "string"}, + "unsecured": { + "additionalProperties": false, + "type": "object", + "properties": {} }, - "demand": { + "userId": {"type": "string"}, + "url": {"type": "string"}, + "jdk": { "additionalProperties": false, "type": "object", "properties": { - "idleDelay": { + "name": {"type": "string"}, + "properties": { "type": "object", - "$id": "#/definitions/long" + "$id": "#/definitions/hudson.tools.ToolProperty" }, - "inDemandDelay": { - "type": "object", - "$id": "#/definitions/long" - } + "home": {"type": "string"} } }, - "myview": { + "allview": { "additionalProperties": false, "type": "object", "properties": { @@ -425,258 +689,287 @@ } } }, - "entry": { + "remotingSecurity": { + "type": "object", + "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule" + }, + "projectnamingstrategy": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"standard": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"}} + }, + { + "additionalProperties": false, + "properties": {"pattern": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$PatternProjectNamingStrategy"}} + } + ], + "type": "object" + }, + "standard": { "additionalProperties": false, "type": "object", - "properties": { - "value": {"type": "string"}, - "key": {"type": "string"} - } + "properties": {} }, - "node": { + "keepUpWhenActive": {"type": "boolean"}, + "sites": { + "type": "object", + "$id": "#/definitions/hudson.model.UpdateSite" + }, + "cloud": {}, + "mode": { + "type": "string", + "enum": [ + "NORMAL", + "EXCLUSIVE" + ] + }, + "numExecutors": {"type": "integer"}, + "subdir": {"type": "string"}, + "view": { "oneOf": [ { "additionalProperties": false, - "properties": {"pretendSlave": {"$id": "#/definitions/org.jvnet.hudson.test.PretendSlave"}} + "properties": {"all": {"$id": "#/definitions/hudson.model.AllView"}} }, { "additionalProperties": false, - "properties": {"jenkins": {"$id": "#/definitions/jenkins.model.Jenkins"}} + "properties": {"proxy": {"$id": "#/definitions/hudson.model.ProxyView"}} }, { "additionalProperties": false, - "properties": {"dumb": {"$id": "#/definitions/hudson.slaves.DumbSlave"}} + "properties": {"myView": {"$id": "#/definitions/hudson.model.MyView"}} }, { "additionalProperties": false, - "properties": {"cloud1PretendSlave": {"$id": "#/definitions/io.jenkins.plugins.casc.core.JenkinsConfiguratorCloudSupportTest$Cloud1PretendSlave"}} + "properties": {"list": {"$id": "#/definitions/hudson.model.ListView"}} } ], "type": "object" }, - "viewjobfilter": {}, - "toolinstaller": { + "batchcommandinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "label": {"type": "string"}, + "toolHome": {"type": "string"}, + "command": {"type": "string"} + } + }, + "labelString": {"type": "string"}, + "listviewcolumn": { "oneOf": [ { "additionalProperties": false, - "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}} + "properties": {"jobName": {"$id": "#/definitions/hudson.views.JobColumn"}} }, { "additionalProperties": false, - "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}} + "properties": {"lastDuration": {"$id": "#/definitions/hudson.views.LastDurationColumn"}} }, { "additionalProperties": false, - "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}} + "properties": {"buildButton": {"$id": "#/definitions/hudson.views.BuildButtonColumn"}} }, { "additionalProperties": false, - "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}} + "properties": {"lastStable": {"$id": "#/definitions/hudson.views.LastStableColumn"}} }, { "additionalProperties": false, - "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}} + "properties": {"weather": {"$id": "#/definitions/hudson.views.WeatherColumn"}} + }, + { + "additionalProperties": false, + "properties": {"lastSuccess": {"$id": "#/definitions/hudson.views.LastSuccessColumn"}} + }, + { + "additionalProperties": false, + "properties": {"lastFailure": {"$id": "#/definitions/hudson.views.LastFailureColumn"}} + }, + { + "additionalProperties": false, + "properties": {"status": {"$id": "#/definitions/hudson.views.StatusColumn"}} } ], "type": "object" }, - "jnlplauncher": { - "additionalProperties": false, - "type": "object", - "properties": { - "vmargs": {"type": "string"}, - "tunnel": {"type": "string"} - } + "authorizationstrategy": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacyAuthorizationStrategy"}} + }, + { + "additionalProperties": false, + "properties": {"loggedInUsersCanDoAnything": {"$id": "#/definitions/hudson.security.FullControlOnceLoggedInAuthorizationStrategy"}} + }, + { + "additionalProperties": false, + "properties": {"unsecured": {"$id": "#/definitions/hudson.security.AuthorizationStrategy$Unsecured"}} + } + ], + "type": "object" }, - "fullcontrolonceloggedinauthorizationstrategy": { + "vmargs": {"type": "string"}, + "jobname": { "additionalProperties": false, "type": "object", - "properties": {"allowAnonymousRead": {"type": "boolean"}} + "properties": {} }, - "status": { + "always": { "additionalProperties": false, "type": "object", "properties": {} }, - "userwithpassword": { + "namePattern": {"type": "string"}, + "proxyview": { "additionalProperties": false, "type": "object", "properties": { - "password": {"type": "string"}, - "id": {"type": "string"} + "proxiedViewName": {"type": "string"}, + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.model.ViewProperty" + } } }, - "toolproperty": { - "oneOf": [{ - "additionalProperties": false, - "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}} - }], - "type": "object" - }, - "legacy": { + "zipextractioninstaller": { "additionalProperties": false, "type": "object", - "properties": {} - }, - "securityrealm": { - "oneOf": [ - { - "additionalProperties": false, - "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacySecurityRealm"}} - }, - { - "additionalProperties": false, - "properties": {"local": {"$id": "#/definitions/hudson.security.HudsonPrivateSecurityRealm"}} - } - ], - "type": "object" + "properties": { + "subdir": {"type": "string"}, + "label": {"type": "string"}, + "url": {"type": "string"} + } }, - "simplescheduledretentionstrategy": { + "test": { "additionalProperties": false, "type": "object", - "properties": { - "keepUpWhenActive": {"type": "boolean"}, - "startTimeSpec": {"type": "string"}, - "upTimeMins": {"type": "integer"} - } + "properties": {} }, - "proxyconfiguration": { + "rawBuildsDir": {"type": "string"}, + "adminwhitelistrule": { "additionalProperties": false, "type": "object", - "properties": { - "password": {"type": "string"}, - "port": {"type": "integer"}, - "name": {"type": "string"}, - "testUrl": {"type": "string"}, - "userName": {"type": "string"}, - "noProxyHost": {"type": "string"} - } + "properties": {"enabled": {"type": "boolean"}} }, - "crumbissuer": { - "oneOf": [ - { - "additionalProperties": false, - "properties": {"standard": {"$id": "#/definitions/hudson.security.csrf.DefaultCrumbIssuer"}} - }, - { - "additionalProperties": false, - "properties": {"test": {"$id": "#/definitions/org.jvnet.hudson.test.TestCrumbIssuer"}} - } - ], - "type": "object" + "slaveAgentPort": {"type": "integer"}, + "captchasupport": {}, + "updateCenter": { + "type": "object", + "$id": "#/definitions/hudson.model.UpdateCenter" }, - "viewstabbar": { - "oneOf": [{ - "additionalProperties": false, - "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultViewsTabBar"}} - }], - "type": "object" + "users": { + "type": "object", + "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword" }, - "simplecommandlauncher": { + "myview": { "additionalProperties": false, "type": "object", - "properties": {"cmd": {"type": "string"}} + "properties": { + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.model.ViewProperty" + } + } }, - "jenkins": { + "entry": { "additionalProperties": false, "type": "object", "properties": { - "authorizationStrategy": { - "type": "object", - "$id": "#/definitions/hudson.security.AuthorizationStrategy" - }, - "nodeName": {"type": "string"}, - "systemMessage": {"type": "string"}, - "agentProtocols": {"type": "string"}, - "clouds": { - "type": "object", - "$id": "#/definitions/hudson.slaves.Cloud" - }, - "primaryView": { - "type": "object", - "$id": "#/definitions/hudson.model.View" - }, - "nodeProperties": { - "type": "object", - "$id": "#/definitions/hudson.slaves.NodeProperty" - }, - "mode": { - "type": "string", - "enum": [ - "NORMAL", - "EXCLUSIVE" - ] - }, - "numExecutors": {"type": "integer"}, - "quietPeriod": {"type": "integer"}, - "labelString": {"type": "string"}, - "scmCheckoutRetryCount": {"type": "integer"}, - "projectNamingStrategy": { - "type": "object", - "$id": "#/definitions/jenkins.model.ProjectNamingStrategy" - }, - "views": { - "type": "object", - "$id": "#/definitions/hudson.model.View" - }, - "crumbIssuer": { - "type": "object", - "$id": "#/definitions/hudson.security.csrf.CrumbIssuer" - }, - "disableRememberMe": {"type": "boolean"}, - "markupFormatter": { - "type": "object", - "$id": "#/definitions/hudson.markup.MarkupFormatter" - }, - "globalNodeProperties": { - "type": "object", - "$id": "#/definitions/hudson.slaves.NodeProperty" - }, - "securityRealm": { - "type": "object", - "$id": "#/definitions/hudson.security.SecurityRealm" - }, - "slaveAgentPort": {"type": "integer"}, - "myViewsTabBar": { - "type": "object", - "$id": "#/definitions/hudson.views.MyViewsTabBar" - }, - "updateCenter": { - "type": "object", - "$id": "#/definitions/hudson.model.UpdateCenter" + "value": {"type": "string"}, + "key": {"type": "string"} + } + }, + "viewjobfilter": {}, + "port": {"type": "integer"}, + "recurse": {"type": "boolean"}, + "toolinstaller": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}} }, - "proxy": { - "type": "object", - "$id": "#/definitions/hudson.ProxyConfiguration" + { + "additionalProperties": false, + "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}} }, - "viewsTabBar": { - "type": "object", - "$id": "#/definitions/hudson.views.ViewsTabBar" + { + "additionalProperties": false, + "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}} }, - "nodes": { - "type": "object", - "$id": "#/definitions/hudson.model.Node" + { + "additionalProperties": false, + "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}} }, - "remotingSecurity": { - "type": "object", - "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule" + { + "additionalProperties": false, + "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}} } + ], + "type": "object" + }, + "jnlplauncher": { + "additionalProperties": false, + "type": "object", + "properties": { + "vmargs": {"type": "string"}, + "tunnel": {"type": "string"} } }, - "commandinstaller": { + "name": {"type": "string"}, + "userwithpassword": { "additionalProperties": false, "type": "object", "properties": { - "label": {"type": "string"}, - "toolHome": {"type": "string"}, - "command": {"type": "string"} + "password": {"type": "string"}, + "id": {"type": "string"} + } + }, + "legacy": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "simplescheduledretentionstrategy": { + "additionalProperties": false, + "type": "object", + "properties": { + "keepUpWhenActive": {"type": "boolean"}, + "startTimeSpec": {"type": "string"}, + "upTimeMins": {"type": "integer"} + } + }, + "description": {"type": "string"}, + "nodeDescription": {"type": "string"}, + "toolHome": {"type": "string"}, + "proxyconfiguration": { + "additionalProperties": false, + "type": "object", + "properties": { + "password": {"type": "string"}, + "port": {"type": "integer"}, + "name": {"type": "string"}, + "testUrl": {"type": "string"}, + "userName": {"type": "string"}, + "noProxyHost": {"type": "string"} } }, + "simplecommandlauncher": { + "additionalProperties": false, + "type": "object", + "properties": {"cmd": {"type": "string"}} + }, + "value": {"type": "string"}, "buildbutton": { "additionalProperties": false, "type": "object", "properties": {} }, + "enableCaptcha": {"type": "boolean"}, "dumbslave": { "additionalProperties": false, "type": "object", @@ -709,11 +1002,7 @@ } } }, - "laststable": { - "additionalProperties": false, - "type": "object", - "properties": {} - }, + "disableRememberMe": {"type": "boolean"}, "toollocation": { "additionalProperties": false, "type": "object", @@ -722,82 +1011,23 @@ "home": {"type": "string"} } }, - "hudsonprivatesecurityrealm": { - "additionalProperties": false, - "type": "object", - "properties": { - "captchaSupport": { - "type": "object", - "$id": "#/definitions/hudson.security.captcha.CaptchaSupport" - }, - "allowsSignup": {"type": "boolean"}, - "enableCaptcha": {"type": "boolean"}, - "users": { - "type": "object", - "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword" - } - } - }, - "lastfailure": { - "additionalProperties": false, - "type": "object", - "properties": {} - }, - "jdkinstaller": { - "additionalProperties": false, - "type": "object", - "properties": { - "id": {"type": "string"}, - "acceptLicense": {"type": "boolean"} - } - }, - "lastsuccess": { - "additionalProperties": false, - "type": "object", - "properties": {} - }, - "commandlauncher": { - "additionalProperties": false, - "type": "object", - "properties": {"command": {"type": "string"}} - }, - "plaintext": { - "additionalProperties": false, + "label": {"type": "string"}, + "allowAnonymousRead": {"type": "boolean"}, + "env": { "type": "object", - "properties": {} + "$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty$Entry" }, - "unsecured": { + "userName": {"type": "string"}, + "command": {"type": "string"}, + "home": {"type": "string"}, + "lastduration": { "additionalProperties": false, "type": "object", "properties": {} }, - "jdk": { - "additionalProperties": false, - "type": "object", - "properties": { - "name": {"type": "string"}, - "properties": { - "type": "object", - "$id": "#/definitions/hudson.tools.ToolProperty" - }, - "home": {"type": "string"} - } - }, - "allview": { - "additionalProperties": false, - "type": "object", - "properties": { - "name": {"type": "string"}, - "properties": { - "type": "object", - "$id": "#/definitions/hudson.model.ViewProperty" - } - } - }, - "lastduration": { - "additionalProperties": false, + "locations": { "type": "object", - "properties": {} + "$id": "#/definitions/hudson.tools.ToolLocationNodeProperty$ToolLocation" }, "myviewstabbar": { "oneOf": [{ @@ -814,19 +1044,10 @@ "url": {"type": "string"} } }, - "projectnamingstrategy": { - "oneOf": [ - { - "additionalProperties": false, - "properties": {"standard": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"}} - }, - { - "additionalProperties": false, - "properties": {"pattern": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$PatternProjectNamingStrategy"}} - } - ], - "type": "object" - } + "acceptLicense": {"type": "boolean"}, + "excludeClientIPFromCrumb": {"type": "boolean"}, + "remoteFS": {"type": "string"}, + "tunnel": {"type": "string"} } }, "tool": { @@ -846,23 +1067,6 @@ "type": "object", "properties": {} }, - "zipextractioninstaller": { - "additionalProperties": false, - "type": "object", - "properties": { - "subdir": {"type": "string"}, - "label": {"type": "string"}, - "url": {"type": "string"} - } - }, - "jdkinstaller": { - "additionalProperties": false, - "type": "object", - "properties": { - "id": {"type": "string"}, - "acceptLicense": {"type": "boolean"} - } - }, "globalsettingsprovider": { "oneOf": [ { @@ -876,10 +1080,9 @@ ], "type": "object" }, - "maveninstaller": { - "additionalProperties": false, + "installations": { "type": "object", - "properties": {"id": {"type": "string"}} + "$id": "#/definitions/hudson.model.JDK" }, "globalmavenconfig": { "additionalProperties": false, @@ -904,18 +1107,9 @@ "type": "object", "properties": {"path": {"type": "string"}} }, - "jdk": { - "additionalProperties": false, - "type": "object", - "properties": { - "name": {"type": "string"}, - "properties": { - "type": "object", - "$id": "#/definitions/hudson.tools.ToolProperty" - }, - "home": {"type": "string"} - } - }, + "toolHome": {"type": "string"}, + "subdir": {"type": "string"}, + "path": {"type": "string"}, "settingsprovider": { "oneOf": [ { @@ -929,12 +1123,16 @@ ], "type": "object" }, - "filepathglobalsettingsprovider": { + "batchcommandinstaller": { "additionalProperties": false, "type": "object", - "properties": {"path": {"type": "string"}} + "properties": { + "label": {"type": "string"}, + "toolHome": {"type": "string"}, + "command": {"type": "string"} + } }, - "batchcommandinstaller": { + "commandinstaller": { "additionalProperties": false, "type": "object", "properties": { @@ -943,6 +1141,54 @@ "command": {"type": "string"} } }, + "id": {"type": "string"}, + "zipextractioninstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "subdir": {"type": "string"}, + "label": {"type": "string"}, + "url": {"type": "string"} + } + }, + "jdkinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "id": {"type": "string"}, + "acceptLicense": {"type": "boolean"} + } + }, + "maven": { + "type": "object", + "$id": "#/definitions/jenkins.mvn.GlobalMavenConfig" + }, + "maveninstaller": { + "additionalProperties": false, + "type": "object", + "properties": {"id": {"type": "string"}} + }, + "label": {"type": "string"}, + "url": {"type": "string"}, + "command": {"type": "string"}, + "home": {"type": "string"}, + "jdk": { + "additionalProperties": false, + "type": "object", + "properties": { + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.tools.ToolProperty" + }, + "home": {"type": "string"} + } + }, + "filepathglobalsettingsprovider": { + "additionalProperties": false, + "type": "object", + "properties": {"path": {"type": "string"}} + }, "maveninstallation": { "additionalProperties": false, "type": "object", @@ -980,15 +1226,8 @@ ], "type": "object" }, - "commandinstaller": { - "additionalProperties": false, - "type": "object", - "properties": { - "label": {"type": "string"}, - "toolHome": {"type": "string"}, - "command": {"type": "string"} - } - } + "name": {"type": "string"}, + "acceptLicense": {"type": "boolean"} } } } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java index 0ea6ee218a..f4be422519 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java @@ -779,7 +779,7 @@ public Collection getConfigurators() { * @param attributes siblings to find associated configurators and dive to next tree levels * @param context */ - public void listElements(Set elements, Set> attributes, ConfigurationContext context) { + private void listElements(Set elements, Set> attributes, ConfigurationContext context) { attributes.stream() .map(Attribute::getType) .map(context::lookup) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java index 1b2f20d9ba..ec08ca5643 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java @@ -136,6 +136,11 @@ public String value() { public boolean isAtLeast(Version version) { return this.ordinal() >= version.ordinal(); } + + @Override + public String toString() { + return value; + } } static { diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index ca025856ce..6f7a66fd9c 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -39,7 +39,7 @@ public static JSONObject generateSchema() { for(RootElementConfigurator rootElementConfigurator : RootElementConfigurator.all()) { JSONObject schemaConfiguratorObjects = new JSONObject(); Set elements = new LinkedHashSet<>(); - ConfigurationAsCode.get().listElements(elements, rootElementConfigurator.describe(), context); + listElements(elements, rootElementConfigurator.describe(), context); for (Object configuratorObject : elements) { if (configuratorObject instanceof BaseConfigurator) { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; @@ -142,7 +142,7 @@ private static JSONObject generateHeteroDescribableConfigObject( * @param attributes siblings to find associated configurators and dive to next tree levels * @param context configuration context */ - private void listElements(Set elements, Set> attributes, ConfigurationContext context) { + private static void listElements(Set elements, Set> attributes, ConfigurationContext context) { // some unexpected type erasure force to cast here attributes.stream() .peek(attribute -> { diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 59d97430ae..0c7d1f28d9 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -9,7 +9,6 @@ import static io.jenkins.plugins.casc.SchemaGeneration.writeJSONSchema; import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson; import static io.jenkins.plugins.casc.misc.Util.validateSchema; -import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.empty; import static org.junit.Assert.assertThat; diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml index fb54218db2..06eb4d6f11 100644 --- a/plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml @@ -1,5 +1,5 @@ configuration-as-code: - version: 1 + version: "1" deprecated: warn restricted: warn unknown: warn \ No newline at end of file From b07c22b7737347aadcbb6248f4f71e635c213ae2 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Mon, 2 Dec 2019 23:02:13 +0000 Subject: [PATCH 54/93] Fix formatting --- .../resources/io/jenkins/plugins/casc/validSchemaConfig.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml index c768f6c774..f9de4c5dfd 100644 --- a/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml @@ -1,3 +1,3 @@ security: - cli: - enabled: false + cli: + enabled: false From 9bc089a65edf67698cf45b23c35f0e012313d01d Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Mon, 2 Dec 2019 23:02:49 +0000 Subject: [PATCH 55/93] More formatting --- .../resources/io/jenkins/plugins/casc/invalidBaseConfig.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml index 9e59e7c5d0..9ecfbaa4ea 100644 --- a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml @@ -2,5 +2,3 @@ security: cli: enabled: false invalidBaseConfigurator: "I do nothing" - - From 94e14d4aa9b2c764e75c9267d25f39238dbced62 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Mon, 2 Dec 2019 23:03:53 +0000 Subject: [PATCH 56/93] Undo whitespace changes --- .../plugins/casc/ConfigurationAsCode.java | 20 +++++++++---------- .../HeteroDescribableConfigurator.java | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java index f4be422519..f159e5a83f 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java @@ -781,16 +781,16 @@ public Collection getConfigurators() { */ private void listElements(Set elements, Set> attributes, ConfigurationContext context) { attributes.stream() - .map(Attribute::getType) - .map(context::lookup) - .filter(Objects::nonNull) - .map(c -> c.getConfigurators(context)) - .flatMap(Collection::stream) - .forEach(configurator -> { - if (elements.add(configurator)) { - listElements(elements, ((Configurator)configurator).describe(), context); // some unexpected type erasure force to cast here - } - }); + .map(Attribute::getType) + .map(context::lookup) + .filter(Objects::nonNull) + .map(c -> c.getConfigurators(context)) + .flatMap(Collection::stream) + .forEach(configurator -> { + if (elements.add(configurator)) { + listElements(elements, ((Configurator)configurator).describe(), context); // some unexpected type erasure force to cast here + } + }); } // --- UI helper methods diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java index b337de5e63..4c3a5b94ca 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java @@ -117,7 +117,6 @@ public CNode describe(T instance, ConfigurationContext context) { }).getOrNull(); } - @SuppressWarnings("unused") public Map> getImplementors() { return getDescriptors() From a96a4f7340b774e9837a2ca9c6bc7154f45be921 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 3 Dec 2019 07:38:07 +0000 Subject: [PATCH 57/93] Change json schema test API to return list of errors --- docs/PLUGINS.md | 2 +- .../plugins/casc/SchemaGenerationTest.java | 10 +-- .../io/jenkins/plugins/casc/misc/Util.java | 70 ++++++++++++------- 3 files changed, 51 insertions(+), 31 deletions(-) diff --git a/docs/PLUGINS.md b/docs/PLUGINS.md index 5fbc2e46b1..fcedb7603d 100644 --- a/docs/PLUGINS.md +++ b/docs/PLUGINS.md @@ -337,6 +337,6 @@ Add a test for the YAML file ```java @Test public void validSchemaShouldSucceed() throws Exception { - assertTrue(validateSchema(convertYamlFileToJson(this, "validJenkinsConfigurator.yml"))); + assertThat(validateSchema(convertYamlFileToJson(this, "validSchemaConfig.yml")), empty()); } ``` diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index df0ac85d59..056ebe5420 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -8,9 +8,10 @@ import static io.jenkins.plugins.casc.SchemaGeneration.retrieveDocStringFromAttribute; import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson; import static io.jenkins.plugins.casc.misc.Util.validateSchema; -import static junit.framework.TestCase.assertTrue; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.empty; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThat; public class SchemaGenerationTest { @@ -19,12 +20,13 @@ public class SchemaGenerationTest { @Test public void validSchemaShouldSucceed() throws Exception { - assertTrue(validateSchema(convertYamlFileToJson(this, "validSchemaConfig.yml"))); + assertThat(validateSchema(convertYamlFileToJson(this, "validSchemaConfig.yml")), empty()); } @Test public void invalidSchemaShouldNotSucceed() throws Exception { - assertFalse(validateSchema(convertYamlFileToJson(this,"invalidSchemaConfig.yml"))); + assertThat(validateSchema(convertYamlFileToJson(this, "invalidSchemaConfig.yml")), + empty()); } @Test diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java b/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java index 8dad42346b..e651568e30 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java @@ -17,6 +17,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.logging.Level; @@ -24,6 +25,7 @@ import jenkins.model.GlobalConfigurationCategory; import jenkins.tools.ToolConfigurationCategory; import org.everit.json.schema.Schema; +import org.everit.json.schema.ValidationException; import org.everit.json.schema.loader.SchemaLoader; import org.json.JSONObject; import org.json.JSONTokener; @@ -31,6 +33,8 @@ import static io.jenkins.plugins.casc.ConfigurationAsCode.serializeYamlNode; import static io.jenkins.plugins.casc.SchemaGeneration.generateSchema; +import static java.util.Collections.emptyList; +import static java.util.Collections.singletonList; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -182,7 +186,7 @@ public static String toStringFromYamlFile(Object clazz, String resourcePath) thr */ public static void assertNotInLog(LoggerRule logging, String unexpectedText) { assertFalse("The log should not contain '" + unexpectedText + "'", - logging.getMessages().stream().anyMatch(m -> m.contains(unexpectedText))); + logging.getMessages().stream().anyMatch(m -> m.contains(unexpectedText))); } /** @@ -193,17 +197,17 @@ public static void assertNotInLog(LoggerRule logging, String unexpectedText) { */ public static void assertLogContains(LoggerRule logging, String expectedText) { assertTrue("The log should contain '" + expectedText + "'", - logging.getMessages().stream().anyMatch(m -> m.contains(expectedText))); + logging.getMessages().stream().anyMatch(m -> m.contains(expectedText))); } /** - * Converts a given yamlString into a JsonString. - * Example Usage: + *

Converts a given yamlString into a JsonString.

+ *

Example Usage:

*
{@code
      * String jsonString = convertToJson(yourYamlString);}
      * 
- * @param yamlString - * @return JsonString + * @param yamlString the yaml to convert + * @return the json conversion of the yaml string. */ public static String convertToJson(String yamlString) { @@ -215,11 +219,12 @@ public static String convertToJson(String yamlString) { /** * Retrieves the JSON schema for the running jenkins instance. - * Example Usage: - * *
{@code
-     *      * Schema jsonSchema = returnSchema();}
-     *      * 
- * @return Schema the schema for the current jenkins instance + *

Example Usage:

+ *
{@code
+     *      Schema jsonSchema = returnSchema();}
+     *      
+ * + * @return the schema for the current jenkins instance */ public static Schema returnSchema() throws Exception{ JSONObject schemaObject = generateSchema(); @@ -229,34 +234,47 @@ public static Schema returnSchema() throws Exception{ } /** - * Validates a given jsonObject against the schema generated for the current live jenkins instance - * * Example Usage: - * * *
{@code
-     *      *      * assertTrue(validateSchema(jsonSubject));}
-     *      *      * 
- * @param jsonSubject The json Object that needs to be validated - * @return true if it's valid else returns false + * Validates a given jsonObject against the schema generated for the current live jenkins + * instance. + * + *

Example Usage:

+ *
{@code
+     *   assertThat(validateSchema(convertYamlFileToJson(this, "invalidSchemaConfig.yml")),
+     *             contains("#/jenkins/numExecutors: expected type: Number, found: String"));
+     *  }
{@code + * assertThat(validateSchema(convertYamlFileToJson(this, "validConfig.yml")), + * empty()); + * } + * + * @param jsonSubject the json object that needs to be validated + * @return a list of validation errors, empty list if no errors */ - public static boolean validateSchema(JSONObject jsonSubject) { + public static List validateSchema(JSONObject jsonSubject) { try { returnSchema().validate(jsonSubject); + } catch (ValidationException e) { + return e.getAllMessages(); } catch (Exception ie) { LOGGER.log(Level.WARNING, failureMessage, ie); - return false; + return singletonList("Exception during test" + ie.getMessage()); } - return true; + return emptyList(); } /** * Converts a YAML file into a json object - * Example Usage: - * *
{@code
-     *           * JSONObject  jsonObject = convertYamlFileToJson("filename");}
-     *           * 
+ *

Example Usage:

+ *
{@code
+     *  JSONObject jsonObject = convertYamlFileToJson(this, "filename");}
+     * 
+ * + * @param clazz the class used for loading resources, normally you want to pass 'this' * @param yamlFileName the name of the yaml file that needs to be converted * @return JSONObject pertaining to that yaml file. */ - public static JSONObject convertYamlFileToJson(Object clazz, String yamlFileName) throws Exception { + public static JSONObject convertYamlFileToJson(Object clazz, String yamlFileName) throws Exception { String yamlStringContents = toStringFromYamlFile(clazz, yamlFileName); return new JSONObject(new JSONTokener(convertToJson(yamlStringContents))); } From d50ad6ef9106125add8893ff8cc09e7c2d4acf51 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 3 Dec 2019 08:06:28 +0000 Subject: [PATCH 58/93] Adding failing test demonstrating all attributes getting flattenned to top --- .../java/io/jenkins/plugins/casc/SchemaGenerationTest.java | 7 +++++++ .../jenkins/plugins/casc/attributesNotFlattenedToTop.yml | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/attributesNotFlattenedToTop.yml diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index d92cebe3db..488ea2758e 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -48,6 +48,13 @@ public void validSelfConfigurator() throws Exception { empty()); } + @Test + public void attributesNotFlattenedToTopLevel() throws Exception { + assertThat( + validateSchema(convertYamlFileToJson(this, "attributesNotFlattenedToTop.yml")), + contains("#: extraneous key [acceptLicense] is not permitted")); + } + // For testing purposes.To be removed @Test public void writeSchema() throws Exception { diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/attributesNotFlattenedToTop.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/attributesNotFlattenedToTop.yml new file mode 100644 index 0000000000..516ca29803 --- /dev/null +++ b/plugin/src/test/resources/io/jenkins/plugins/casc/attributesNotFlattenedToTop.yml @@ -0,0 +1,2 @@ +tool: + acceptLicense: true \ No newline at end of file From 26341c4810723c610b6be7237e5c5ff3ac4ce549 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 3 Dec 2019 08:13:19 +0000 Subject: [PATCH 59/93] Fix flattening issues --- plugin/schema.json | 791 ++++++++---------- .../plugins/casc/SchemaGeneration.java | 77 +- .../plugins/casc/SchemaGenerationTest.java | 2 +- 3 files changed, 373 insertions(+), 497 deletions(-) diff --git a/plugin/schema.json b/plugin/schema.json index 9cc6e97d79..dba957be70 100644 --- a/plugin/schema.json +++ b/plugin/schema.json @@ -55,13 +55,11 @@ "type": "object", "properties": {"port": {"type": "integer"}} }, - "enabled": {"type": "boolean"}, "crumb": { "additionalProperties": false, "type": "object", "properties": {} }, - "port": {"type": "integer"}, "downloadsettings": { "additionalProperties": false, "type": "object", @@ -71,8 +69,7 @@ "additionalProperties": false, "type": "object", "properties": {} - }, - "useBrowser": {"type": "boolean"} + } } }, "unclassified": { @@ -88,7 +85,6 @@ "url": {"type": "string"} } }, - "foo": {"type": "string"}, "nodeProperties": { "type": "object", "$id": "#/definitions/jenkins.model.GlobalNodePropertiesConfiguration" @@ -98,7 +94,6 @@ "type": "object", "properties": {} }, - "bar": {"type": "string"}, "quietPeriod": { "type": "object", "$id": "#/definitions/jenkins.model.GlobalQuietPeriodConfiguration" @@ -191,18 +186,15 @@ "type": "object", "$id": "#/definitions/jenkins.model.GlobalSCMRetryCountConfiguration" }, - "adminAddress": {"type": "string"}, "casCGlobalConfig": { "type": "object", "$id": "#/definitions/io.jenkins.plugins.casc.CasCGlobalConfig" }, - "pollingThreadCount": {"type": "integer"}, "artifactManager": { "type": "object", "$id": "#/definitions/jenkins.model.ArtifactManagerConfiguration" }, "artifactmanagerfactory": {}, - "url": {"type": "string"}, "fooBar": { "type": "object", "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DescriptorConfiguratorTest$FooBar" @@ -216,7 +208,6 @@ "type": "object", "$id": "#/definitions/hudson.views.ViewsTabBar$GlobalConfigurationImpl" }, - "configurationPath": {"type": "string"}, "defaultView": { "type": "object", "$id": "#/definitions/hudson.views.GlobalDefaultViewConfiguration" @@ -297,6 +288,11 @@ "type": "object", "title": "Configuration base for the jenkins classifier", "properties": { + "standard": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, "systemMessage": {"type": "string"}, "listview": { "additionalProperties": false, @@ -319,7 +315,6 @@ } } }, - "forceExistingJobs": {"type": "boolean"}, "computerlauncher": { "oneOf": [ { @@ -337,8 +332,46 @@ ], "type": "object" }, - "upTimeMins": {"type": "integer"}, + "cloud": {}, + "mode": { + "type": "string", + "enum": [ + "NORMAL", + "EXCLUSIVE" + ] + }, + "numExecutors": {"type": "integer"}, + "view": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"all": {"$id": "#/definitions/hudson.model.AllView"}} + }, + { + "additionalProperties": false, + "properties": {"proxy": {"$id": "#/definitions/hudson.model.ProxyView"}} + }, + { + "additionalProperties": false, + "properties": {"myView": {"$id": "#/definitions/hudson.model.MyView"}} + }, + { + "additionalProperties": false, + "properties": {"list": {"$id": "#/definitions/hudson.model.ListView"}} + } + ], + "type": "object" + }, "quietPeriod": {"type": "integer"}, + "batchcommandinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "label": {"type": "string"}, + "toolHome": {"type": "string"}, + "command": {"type": "string"} + } + }, "markupformatter": { "oneOf": [{ "additionalProperties": false, @@ -346,12 +379,11 @@ }], "type": "object" }, - "password": {"type": "string"}, "jDKs": { "type": "object", "$id": "#/definitions/hudson.model.JDK" }, - "proxiedViewName": {"type": "string"}, + "labelString": {"type": "string"}, "retentionstrategy": { "oneOf": [ { @@ -379,8 +411,61 @@ "type": "object", "properties": {"excludeClientIPFromCrumb": {"type": "boolean"}} }, - "id": {"type": "string"}, + "listviewcolumn": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"jobName": {"$id": "#/definitions/hudson.views.JobColumn"}} + }, + { + "additionalProperties": false, + "properties": {"lastDuration": {"$id": "#/definitions/hudson.views.LastDurationColumn"}} + }, + { + "additionalProperties": false, + "properties": {"buildButton": {"$id": "#/definitions/hudson.views.BuildButtonColumn"}} + }, + { + "additionalProperties": false, + "properties": {"lastStable": {"$id": "#/definitions/hudson.views.LastStableColumn"}} + }, + { + "additionalProperties": false, + "properties": {"weather": {"$id": "#/definitions/hudson.views.WeatherColumn"}} + }, + { + "additionalProperties": false, + "properties": {"lastSuccess": {"$id": "#/definitions/hudson.views.LastSuccessColumn"}} + }, + { + "additionalProperties": false, + "properties": {"lastFailure": {"$id": "#/definitions/hudson.views.LastFailureColumn"}} + }, + { + "additionalProperties": false, + "properties": {"status": {"$id": "#/definitions/hudson.views.StatusColumn"}} + } + ], + "type": "object" + }, "scmCheckoutRetryCount": {"type": "integer"}, + "authorizationstrategy": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacyAuthorizationStrategy"}} + }, + { + "additionalProperties": false, + "properties": {"loggedInUsersCanDoAnything": {"$id": "#/definitions/hudson.security.FullControlOnceLoggedInAuthorizationStrategy"}} + }, + { + "additionalProperties": false, + "properties": {"unsecured": {"$id": "#/definitions/hudson.security.AuthorizationStrategy$Unsecured"}} + } + ], + "type": "object" + }, "patternprojectnamingstrategy": { "additionalProperties": false, "type": "object", @@ -390,12 +475,55 @@ "forceExistingJobs": {"type": "boolean"} } }, + "jobname": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "always": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "proxyview": { + "additionalProperties": false, + "type": "object", + "properties": { + "proxiedViewName": {"type": "string"}, + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.model.ViewProperty" + } + } + }, + "zipextractioninstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "subdir": {"type": "string"}, + "label": {"type": "string"}, + "url": {"type": "string"} + } + }, + "test": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "rawBuildsDir": {"type": "string"}, + "adminwhitelistrule": { + "additionalProperties": false, + "type": "object", + "properties": {"enabled": {"type": "boolean"}} + }, "maveninstaller": { "additionalProperties": false, "type": "object", "properties": {"id": {"type": "string"}} }, - "allowsSignup": {"type": "boolean"}, + "slaveAgentPort": {"type": "integer"}, + "captchasupport": {}, "nodeproperty": { "oneOf": [ { @@ -409,6 +537,10 @@ ], "type": "object" }, + "updateCenter": { + "type": "object", + "$id": "#/definitions/hudson.model.UpdateCenter" + }, "demand": { "additionalProperties": false, "type": "object", @@ -423,6 +555,25 @@ } } }, + "myview": { + "additionalProperties": false, + "type": "object", + "properties": { + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.model.ViewProperty" + } + } + }, + "entry": { + "additionalProperties": false, + "type": "object", + "properties": { + "value": {"type": "string"}, + "key": {"type": "string"} + } + }, "proxy": { "type": "object", "$id": "#/definitions/hudson.ProxyConfiguration" @@ -448,8 +599,40 @@ ], "type": "object" }, - "includeRegex": {"type": "string"}, - "cmd": {"type": "string"}, + "viewjobfilter": {}, + "toolinstaller": { + "oneOf": [ + { + "additionalProperties": false, + "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}} + }, + { + "additionalProperties": false, + "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}} + } + ], + "type": "object" + }, + "jnlplauncher": { + "additionalProperties": false, + "type": "object", + "properties": { + "vmargs": {"type": "string"}, + "tunnel": {"type": "string"} + } + }, "fullcontrolonceloggedinauthorizationstrategy": { "additionalProperties": false, "type": "object", @@ -460,6 +643,14 @@ "type": "object", "properties": {} }, + "userwithpassword": { + "additionalProperties": false, + "type": "object", + "properties": { + "password": {"type": "string"}, + "id": {"type": "string"} + } + }, "nodeName": {"type": "string"}, "toolproperty": { "oneOf": [{ @@ -468,6 +659,11 @@ }], "type": "object" }, + "legacy": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, "securityrealm": { "oneOf": [ { @@ -481,9 +677,28 @@ ], "type": "object" }, + "simplescheduledretentionstrategy": { + "additionalProperties": false, + "type": "object", + "properties": { + "keepUpWhenActive": {"type": "boolean"}, + "startTimeSpec": {"type": "string"}, + "upTimeMins": {"type": "integer"} + } + }, "agentProtocols": {"type": "string"}, - "testUrl": {"type": "string"}, - "enabled": {"type": "boolean"}, + "proxyconfiguration": { + "additionalProperties": false, + "type": "object", + "properties": { + "password": {"type": "string"}, + "port": {"type": "integer"}, + "name": {"type": "string"}, + "testUrl": {"type": "string"}, + "userName": {"type": "string"}, + "noProxyHost": {"type": "string"} + } + }, "crumbissuer": { "oneOf": [ { @@ -497,10 +712,6 @@ ], "type": "object" }, - "inDemandDelay": { - "type": "object", - "$id": "#/definitions/long" - }, "viewstabbar": { "oneOf": [{ "additionalProperties": false, @@ -508,6 +719,11 @@ }], "type": "object" }, + "simplecommandlauncher": { + "additionalProperties": false, + "type": "object", + "properties": {"cmd": {"type": "string"}} + }, "jenkins": { "additionalProperties": false, "type": "object", @@ -603,28 +819,68 @@ "command": {"type": "string"} } }, - "key": {"type": "string"}, - "noProxyHost": {"type": "string"}, - "laststable": { + "buildbutton": { "additionalProperties": false, "type": "object", "properties": {} }, - "idleDelay": { - "type": "object", - "$id": "#/definitions/long" - }, - "hudsonprivatesecurityrealm": { + "dumbslave": { "additionalProperties": false, "type": "object", "properties": { - "captchaSupport": { - "type": "object", - "$id": "#/definitions/hudson.security.captcha.CaptchaSupport" - }, - "allowsSignup": {"type": "boolean"}, - "enableCaptcha": {"type": "boolean"}, - "users": { + "mode": { + "type": "string", + "enum": [ + "NORMAL", + "EXCLUSIVE" + ] + }, + "nodeName": {"type": "string"}, + "numExecutors": {"type": "integer"}, + "retentionStrategy": { + "type": "object", + "$id": "#/definitions/hudson.slaves.RetentionStrategy" + }, + "labelString": {"type": "string"}, + "name": {"type": "string"}, + "nodeDescription": {"type": "string"}, + "remoteFS": {"type": "string"}, + "userId": {"type": "string"}, + "launcher": { + "type": "object", + "$id": "#/definitions/hudson.slaves.ComputerLauncher" + }, + "nodeProperties": { + "type": "object", + "$id": "#/definitions/hudson.slaves.NodeProperty" + } + } + }, + "laststable": { + "additionalProperties": false, + "type": "object", + "properties": {} + }, + "disableRememberMe": {"type": "boolean"}, + "toollocation": { + "additionalProperties": false, + "type": "object", + "properties": { + "key": {"type": "string"}, + "home": {"type": "string"} + } + }, + "hudsonprivatesecurityrealm": { + "additionalProperties": false, + "type": "object", + "properties": { + "captchaSupport": { + "type": "object", + "$id": "#/definitions/hudson.security.captcha.CaptchaSupport" + }, + "allowsSignup": {"type": "boolean"}, + "enableCaptcha": {"type": "boolean"}, + "users": { "type": "object", "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword" } @@ -658,14 +914,11 @@ "type": "object", "properties": {} }, - "startTimeSpec": {"type": "string"}, "unsecured": { "additionalProperties": false, "type": "object", "properties": {} }, - "userId": {"type": "string"}, - "url": {"type": "string"}, "jdk": { "additionalProperties": false, "type": "object", @@ -689,152 +942,62 @@ } } }, - "remotingSecurity": { - "type": "object", - "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule" - }, - "projectnamingstrategy": { - "oneOf": [ - { - "additionalProperties": false, - "properties": {"standard": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"}} - }, - { - "additionalProperties": false, - "properties": {"pattern": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$PatternProjectNamingStrategy"}} - } - ], - "type": "object" - }, - "standard": { + "lastduration": { "additionalProperties": false, "type": "object", "properties": {} }, - "keepUpWhenActive": {"type": "boolean"}, - "sites": { + "remotingSecurity": { "type": "object", - "$id": "#/definitions/hudson.model.UpdateSite" - }, - "cloud": {}, - "mode": { - "type": "string", - "enum": [ - "NORMAL", - "EXCLUSIVE" - ] + "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule" }, - "numExecutors": {"type": "integer"}, - "subdir": {"type": "string"}, - "view": { - "oneOf": [ - { - "additionalProperties": false, - "properties": {"all": {"$id": "#/definitions/hudson.model.AllView"}} - }, - { - "additionalProperties": false, - "properties": {"proxy": {"$id": "#/definitions/hudson.model.ProxyView"}} - }, - { - "additionalProperties": false, - "properties": {"myView": {"$id": "#/definitions/hudson.model.MyView"}} - }, - { - "additionalProperties": false, - "properties": {"list": {"$id": "#/definitions/hudson.model.ListView"}} - } - ], + "myviewstabbar": { + "oneOf": [{ + "additionalProperties": false, + "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultMyViewsTabBar"}} + }], "type": "object" }, - "batchcommandinstaller": { + "updatesite": { "additionalProperties": false, "type": "object", "properties": { - "label": {"type": "string"}, - "toolHome": {"type": "string"}, - "command": {"type": "string"} + "id": {"type": "string"}, + "url": {"type": "string"} } }, - "labelString": {"type": "string"}, - "listviewcolumn": { + "projectnamingstrategy": { "oneOf": [ { "additionalProperties": false, - "properties": {"jobName": {"$id": "#/definitions/hudson.views.JobColumn"}} - }, - { - "additionalProperties": false, - "properties": {"lastDuration": {"$id": "#/definitions/hudson.views.LastDurationColumn"}} - }, - { - "additionalProperties": false, - "properties": {"buildButton": {"$id": "#/definitions/hudson.views.BuildButtonColumn"}} - }, - { - "additionalProperties": false, - "properties": {"lastStable": {"$id": "#/definitions/hudson.views.LastStableColumn"}} - }, - { - "additionalProperties": false, - "properties": {"weather": {"$id": "#/definitions/hudson.views.WeatherColumn"}} - }, - { - "additionalProperties": false, - "properties": {"lastSuccess": {"$id": "#/definitions/hudson.views.LastSuccessColumn"}} - }, - { - "additionalProperties": false, - "properties": {"lastFailure": {"$id": "#/definitions/hudson.views.LastFailureColumn"}} + "properties": {"standard": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"}} }, { "additionalProperties": false, - "properties": {"status": {"$id": "#/definitions/hudson.views.StatusColumn"}} + "properties": {"pattern": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$PatternProjectNamingStrategy"}} } ], "type": "object" - }, - "authorizationstrategy": { - "oneOf": [ - { - "additionalProperties": false, - "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacyAuthorizationStrategy"}} - }, - { - "additionalProperties": false, - "properties": {"loggedInUsersCanDoAnything": {"$id": "#/definitions/hudson.security.FullControlOnceLoggedInAuthorizationStrategy"}} - }, - { - "additionalProperties": false, - "properties": {"unsecured": {"$id": "#/definitions/hudson.security.AuthorizationStrategy$Unsecured"}} - } - ], + } + } + }, + "tool": { + "additionalProperties": false, + "type": "object", + "title": "Configuration base for the tool classifier", + "properties": { + "toolproperty": { + "oneOf": [{ + "additionalProperties": false, + "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}} + }], "type": "object" }, - "vmargs": {"type": "string"}, - "jobname": { - "additionalProperties": false, - "type": "object", - "properties": {} - }, - "always": { + "standard": { "additionalProperties": false, "type": "object", "properties": {} }, - "namePattern": {"type": "string"}, - "proxyview": { - "additionalProperties": false, - "type": "object", - "properties": { - "proxiedViewName": {"type": "string"}, - "name": {"type": "string"}, - "properties": { - "type": "object", - "$id": "#/definitions/hudson.model.ViewProperty" - } - } - }, "zipextractioninstaller": { "additionalProperties": false, "type": "object", @@ -844,228 +1007,17 @@ "url": {"type": "string"} } }, - "test": { - "additionalProperties": false, - "type": "object", - "properties": {} - }, - "rawBuildsDir": {"type": "string"}, - "adminwhitelistrule": { - "additionalProperties": false, - "type": "object", - "properties": {"enabled": {"type": "boolean"}} - }, - "slaveAgentPort": {"type": "integer"}, - "captchasupport": {}, - "updateCenter": { - "type": "object", - "$id": "#/definitions/hudson.model.UpdateCenter" - }, - "users": { - "type": "object", - "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword" - }, - "myview": { - "additionalProperties": false, - "type": "object", - "properties": { - "name": {"type": "string"}, - "properties": { - "type": "object", - "$id": "#/definitions/hudson.model.ViewProperty" - } - } - }, - "entry": { - "additionalProperties": false, - "type": "object", - "properties": { - "value": {"type": "string"}, - "key": {"type": "string"} - } - }, - "viewjobfilter": {}, - "port": {"type": "integer"}, - "recurse": {"type": "boolean"}, - "toolinstaller": { - "oneOf": [ - { - "additionalProperties": false, - "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}} - }, - { - "additionalProperties": false, - "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}} - }, - { - "additionalProperties": false, - "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}} - }, - { - "additionalProperties": false, - "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}} - }, - { - "additionalProperties": false, - "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}} - } - ], - "type": "object" - }, - "jnlplauncher": { - "additionalProperties": false, - "type": "object", - "properties": { - "vmargs": {"type": "string"}, - "tunnel": {"type": "string"} - } - }, - "name": {"type": "string"}, - "userwithpassword": { - "additionalProperties": false, - "type": "object", - "properties": { - "password": {"type": "string"}, - "id": {"type": "string"} - } - }, - "legacy": { - "additionalProperties": false, - "type": "object", - "properties": {} - }, - "simplescheduledretentionstrategy": { - "additionalProperties": false, - "type": "object", - "properties": { - "keepUpWhenActive": {"type": "boolean"}, - "startTimeSpec": {"type": "string"}, - "upTimeMins": {"type": "integer"} - } - }, - "description": {"type": "string"}, - "nodeDescription": {"type": "string"}, - "toolHome": {"type": "string"}, - "proxyconfiguration": { - "additionalProperties": false, - "type": "object", - "properties": { - "password": {"type": "string"}, - "port": {"type": "integer"}, - "name": {"type": "string"}, - "testUrl": {"type": "string"}, - "userName": {"type": "string"}, - "noProxyHost": {"type": "string"} - } - }, - "simplecommandlauncher": { - "additionalProperties": false, - "type": "object", - "properties": {"cmd": {"type": "string"}} - }, - "value": {"type": "string"}, - "buildbutton": { - "additionalProperties": false, - "type": "object", - "properties": {} - }, - "enableCaptcha": {"type": "boolean"}, - "dumbslave": { - "additionalProperties": false, - "type": "object", - "properties": { - "mode": { - "type": "string", - "enum": [ - "NORMAL", - "EXCLUSIVE" - ] - }, - "nodeName": {"type": "string"}, - "numExecutors": {"type": "integer"}, - "retentionStrategy": { - "type": "object", - "$id": "#/definitions/hudson.slaves.RetentionStrategy" - }, - "labelString": {"type": "string"}, - "name": {"type": "string"}, - "nodeDescription": {"type": "string"}, - "remoteFS": {"type": "string"}, - "userId": {"type": "string"}, - "launcher": { - "type": "object", - "$id": "#/definitions/hudson.slaves.ComputerLauncher" - }, - "nodeProperties": { - "type": "object", - "$id": "#/definitions/hudson.slaves.NodeProperty" - } - } - }, - "disableRememberMe": {"type": "boolean"}, - "toollocation": { - "additionalProperties": false, - "type": "object", - "properties": { - "key": {"type": "string"}, - "home": {"type": "string"} - } - }, - "label": {"type": "string"}, - "allowAnonymousRead": {"type": "boolean"}, - "env": { - "type": "object", - "$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty$Entry" - }, - "userName": {"type": "string"}, - "command": {"type": "string"}, - "home": {"type": "string"}, - "lastduration": { - "additionalProperties": false, - "type": "object", - "properties": {} - }, - "locations": { - "type": "object", - "$id": "#/definitions/hudson.tools.ToolLocationNodeProperty$ToolLocation" - }, - "myviewstabbar": { - "oneOf": [{ - "additionalProperties": false, - "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultMyViewsTabBar"}} - }], - "type": "object" - }, - "updatesite": { + "jdkinstaller": { "additionalProperties": false, "type": "object", "properties": { "id": {"type": "string"}, - "url": {"type": "string"} + "acceptLicense": {"type": "boolean"} } }, - "acceptLicense": {"type": "boolean"}, - "excludeClientIPFromCrumb": {"type": "boolean"}, - "remoteFS": {"type": "string"}, - "tunnel": {"type": "string"} - } - }, - "tool": { - "additionalProperties": false, - "type": "object", - "title": "Configuration base for the tool classifier", - "properties": { - "toolproperty": { - "oneOf": [{ - "additionalProperties": false, - "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}} - }], - "type": "object" - }, - "standard": { - "additionalProperties": false, + "maven": { "type": "object", - "properties": {} + "$id": "#/definitions/jenkins.mvn.GlobalMavenConfig" }, "globalsettingsprovider": { "oneOf": [ @@ -1080,9 +1032,10 @@ ], "type": "object" }, - "installations": { + "maveninstaller": { + "additionalProperties": false, "type": "object", - "$id": "#/definitions/hudson.model.JDK" + "properties": {"id": {"type": "string"}} }, "globalmavenconfig": { "additionalProperties": false, @@ -1107,9 +1060,18 @@ "type": "object", "properties": {"path": {"type": "string"}} }, - "toolHome": {"type": "string"}, - "subdir": {"type": "string"}, - "path": {"type": "string"}, + "jdk": { + "additionalProperties": false, + "type": "object", + "properties": { + "name": {"type": "string"}, + "properties": { + "type": "object", + "$id": "#/definitions/hudson.tools.ToolProperty" + }, + "home": {"type": "string"} + } + }, "settingsprovider": { "oneOf": [ { @@ -1123,16 +1085,12 @@ ], "type": "object" }, - "batchcommandinstaller": { + "filepathglobalsettingsprovider": { "additionalProperties": false, "type": "object", - "properties": { - "label": {"type": "string"}, - "toolHome": {"type": "string"}, - "command": {"type": "string"} - } + "properties": {"path": {"type": "string"}} }, - "commandinstaller": { + "batchcommandinstaller": { "additionalProperties": false, "type": "object", "properties": { @@ -1141,54 +1099,6 @@ "command": {"type": "string"} } }, - "id": {"type": "string"}, - "zipextractioninstaller": { - "additionalProperties": false, - "type": "object", - "properties": { - "subdir": {"type": "string"}, - "label": {"type": "string"}, - "url": {"type": "string"} - } - }, - "jdkinstaller": { - "additionalProperties": false, - "type": "object", - "properties": { - "id": {"type": "string"}, - "acceptLicense": {"type": "boolean"} - } - }, - "maven": { - "type": "object", - "$id": "#/definitions/jenkins.mvn.GlobalMavenConfig" - }, - "maveninstaller": { - "additionalProperties": false, - "type": "object", - "properties": {"id": {"type": "string"}} - }, - "label": {"type": "string"}, - "url": {"type": "string"}, - "command": {"type": "string"}, - "home": {"type": "string"}, - "jdk": { - "additionalProperties": false, - "type": "object", - "properties": { - "name": {"type": "string"}, - "properties": { - "type": "object", - "$id": "#/definitions/hudson.tools.ToolProperty" - }, - "home": {"type": "string"} - } - }, - "filepathglobalsettingsprovider": { - "additionalProperties": false, - "type": "object", - "properties": {"path": {"type": "string"}} - }, "maveninstallation": { "additionalProperties": false, "type": "object", @@ -1226,8 +1136,15 @@ ], "type": "object" }, - "name": {"type": "string"}, - "acceptLicense": {"type": "boolean"} + "commandinstaller": { + "additionalProperties": false, + "type": "object", + "properties": { + "label": {"type": "string"}, + "toolHome": {"type": "string"}, + "command": {"type": "string"} + } + } } } } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 6f7a66fd9c..443169880c 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -36,10 +36,10 @@ public static JSONObject generateSchema() { final ConfigurationContext context = new ConfigurationContext(registry); JSONObject rootConfiguratorProperties = new JSONObject(); - for(RootElementConfigurator rootElementConfigurator : RootElementConfigurator.all()) { + for (RootElementConfigurator rootElementConfigurator : RootElementConfigurator.all()) { JSONObject schemaConfiguratorObjects = new JSONObject(); Set elements = new LinkedHashSet<>(); - listElements(elements, rootElementConfigurator.describe(), context); + listElements(elements, rootElementConfigurator.describe(), context, true); for (Object configuratorObject : elements) { if (configuratorObject instanceof BaseConfigurator) { BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; @@ -94,19 +94,19 @@ public static JSONObject generateSchema() { } } - rootConfiguratorProperties.put(rootElementConfigurator.getName(), - new JSONObject().put("type", "object") - .put("additionalProperties", false) - .put("properties", schemaConfiguratorObjects) - .put("title", "Configuration base for the " + rootElementConfigurator.getName() - + " classifier")); + rootConfiguratorProperties.put(rootElementConfigurator.getName(), + new JSONObject().put("type", "object") + .put("additionalProperties", false) + .put("properties", schemaConfiguratorObjects) + .put("title", "Configuration base for the " + rootElementConfigurator.getName() + + " classifier")); } schemaObject.put("properties", rootConfiguratorProperties); return schemaObject; } public static String writeJSONSchema() { - return generateSchema().toString(4); + return generateSchema().toString(4); } private static JSONObject generateHeteroDescribableConfigObject( @@ -141,12 +141,15 @@ private static JSONObject generateHeteroDescribableConfigObject( * @param elements linked set (to save order) of visited elements * @param attributes siblings to find associated configurators and dive to next tree levels * @param context configuration context + * @param root is this the first iteration of root attributes */ - private static void listElements(Set elements, Set> attributes, ConfigurationContext context) { + private static void listElements(Set elements, Set> attributes, + ConfigurationContext context, boolean root) { // some unexpected type erasure force to cast here attributes.stream() .peek(attribute -> { - if (!(attribute instanceof DescribableAttribute)) { + // root primitive attributes are skipped without this + if (root && !(attribute instanceof DescribableAttribute)) { elements.add(attribute); } }) @@ -158,7 +161,7 @@ private static void listElements(Set elements, Set> attri .filter(e -> elements.add(e)) .forEach( configurator -> listElements(elements, ((Configurator) configurator).describe(), - context) + context, false) ); } @@ -167,33 +170,21 @@ private static JSONObject generateNonEnumAttributeObject(Attribute attribute) { JSONObject attributeType = new JSONObject(); switch (attribute.type.getName()) { case "java.lang.String": + case "hudson.Secret": attributeType.put("type", "string"); break; case "int": + case "java.lang.Integer": + case "java.lang.Long": attributeType.put("type", "integer"); break; case "boolean": - attributeType.put("type", "boolean"); - break; - case "java.lang.Boolean": attributeType.put("type", "boolean"); break; - case "java.lang.Integer": - attributeType.put("type", "integer"); - break; - - case "hudson.Secret": - attributeType.put("type", "string"); - break; - - case "java.lang.Long": - attributeType.put("type", "integer"); - break; - default: attributeType.put("type", "object"); attributeType.put("$id", @@ -235,36 +226,4 @@ private static void generateEnumAttributeSchema(JSONObject attributeSchemaTempla .put("enum", new JSONArray(attributeList))); } } - - public static void storeConfiguratorNames() { - ConfigurationAsCode configurationAsCodeObject = ConfigurationAsCode.get(); - for (Object configuratorObject : configurationAsCodeObject.getConfigurators()) { - if (configuratorObject instanceof BaseConfigurator) { - BaseConfigurator baseConfigurator = (BaseConfigurator) configuratorObject; - List baseConfigAttributeList = baseConfigurator.getAttributes(); - - for (Attribute attribute : baseConfigAttributeList) { - if (attribute.multiple) { - System.out.println( - "This is a multiple attribute " + attribute.getType() + " " + attribute - .getName()); - } else { - if (attribute.type.isEnum()) { - System.out.println("This is an enumeration attribute: "); - if (attribute.type.getEnumConstants().length != 0) { - System.out.println( - "Printing Enumeration constants for: " + attribute.getName()); - for (Object obj : attribute.type.getEnumConstants()) { - System.out.println("EConstant : " + obj.toString()); - } - } - } - } - } - } else if (configuratorObject instanceof HeteroDescribableConfigurator) { - System.out.println("Instance of HeteroDescribable Configurator"); - } - } - } - } diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 488ea2758e..1b11370409 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -52,7 +52,7 @@ public void validSelfConfigurator() throws Exception { public void attributesNotFlattenedToTopLevel() throws Exception { assertThat( validateSchema(convertYamlFileToJson(this, "attributesNotFlattenedToTop.yml")), - contains("#: extraneous key [acceptLicense] is not permitted")); + contains("#/tool: extraneous key [acceptLicense] is not permitted")); } // For testing purposes.To be removed From 3ce5e2b9887fb634c76be76a1640bf32c7cc8205 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 3 Dec 2019 08:15:27 +0000 Subject: [PATCH 60/93] Remove print lines --- plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java | 3 +-- .../plugins/casc/impl/configurators/PrimitiveConfigurator.java | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index 1c0c9ad92b..371a781f46 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -252,8 +252,7 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi if (multiple) { Sequence seq = new Sequence(); if (o.getClass().isArray()) o = Arrays.asList((Object[]) o); - if(o instanceof Iterable) { - System.out.println("This is iterable"); + if (o instanceof Iterable) { for (Object value : (Iterable) o) { seq.add(_describe(c, context, value, shouldBeMasked)); } diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/PrimitiveConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/PrimitiveConfigurator.java index f709d62e71..9d8ffc3731 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/PrimitiveConfigurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/PrimitiveConfigurator.java @@ -67,7 +67,6 @@ public CNode describe(Object instance, ConfigurationContext context) { return new Scalar(((Secret) instance).getEncryptedValue()).encrypted(true); } if (target.isEnum()) { - System.out.println(instance.getClass().getSimpleName()); return new Scalar((Enum) instance); } From b92032d09a79e0e726e9b7cd3d7149f771cb4251 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 3 Dec 2019 09:09:28 +0000 Subject: [PATCH 61/93] Fix spot bugs --- .../src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index 443169880c..2a619d2862 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -83,7 +83,6 @@ public static JSONObject generateSchema() { generateHeteroDescribableConfigObject(heteroDescribableConfigurator)); } else if (configuratorObject instanceof Attribute) { Attribute attribute = (Attribute) configuratorObject; - JSONObject attributeSchema = new JSONObject(); if (attribute.type.isEnum()) { generateEnumAttributeSchema(schemaConfiguratorObjects, attribute); } else { From 5e9ce85b906237e90228dd504ab2924d99de116f Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 3 Dec 2019 09:10:28 +0000 Subject: [PATCH 62/93] Checkstyle --- .../test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index 056ebe5420..f9404563f3 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -8,7 +8,6 @@ import static io.jenkins.plugins.casc.SchemaGeneration.retrieveDocStringFromAttribute; import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson; import static io.jenkins.plugins.casc.misc.Util.validateSchema; -import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.empty; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; From a71b71ea3413957769d43969768a243e67bc28fd Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 3 Dec 2019 09:17:29 +0000 Subject: [PATCH 63/93] Fix test --- .../java/io/jenkins/plugins/casc/SchemaGenerationTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java index f9404563f3..804c900cf7 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java +++ b/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java @@ -8,6 +8,7 @@ import static io.jenkins.plugins.casc.SchemaGeneration.retrieveDocStringFromAttribute; import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson; import static io.jenkins.plugins.casc.misc.Util.validateSchema; +import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.empty; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; @@ -25,7 +26,7 @@ public void validSchemaShouldSucceed() throws Exception { @Test public void invalidSchemaShouldNotSucceed() throws Exception { assertThat(validateSchema(convertYamlFileToJson(this, "invalidSchemaConfig.yml")), - empty()); + contains("#/jenkins/numExecutors: expected type: Number, found: String")); } @Test From ce565f2fd87ec87e9d1d7e4a438a3a0c978b82e5 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 3 Dec 2019 13:50:48 +0000 Subject: [PATCH 64/93] Fix checkstyle --- .../main/java/io/jenkins/plugins/casc/ConfigurationContext.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java index ec08ca5643..0f21a6387a 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationContext.java @@ -6,8 +6,6 @@ import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; -import org.kohsuke.accmod.Restricted; -import org.kohsuke.accmod.restrictions.NoExternalUse; import org.kohsuke.stapler.Stapler; /** From cd013916bbb6ee017b66998a5234e1f7aba6948d Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Sat, 7 Dec 2019 17:05:56 +0000 Subject: [PATCH 65/93] Introduce test-harness module --- integrations/pom.xml | 27 +++----- plugin/pom.xml | 42 +----------- pom.xml | 1 + test-harness/pom.xml | 66 +++++++++++++++++++ .../plugins/casc/misc/ConfiguredWithCode.java | 0 .../casc/misc/ConfiguredWithReadme.java | 0 .../io/jenkins/plugins/casc/misc/Env.java | 0 .../plugins/casc/misc/EnvVarsRule.java | 0 .../io/jenkins/plugins/casc/misc/Envs.java | 0 .../plugins/casc/misc/EnvsFromFile.java | 0 .../casc/misc/JenkinsConfiguredRule.java | 0 .../misc/JenkinsConfiguredWithCodeRule.java | 0 .../misc/JenkinsConfiguredWithReadmeRule.java | 0 .../casc/misc/RoundTripAbstractTest.java | 0 .../io/jenkins/plugins/casc/misc/Util.java | 20 ++++-- .../casc/misc/jmh/CascJmhBenchmarkState.java | 0 .../plugins/casc/AgentProtocolsTest.java | 0 .../casc/BackwardCompatibilityTest.java | 0 .../casc/CascJmhBenchmarkStateTest.java | 0 .../plugins/casc/ConfigurationAsCodeTest.java | 0 .../casc/DetectMissingVaultPluginTest.java | 0 .../plugins/casc/JenkinsConfigTest.java | 0 ...nsConfiguredWithCodeRuleClassRuleTest.java | 0 .../jenkins/plugins/casc/SampleBenchmark.java | 0 .../plugins/casc/SchemaGenerationTest.java | 0 .../plugins/casc/Security1290Test.java | 0 .../plugins/casc/TokenReloadActionTest.java | 0 .../AdminWhitelistRuleConfiguratorTest.java | 0 ...nPrivateSecurityRealmConfiguratorTest.java | 0 .../JenkinsConfiguratorCloudSupportTest.java | 0 .../casc/core/JenkinsConfiguratorTest.java | 0 .../casc/core/MavenConfiguratorTest.java | 0 .../casc/core/ProxyConfiguratorTest.java | 0 ...AuthorizationStrategyConfiguratorTest.java | 0 .../core/UpdateCenterConfiguratorTest.java | 0 .../DataBoundConfiguratorTest.java | 3 +- .../DescriptorConfiguratorTest.java | 0 ...plicateKeyDescribableConfiguratorTest.java | 0 .../MissingConfiguratorTest.java | 0 .../configurators/SelfConfiguratorTest.java | 0 .../ClassParametersAreNonnullByDefault.java | 0 .../nonnull/NonnullParameterConstructor.java | 0 .../PackageParametersAreNonnullByDefault.java | 0 .../PackageParametersNonNullCheckForNull.java | 0 .../nonnullparampackage/package-info.java | 0 .../configurators/nonnull/package-info.java | 0 .../plugins/casc/AgentProtocolsTest.yml | 0 .../plugins/casc/ArtifactoryBuilderTest.yml | 0 .../casc/BackwardCompatibilityTest.yml | 0 .../plugins/casc/GetConfiguratorsTest.yml | 0 .../casc/GlobalSecurityConfiguration.yml | 0 .../plugins/casc/JenkinsConfigTest.yml | 0 .../io/jenkins/plugins/casc/aNonEmpty.yml | 0 .../io/jenkins/plugins/casc/admin.yml | 0 .../io/jenkins/plugins/casc/benchmarks.yml | 0 ...gent2MasterSecurityKillSwitch_disabled.yml | 0 ...Agent2MasterSecurityKillSwitch_enabled.yml | 0 .../plugins/casc/core/HeteroDescribable.yml | 0 ...onPrivateSecurityRealmConfiguratorTest.yml | 0 .../JenkinsConfiguratorCloudSupportTest.yml | 0 .../casc/core/MavenConfiguratorTest.yml | 0 .../jenkins/plugins/casc/core/Primitives.yml | 0 .../io/jenkins/plugins/casc/core/Proxy.yml | 0 .../plugins/casc/core/ProxyMinimal.yml | 0 .../plugins/casc/core/ProxyWithSecrets.yml | 0 .../casc/core/SetEnvironmentVariable.yml | 0 ...dAuthorizationStrategyConfiguratorTest.yml | 0 .../plugins/casc/core/UpdateCenter.yml | 0 .../io/jenkins/plugins/casc/empty.yml | 0 .../DataBoundDescriptorNonNull.yml | 0 .../DescriptorConfiguratorTest_camelCase.yml | 0 .../DescriptorConfiguratorTest_lowerCase.yml | 0 .../DuplicateKeyDescribableConfigure.yml | 0 .../configurators/MissingConfiguratorTest.yml | 0 .../SelfConfiguratorRestrictedTest.yml | 0 .../configurators/SelfConfiguratorTest.yml | 0 .../plugins/casc/invalidSchemaConfig.yml | 0 .../io/jenkins/plugins/casc/merge1.yml | 0 .../io/jenkins/plugins/casc/merge2.yml | 0 .../io/jenkins/plugins/casc/merge3.yml | 0 .../io/jenkins/plugins/casc/multi-line1.yml | 0 .../io/jenkins/plugins/casc/multi-line2.yml | 0 .../plugins/casc/validSchemaConfig.yml | 0 83 files changed, 93 insertions(+), 66 deletions(-) create mode 100644 test-harness/pom.xml rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/ConfiguredWithCode.java (100%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/ConfiguredWithReadme.java (100%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/Env.java (100%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/EnvVarsRule.java (100%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/Envs.java (100%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/EnvsFromFile.java (100%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredRule.java (100%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredWithCodeRule.java (100%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredWithReadmeRule.java (100%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java (100%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/Util.java (95%) rename {plugin/src/test => test-harness/src/main}/java/io/jenkins/plugins/casc/misc/jmh/CascJmhBenchmarkState.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/AgentProtocolsTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/BackwardCompatibilityTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/CascJmhBenchmarkStateTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/ConfigurationAsCodeTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/DetectMissingVaultPluginTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/JenkinsConfigTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/JenkinsConfiguredWithCodeRuleClassRuleTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/SampleBenchmark.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/Security1290Test.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/TokenReloadActionTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/core/HudsonPrivateSecurityRealmConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/core/JenkinsConfiguratorCloudSupportTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/core/JenkinsConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/core/MavenConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/core/ProxyConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/core/UnsecuredAuthorizationStrategyConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/core/UpdateCenterConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java (99%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/DuplicateKeyDescribableConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/MissingConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorTest.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/ClassParametersAreNonnullByDefault.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/NonnullParameterConstructor.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/PackageParametersAreNonnullByDefault.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/PackageParametersNonNullCheckForNull.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/package-info.java (100%) rename {plugin => test-harness}/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/package-info.java (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/AgentProtocolsTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/ArtifactoryBuilderTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/BackwardCompatibilityTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/GetConfiguratorsTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/GlobalSecurityConfiguration.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/JenkinsConfigTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/aNonEmpty.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/admin.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/benchmarks.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_disabled.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_enabled.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/HeteroDescribable.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/HudsonPrivateSecurityRealmConfiguratorTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/JenkinsConfiguratorCloudSupportTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/MavenConfiguratorTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/Primitives.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/Proxy.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/ProxyMinimal.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/ProxyWithSecrets.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/SetEnvironmentVariable.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/UnsecuredAuthorizationStrategyConfiguratorTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/core/UpdateCenter.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/empty.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DataBoundDescriptorNonNull.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest_camelCase.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest_lowerCase.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DuplicateKeyDescribableConfigure.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/impl/configurators/MissingConfiguratorTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorRestrictedTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorTest.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/merge1.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/merge2.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/merge3.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/multi-line1.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/multi-line2.yml (100%) rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml (100%) diff --git a/integrations/pom.xml b/integrations/pom.xml index 4078908256..2f619c3d89 100644 --- a/integrations/pom.xml +++ b/integrations/pom.xml @@ -14,6 +14,7 @@ 2.176.3 true + 2.10.1 @@ -28,18 +29,10 @@ - - io.jenkins - configuration-as-code + io.jenkins.configuration-as-code + test-harness ${project.version} - test-jar - - - org.json - json - - @@ -223,7 +216,7 @@ 2.3.0 test - + org.jenkins-ci.plugins mesos @@ -334,7 +327,7 @@ org.jenkins-ci.plugins jackson2-api - 2.9.10 + ${jackson.version} @@ -484,27 +477,27 @@ com.fasterxml.jackson.core jackson-core - 2.9.10 + ${jackson.version} com.fasterxml.jackson.core jackson-databind - 2.9.10 + ${jackson.version} com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider - 2.9.7 + ${jackson.version} com.fasterxml.jackson.jaxrs jaxrs-json-provider - 2.9.7 + ${jackson.version} com.fasterxml.jackson.module jackson-module-jaxb-annotations - 2.9.9 + ${jackson.version} com.google.errorprone diff --git a/plugin/pom.xml b/plugin/pom.xml index 17ac7ee071..6dacc0d4af 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -14,7 +14,7 @@ hpi Configuration as Code Plugin - Manage Jenkins master configuration as code + Manage Jenkins master configuration as code https://github.com/jenkinsci/configuration-as-code-plugin @@ -46,29 +46,11 @@ - - org.everit.json - org.everit.json.schema - 1.5.1 - test - - - commons-beanutils - commons-beanutils - - - org.json json 20190722 - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - 2.7.7 - test - io.jenkins.configuration-as-code snakeyaml @@ -93,32 +75,10 @@ 1.19.0 test - - com.vladsch.flexmark - flexmark-all - 0.50.42 - test - - - org.apache.maven.plugins - maven-jar-plugin - - - - test-jar - - - - io/jenkins/plugins/casc/misc/** - - - - - maven-javadoc-plugin diff --git a/pom.xml b/pom.xml index 718274efc7..5d55152a0b 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,7 @@ snakeyaml plugin integrations + test-harness diff --git a/test-harness/pom.xml b/test-harness/pom.xml new file mode 100644 index 0000000000..34ef303bfe --- /dev/null +++ b/test-harness/pom.xml @@ -0,0 +1,66 @@ + + 4.0.0 + + parent + io.jenkins.configuration-as-code + ${revision}${changelist} + .. + + + test-harness + Configuration as Code Test harness + Functionality to make testing jcasc integration easier + + + 2.10.1 + true + + + + + junit + junit + + + io.jenkins + configuration-as-code + ${project.version} + + + org.everit.json + org.everit.json.schema + 1.5.1 + + + commons-beanutils + commons-beanutils + + + + + org.jenkins-ci.main + jenkins-test-harness + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + ${jackson.version} + + + com.vladsch.flexmark + flexmark-all + 0.50.42 + + + com.github.stefanbirkner + system-rules + 1.19.0 + + + + diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/ConfiguredWithCode.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithCode.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/ConfiguredWithCode.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithCode.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/ConfiguredWithReadme.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithReadme.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/ConfiguredWithReadme.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithReadme.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/Env.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/Env.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/Env.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/Env.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/EnvVarsRule.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/EnvVarsRule.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/EnvVarsRule.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/EnvVarsRule.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/Envs.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/Envs.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/Envs.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/Envs.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/EnvsFromFile.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/EnvsFromFile.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/EnvsFromFile.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/EnvsFromFile.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredRule.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredRule.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredRule.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredRule.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredWithCodeRule.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredWithCodeRule.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredWithCodeRule.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredWithCodeRule.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredWithReadmeRule.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredWithReadmeRule.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredWithReadmeRule.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/JenkinsConfiguredWithReadmeRule.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/Util.java similarity index 95% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/Util.java index e651568e30..847f267ce9 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/misc/Util.java +++ b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/Util.java @@ -1,6 +1,8 @@ package io.jenkins.plugins.casc.misc; -import com.fasterxml.jackson.dataformat.yaml.snakeyaml.Yaml; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import hudson.ExtensionList; import io.jenkins.plugins.casc.ConfigurationAsCode; import io.jenkins.plugins.casc.ConfigurationContext; @@ -12,13 +14,13 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.StringWriter; +import java.io.UncheckedIOException; import java.net.URISyntaxException; import java.net.URL; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.logging.Level; import java.util.logging.Logger; @@ -209,12 +211,16 @@ public static void assertLogContains(LoggerRule logging, String expectedText) { * @param yamlString the yaml to convert * @return the json conversion of the yaml string. */ - public static String convertToJson(String yamlString) { - Yaml yaml= new Yaml(); - Map map= (Map) yaml.load(yamlString); - JSONObject jsonObject=new JSONObject(map); - return jsonObject.toString(); + try { + ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory()); + Object obj = yamlReader.readValue(yamlString, Object.class); + + ObjectMapper jsonWriter = new ObjectMapper(); + return jsonWriter.writeValueAsString(obj); + } catch (JsonProcessingException e) { + throw new UncheckedIOException(e); + } } /** diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/misc/jmh/CascJmhBenchmarkState.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/jmh/CascJmhBenchmarkState.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/misc/jmh/CascJmhBenchmarkState.java rename to test-harness/src/main/java/io/jenkins/plugins/casc/misc/jmh/CascJmhBenchmarkState.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/AgentProtocolsTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/AgentProtocolsTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/AgentProtocolsTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/AgentProtocolsTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/BackwardCompatibilityTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/BackwardCompatibilityTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/BackwardCompatibilityTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/BackwardCompatibilityTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/CascJmhBenchmarkStateTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/CascJmhBenchmarkStateTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/CascJmhBenchmarkStateTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/CascJmhBenchmarkStateTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/ConfigurationAsCodeTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/ConfigurationAsCodeTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/ConfigurationAsCodeTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/ConfigurationAsCodeTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/DetectMissingVaultPluginTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/DetectMissingVaultPluginTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/DetectMissingVaultPluginTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/DetectMissingVaultPluginTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/JenkinsConfigTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/JenkinsConfigTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/JenkinsConfigTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/JenkinsConfigTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/JenkinsConfiguredWithCodeRuleClassRuleTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/JenkinsConfiguredWithCodeRuleClassRuleTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/JenkinsConfiguredWithCodeRuleClassRuleTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/JenkinsConfiguredWithCodeRuleClassRuleTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SampleBenchmark.java b/test-harness/src/test/java/io/jenkins/plugins/casc/SampleBenchmark.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/SampleBenchmark.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/SampleBenchmark.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/Security1290Test.java b/test-harness/src/test/java/io/jenkins/plugins/casc/Security1290Test.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/Security1290Test.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/Security1290Test.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/TokenReloadActionTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/TokenReloadActionTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/TokenReloadActionTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/TokenReloadActionTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/core/HudsonPrivateSecurityRealmConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/core/HudsonPrivateSecurityRealmConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/core/HudsonPrivateSecurityRealmConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/core/HudsonPrivateSecurityRealmConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/core/JenkinsConfiguratorCloudSupportTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/core/JenkinsConfiguratorCloudSupportTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/core/JenkinsConfiguratorCloudSupportTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/core/JenkinsConfiguratorCloudSupportTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/core/JenkinsConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/core/JenkinsConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/core/JenkinsConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/core/JenkinsConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/core/MavenConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/core/MavenConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/core/MavenConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/core/MavenConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/core/ProxyConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/core/ProxyConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/core/ProxyConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/core/ProxyConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/core/UnsecuredAuthorizationStrategyConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/core/UnsecuredAuthorizationStrategyConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/core/UnsecuredAuthorizationStrategyConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/core/UnsecuredAuthorizationStrategyConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/core/UpdateCenterConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/core/UpdateCenterConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/core/UpdateCenterConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/core/UpdateCenterConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java similarity index 99% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java index 63c7179456..d2b05d4da3 100644 --- a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java +++ b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java @@ -21,6 +21,7 @@ import java.util.logging.Logger; import javax.annotation.ParametersAreNonnullByDefault; import javax.annotation.PostConstruct; +import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -134,7 +135,7 @@ public void nonnullConstructorParameter() throws Exception { final NonnullParameterConstructor configured = (NonnullParameterConstructor) registry .lookupOrFail(NonnullParameterConstructor.class) .configure(config, new ConfigurationContext(registry)); - assertEquals(0, configured.getStrings().size()); + Assert.assertEquals(0, configured.getStrings().size()); } @Test diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/DuplicateKeyDescribableConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DuplicateKeyDescribableConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/DuplicateKeyDescribableConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DuplicateKeyDescribableConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/MissingConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/MissingConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/MissingConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/MissingConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorTest.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorTest.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorTest.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/ClassParametersAreNonnullByDefault.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/ClassParametersAreNonnullByDefault.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/ClassParametersAreNonnullByDefault.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/ClassParametersAreNonnullByDefault.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/NonnullParameterConstructor.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/NonnullParameterConstructor.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/NonnullParameterConstructor.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/NonnullParameterConstructor.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/PackageParametersAreNonnullByDefault.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/PackageParametersAreNonnullByDefault.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/PackageParametersAreNonnullByDefault.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/PackageParametersAreNonnullByDefault.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/PackageParametersNonNullCheckForNull.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/PackageParametersNonNullCheckForNull.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/PackageParametersNonNullCheckForNull.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/PackageParametersNonNullCheckForNull.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/package-info.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/package-info.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/package-info.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/nonnullparampackage/package-info.java diff --git a/plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/package-info.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/package-info.java similarity index 100% rename from plugin/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/package-info.java rename to test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/nonnull/package-info.java diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/AgentProtocolsTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/AgentProtocolsTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/AgentProtocolsTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/AgentProtocolsTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/ArtifactoryBuilderTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/ArtifactoryBuilderTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/ArtifactoryBuilderTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/ArtifactoryBuilderTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/BackwardCompatibilityTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/BackwardCompatibilityTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/BackwardCompatibilityTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/BackwardCompatibilityTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/GetConfiguratorsTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/GetConfiguratorsTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/GetConfiguratorsTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/GetConfiguratorsTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/GlobalSecurityConfiguration.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/GlobalSecurityConfiguration.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/GlobalSecurityConfiguration.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/GlobalSecurityConfiguration.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/JenkinsConfigTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/JenkinsConfigTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/JenkinsConfigTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/JenkinsConfigTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/aNonEmpty.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/aNonEmpty.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/aNonEmpty.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/aNonEmpty.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/admin.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/admin.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/admin.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/admin.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/benchmarks.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/benchmarks.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/benchmarks.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/benchmarks.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_disabled.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_disabled.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_disabled.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_disabled.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_enabled.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_enabled.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_enabled.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/AdminWhitelistRuleConfigurator/Agent2MasterSecurityKillSwitch_enabled.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/HeteroDescribable.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/HeteroDescribable.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/HeteroDescribable.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/HeteroDescribable.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/HudsonPrivateSecurityRealmConfiguratorTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/HudsonPrivateSecurityRealmConfiguratorTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/HudsonPrivateSecurityRealmConfiguratorTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/HudsonPrivateSecurityRealmConfiguratorTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/JenkinsConfiguratorCloudSupportTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/JenkinsConfiguratorCloudSupportTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/JenkinsConfiguratorCloudSupportTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/JenkinsConfiguratorCloudSupportTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/MavenConfiguratorTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/MavenConfiguratorTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/MavenConfiguratorTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/MavenConfiguratorTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/Primitives.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/Primitives.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/Primitives.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/Primitives.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/Proxy.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/Proxy.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/Proxy.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/Proxy.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/ProxyMinimal.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/ProxyMinimal.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/ProxyMinimal.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/ProxyMinimal.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/ProxyWithSecrets.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/ProxyWithSecrets.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/ProxyWithSecrets.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/ProxyWithSecrets.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/SetEnvironmentVariable.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/SetEnvironmentVariable.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/SetEnvironmentVariable.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/SetEnvironmentVariable.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/UnsecuredAuthorizationStrategyConfiguratorTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/UnsecuredAuthorizationStrategyConfiguratorTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/UnsecuredAuthorizationStrategyConfiguratorTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/UnsecuredAuthorizationStrategyConfiguratorTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/core/UpdateCenter.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/core/UpdateCenter.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/core/UpdateCenter.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/core/UpdateCenter.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/empty.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/empty.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/empty.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/empty.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DataBoundDescriptorNonNull.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DataBoundDescriptorNonNull.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DataBoundDescriptorNonNull.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DataBoundDescriptorNonNull.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest_camelCase.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest_camelCase.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest_camelCase.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest_camelCase.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest_lowerCase.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest_lowerCase.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest_lowerCase.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DescriptorConfiguratorTest_lowerCase.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DuplicateKeyDescribableConfigure.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DuplicateKeyDescribableConfigure.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DuplicateKeyDescribableConfigure.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/DuplicateKeyDescribableConfigure.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/MissingConfiguratorTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/MissingConfiguratorTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/MissingConfiguratorTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/MissingConfiguratorTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorRestrictedTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorRestrictedTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorRestrictedTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorRestrictedTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorTest.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorTest.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorTest.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/impl/configurators/SelfConfiguratorTest.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/invalidSchemaConfig.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/merge1.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/merge1.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/merge1.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/merge1.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/merge2.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/merge2.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/merge2.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/merge2.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/merge3.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/merge3.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/merge3.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/merge3.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/multi-line1.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/multi-line1.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/multi-line1.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/multi-line1.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/multi-line2.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/multi-line2.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/multi-line2.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/multi-line2.yml diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml similarity index 100% rename from plugin/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml rename to test-harness/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml From e50c94f68282022e0730d092042e08960fcb81f7 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Sat, 7 Dec 2019 17:16:53 +0000 Subject: [PATCH 66/93] shush codacy + docs --- docs/PLUGINS.md | 5 ++--- .../casc/impl/configurators/DataBoundConfiguratorTest.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/PLUGINS.md b/docs/PLUGINS.md index fcedb7603d..7d7ba3f33b 100644 --- a/docs/PLUGINS.md +++ b/docs/PLUGINS.md @@ -212,10 +212,9 @@ Add the Configuration as Code plugin as a test dependency in your pom.xml: test - io.jenkins - configuration-as-code + io.jenkins.configuration-as-code + test-harness ${configuration-as-code.version} - tests test ``` diff --git a/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java index d2b05d4da3..42089ee878 100644 --- a/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java +++ b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java @@ -135,7 +135,7 @@ public void nonnullConstructorParameter() throws Exception { final NonnullParameterConstructor configured = (NonnullParameterConstructor) registry .lookupOrFail(NonnullParameterConstructor.class) .configure(config, new ConfigurationContext(registry)); - Assert.assertEquals(0, configured.getStrings().size()); + assertEquals(0, configured.getStrings().size()); } @Test From 55e02169f2b9d6ec9def99c2a1a7baa62e74d022 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Sat, 7 Dec 2019 17:40:40 +0000 Subject: [PATCH 67/93] Fix javadoc --- .../plugins/casc/misc/ConfiguredWithCode.java | 3 +- .../casc/misc/ConfiguredWithReadme.java | 3 +- .../casc/misc/RoundTripAbstractTest.java | 2 ++ .../io/jenkins/plugins/casc/misc/Util.java | 30 +++++++++++-------- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithCode.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithCode.java index bbbfc2c5ec..b341e24178 100644 --- a/test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithCode.java +++ b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithCode.java @@ -16,7 +16,8 @@ public @interface ConfiguredWithCode { /** - * resource path in classpath + * Resource path in classpath + * @return resources to configure the test case with. */ String[] value(); diff --git a/test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithReadme.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithReadme.java index db56dc8e06..7faadf2ff0 100644 --- a/test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithReadme.java +++ b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/ConfiguredWithReadme.java @@ -16,7 +16,8 @@ public @interface ConfiguredWithReadme { /** - * resource path in the project + * Resource path in classpath + * @return resources to configure the test case with */ String[] value(); diff --git a/test-harness/src/main/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java index 71b47e1619..51f0a48481 100644 --- a/test-harness/src/main/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java +++ b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java @@ -57,6 +57,8 @@ public abstract class RoundTripAbstractTest { /** * A method to assert if the configuration was correctly loaded. The Jenkins rule and the content of the config * supposedly loaded are passed. + * @param j a RestartableJenkinsRule instance. + * @param configContent expected configuration. */ protected abstract void assertConfiguredAsExpected(RestartableJenkinsRule j, String configContent); diff --git a/test-harness/src/main/java/io/jenkins/plugins/casc/misc/Util.java b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/Util.java index 847f267ce9..5055edac25 100644 --- a/test-harness/src/main/java/io/jenkins/plugins/casc/misc/Util.java +++ b/test-harness/src/main/java/io/jenkins/plugins/casc/misc/Util.java @@ -167,17 +167,21 @@ public static String toYamlString(CNode rootNode) throws IOException { * @param clazz pass in {@code this} * @param resourcePath the file name to read, should be in the same package as your test class in resources * @return the string content of the file - * @throws URISyntaxException invalid path - * @throws IOException invalid path or file not found in general + * @throws URISyntaxException if an invalid URI is passed. */ - public static String toStringFromYamlFile(Object clazz, String resourcePath) throws URISyntaxException, IOException { - URL resource = clazz.getClass().getResource(resourcePath); - if (resource == null) { - throw new FileNotFoundException("Couldn't find file: " + resourcePath); - } + public static String toStringFromYamlFile(Object clazz, String resourcePath) + throws URISyntaxException { + try { + URL resource = clazz.getClass().getResource(resourcePath); + if (resource == null) { + throw new FileNotFoundException("Couldn't find file: " + resourcePath); + } - byte[] bytes = Files.readAllBytes(Paths.get(resource.toURI())); - return new String(bytes, StandardCharsets.UTF_8).replaceAll("\r\n?", "\n"); + byte[] bytes = Files.readAllBytes(Paths.get(resource.toURI())); + return new String(bytes, StandardCharsets.UTF_8).replaceAll("\r\n?", "\n"); + } catch (IOException e) { + throw new UncheckedIOException(e); + } } /** @@ -232,7 +236,7 @@ public static String convertToJson(String yamlString) { * * @return the schema for the current jenkins instance */ - public static Schema returnSchema() throws Exception{ + public static Schema returnSchema() { JSONObject schemaObject = generateSchema(); JSONObject jsonSchema = new JSONObject( new JSONTokener(schemaObject.toString())); @@ -247,7 +251,7 @@ public static Schema returnSchema() throws Exception{ *
{@code
      *   assertThat(validateSchema(convertYamlFileToJson(this, "invalidSchemaConfig.yml")),
      *             contains("#/jenkins/numExecutors: expected type: Number, found: String"));
-     *  }
* *
{@code
      *   assertThat(validateSchema(convertYamlFileToJson(this, "validConfig.yml")),
@@ -279,8 +283,10 @@ public static List validateSchema(JSONObject jsonSubject) {
      * @param clazz the class used for loading resources, normally you want to pass 'this'
      * @param yamlFileName the name of the yaml file that needs to be converted
      * @return JSONObject pertaining to that yaml file.
+     * @throws URISyntaxException if an invalid URI is passed.
      */
-    public static JSONObject convertYamlFileToJson(Object clazz, String yamlFileName) throws Exception {
+    public static JSONObject convertYamlFileToJson(Object clazz, String yamlFileName)
+        throws URISyntaxException {
         String yamlStringContents = toStringFromYamlFile(clazz, yamlFileName);
         return new JSONObject(new JSONTokener(convertToJson(yamlStringContents)));
     }

From 80221ea7795330e0d00291b4f3b335835ef3f0ce Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Sat, 7 Dec 2019 17:43:39 +0000
Subject: [PATCH 68/93] Fix import

---
 .../casc/impl/configurators/DataBoundConfiguratorTest.java       | 1 -
 1 file changed, 1 deletion(-)

diff --git a/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java
index 42089ee878..63c7179456 100644
--- a/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java
+++ b/test-harness/src/test/java/io/jenkins/plugins/casc/impl/configurators/DataBoundConfiguratorTest.java
@@ -21,7 +21,6 @@
 import java.util.logging.Logger;
 import javax.annotation.ParametersAreNonnullByDefault;
 import javax.annotation.PostConstruct;
-import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;

From 53342bf84ff930e1320c65269acacf67262d48d2 Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Sun, 8 Dec 2019 12:34:39 +0000
Subject: [PATCH 69/93] Add integration tests for some of the remaining issues

---
 demos/schema.json                             | 6723 +++++++++++++++++
 integrations/pom.xml                          |    6 +
 .../plugins/casc/AzureKeyVaultTest.java       |   33 +
 .../io/jenkins/plugins/casc/SlackTest.java    |   24 +-
 .../io/jenkins/plugins/casc/azureKeyVault.yml |    4 +
 .../io/jenkins/plugins/casc/slackSchema.yml   |    4 +
 .../plugins/casc/SchemaGeneration.java        |    1 +
 7 files changed, 6794 insertions(+), 1 deletion(-)
 create mode 100644 demos/schema.json
 create mode 100644 integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java
 create mode 100644 integrations/src/test/resources/io/jenkins/plugins/casc/azureKeyVault.yml
 create mode 100644 integrations/src/test/resources/io/jenkins/plugins/casc/slackSchema.yml

diff --git a/demos/schema.json b/demos/schema.json
new file mode 100644
index 0000000000..44581e7502
--- /dev/null
+++ b/demos/schema.json
@@ -0,0 +1,6723 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "description": "Jenkins Configuration as Code",
+    "additionalProperties": false,
+    "type": "object",
+    "properties": {
+        "": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the  classifier",
+            "properties": {
+                "credentialsproviderfilter": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"excludes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsProviderFilter$Excludes"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"includes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsProviderFilter$Includes"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"none": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsProviderFilter$None"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "excludes": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "provider": {"type": "string"},
+                        "type": {"type": "string"}
+                    }
+                },
+                "configuration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "credentialstypefilter": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"excludes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsTypeFilter$Excludes"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"includes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsTypeFilter$Includes"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"none": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsTypeFilter$None"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "includes": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "provider": {"type": "string"},
+                        "type": {"type": "string"}
+                    }
+                },
+                "none": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "credentialsprovidertyperestriction": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"excludes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsProviderTypeRestriction$Excludes"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"includes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsProviderTypeRestriction$Includes"}}
+                        }
+                    ],
+                    "type": "object"
+                }
+            }
+        },
+        "security": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the security classifier",
+            "properties": {
+                "downloadSettings": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.DownloadSettings"
+                },
+                "queueItemAuthenticator": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.security.QueueItemAuthenticatorConfiguration"
+                },
+                "updateSiteWarningsConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.security.UpdateSiteWarningsConfiguration"
+                },
+                "queueitemauthenticator": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"mock": {"$id": "#/definitions/org.jvnet.hudson.test.MockQueueItemAuthenticator"}}
+                    }],
+                    "type": "object"
+                },
+                "globalJobDslSecurityConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/javaposse.jobdsl.plugin.GlobalJobDslSecurityConfiguration"
+                },
+                "masterKillSwitchConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.security.s2m.MasterKillSwitchConfiguration"
+                },
+                "masterkillswitchconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "sSHD": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.main.modules.sshd.SSHD"
+                },
+                "sshd": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"port": {"type": "integer"}}
+                },
+                "apitokenpropertyconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "tokenGenerationOnCreationEnabled": {"type": "boolean"},
+                        "creationOfLegacyTokenEnabled": {"type": "boolean"},
+                        "usageStatisticsEnabled": {"type": "boolean"}
+                    }
+                },
+                "crumb": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "apiToken": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.security.apitoken.ApiTokenPropertyConfiguration"
+                },
+                "scriptApproval": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval"
+                },
+                "globaljobdslsecurityconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"useScriptSecurity": {"type": "boolean"}}
+                },
+                "downloadsettings": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"useBrowser": {"type": "boolean"}}
+                },
+                "updatesitewarningsconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                }
+            }
+        },
+        "unclassified": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the unclassified classifier",
+            "properties": {
+                "buildchoosersetting": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"buildChooser": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.plugins.git.util.BuildChooser"
+                    }}
+                },
+                "": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "submoduleconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "branches": {"type": "string"},
+                        "submoduleName": {"type": "string"}
+                    }
+                },
+                "githubtrustcontributors": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "fastestReadSpeed": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.FastestReadSpeedStrategy$DescriptorImpl"
+                },
+                "simplethemedecorator": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "faviconUrl": {"type": "string"},
+                        "cssUrl": {"type": "string"},
+                        "elements": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.simpletheme.ThemeElement"
+                        },
+                        "cssRules": {"type": "string"},
+                        "jsUrl": {"type": "string"}
+                    }
+                },
+                "rhodecode": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "groovyscript": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "providerId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "comment": {"type": "string"},
+                        "id": {"type": "string"},
+                        "content": {"type": "string"}
+                    }
+                },
+                "ivyBuildTrigger": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.ivy.IvyBuildTrigger$DescriptorImpl"
+                },
+                "fastestreadspeed": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "gitscmsource": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "traits": {
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.scm.api.trait.SCMSourceTrait"
+                        },
+                        "credentialsId": {"type": "string"},
+                        "id": {"type": "string"},
+                        "remote": {"type": "string"}
+                    }
+                },
+                "quietPeriod": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.GlobalQuietPeriodConfiguration"
+                },
+                "wildcardscmheadfiltertrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "excludes": {"type": "string"},
+                        "includes": {"type": "string"}
+                    }
+                },
+                "fisheyegitrepositorybrowser": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "mostusablespacestrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"estimatedWorkspaceSize": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/long"
+                    }}
+                },
+                "scm": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"git": {"$id": "#/definitions/hudson.plugins.git.GitSCM"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mercurial": {"$id": "#/definitions/hudson.plugins.mercurial.MercurialSCM"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"none": {"$id": "#/definitions/hudson.scm.NullSCM"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "masterBuild": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.MasterBuildConfiguration"
+                },
+                "singlescmsource": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "traits": {
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.scm.api.trait.SCMSourceTrait"
+                        },
+                        "name": {"type": "string"},
+                        "id": {"type": "string"},
+                        "scm": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.scm.SCM"
+                        }
+                    }
+                },
+                "userprovideddiskinfo": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "writeSpeed": {"type": "integer"},
+                        "readSpeed": {"type": "integer"}
+                    }
+                },
+                "hgweb": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "s3": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "cleancheckout": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "globalConfigFiles": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.configfiles.GlobalConfigFiles"
+                },
+                "jiraGlobalConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.plugins.jira.JiraGlobalConfiguration"
+                },
+                "ivyModuleSet": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.ivy.IvyModuleSet$DescriptorImpl"
+                },
+                "scmRetryCount": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.GlobalSCMRetryCountConfiguration"
+                },
+                "prunestalebranch": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "bitbucketweb": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "userremoteconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "credentialsId": {"type": "string"},
+                        "refspec": {"type": "string"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "prebuildmerge": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"options": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.plugins.git.UserMergeOptions"
+                    }}
+                },
+                "hooksecretconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"credentialsId": {"type": "string"}}
+                },
+                "viewsTabBar": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.views.ViewsTabBar$GlobalConfigurationImpl"
+                },
+                "kallithea": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "jirasite": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "roleVisibility": {"type": "string"},
+                        "appendChangeTimestamp": {"type": "boolean"},
+                        "recordScmChanges": {"type": "boolean"},
+                        "supportsWikiStyleComment": {"type": "boolean"},
+                        "updateJiraIssueForAllStatus": {"type": "boolean"},
+                        "alternativeUrl": {"type": "string"},
+                        "credentialsId": {"type": "string"},
+                        "timeout": {"type": "integer"},
+                        "url": {"type": "string"},
+                        "threadExecutorNumber": {"type": "integer"},
+                        "groupVisibility": {"type": "string"},
+                        "useHTTPAuth": {"type": "boolean"},
+                        "readTimeout": {"type": "integer"},
+                        "disableChangelogAnnotations": {"type": "boolean"},
+                        "dateTimePattern": {"type": "string"},
+                        "userPattern": {"type": "string"}
+                    }
+                },
+                "authorinchangelog": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "nodeproperties": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "usermergeoptions": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "mergeStrategy": {
+                            "type": "string",
+                            "enum": [
+                                "default",
+                                "resolve",
+                                "recursive",
+                                "octopus",
+                                "ours",
+                                "subtree",
+                                "recursive_theirs"
+                            ]
+                        },
+                        "fastForwardMode": {
+                            "type": "string",
+                            "enum": [
+                                "--ff",
+                                "--ff-only",
+                                "--no-ff"
+                            ]
+                        },
+                        "mergeTarget": {"type": "string"},
+                        "mergeRemote": {"type": "string"}
+                    }
+                },
+                "gitoriousweb": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "userexclusion": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"excludedUsers": {"type": "string"}}
+                },
+                "mercurialinstallationscmsourcetrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"installation": {"type": "string"}}
+                },
+                "npmregistry": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "credentialsId": {"type": "string"},
+                        "scopes": {"type": "string"},
+                        "hasScopes": {"type": "boolean"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "gitbrowserscmsourcetrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"browser": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.plugins.git.browser.GitRepositoryBrowser"
+                    }}
+                },
+                "classselector": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"selectedClass": {"type": "string"}}
+                },
+                "default": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "endpoint": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "apiUri": {"type": "string"},
+                        "name": {"type": "string"}
+                    }
+                },
+                "sonarGlobalConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.plugins.sonar.SonarGlobalConfiguration"
+                },
+                "cascglobalconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"configurationPath": {"type": "string"}}
+                },
+                "messageexclusion": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"excludedMessage": {"type": "string"}}
+                },
+                "mercurialscmsource": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "traits": {
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.scm.api.trait.SCMSourceTrait"
+                        },
+                        "credentialsId": {"type": "string"},
+                        "id": {"type": "string"},
+                        "source": {"type": "string"}
+                    }
+                },
+                "email": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "defaultview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "gitblitrepositorybrowser": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "repoUrl": {"type": "string"},
+                        "projectName": {"type": "string"}
+                    }
+                },
+                "cloneoption": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "reference": {"type": "string"},
+                        "noTags": {"type": "boolean"},
+                        "depth": {"type": "integer"},
+                        "honorRefspec": {"type": "boolean"},
+                        "shallow": {"type": "boolean"},
+                        "timeout": {"type": "integer"}
+                    }
+                },
+                "nodedisk": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "nodeMountPoint": {"type": "string"},
+                        "diskRefId": {"type": "string"}
+                    }
+                },
+                "faviconurlthemeelement": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "warningsParsers": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/io.jenkins.plugins.analysis.warnings.groovy.ParserConfiguration"
+                },
+                "plugin": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "jobrestriction": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"multipleAnd": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.MultipleAndJobRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"not": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.NotJobRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"or": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.OrJobRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"multipleOr": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.MultipleOrJobRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"and": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.AndJobRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"startedByMemberOfGroupRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.StartedByMemberOfGroupRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"regexNameRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.RegexNameRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"startedByUserRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.StartedByUserRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jobClassNameRestriction": {"$id": "#/definitions/io.jenkins.plugins.jobrestrictions.restrictions.job.JobClassNameRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"any": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.AnyJobRestriction"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "jellytemplateconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "providerId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "comment": {"type": "string"},
+                        "id": {"type": "string"},
+                        "content": {"type": "string"}
+                    }
+                },
+                "projectnamingstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "config": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mavenToolchains": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.MavenToolchainsConfig"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jellyTemplate": {"$id": "#/definitions/hudson.plugins.emailext.JellyTemplateConfig"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"groovyTemplate": {"$id": "#/definitions/hudson.plugins.emailext.GroovyTemplateConfig"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"groovyScript": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.groovy.GroovyScript"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"xml": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.xml.XmlConfig"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"globalMavenSettings": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"custom": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.custom.CustomConfig"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"json": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.json.JsonConfig"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"npm": {"$id": "#/definitions/jenkins.plugins.nodejs.configfiles.NPMConfig"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mavenSettings": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "remotenamescmsourcetrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"remoteName": {"type": "string"}}
+                },
+                "gitrepositorybrowser": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitiles": {"$id": "#/definitions/hudson.plugins.git.browser.Gitiles"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cGit": {"$id": "#/definitions/hudson.plugins.git.browser.CGit"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitList": {"$id": "#/definitions/hudson.plugins.git.browser.GitList"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"bitBucket": {"$id": "#/definitions/hudson.plugins.mercurial.browser.BitBucket"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"viewGitWeb": {"$id": "#/definitions/hudson.plugins.git.browser.ViewGitWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"redmineWeb": {"$id": "#/definitions/hudson.plugins.git.browser.RedmineWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"bitbucketWeb": {"$id": "#/definitions/hudson.plugins.git.browser.BitbucketWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"kilnHG": {"$id": "#/definitions/hudson.plugins.mercurial.browser.KilnHG"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"fishEye": {"$id": "#/definitions/hudson.plugins.mercurial.browser.FishEye"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitLab": {"$id": "#/definitions/hudson.plugins.git.browser.GitLab"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"rhodeCode": {"$id": "#/definitions/hudson.plugins.git.browser.RhodeCode"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"kilnGit": {"$id": "#/definitions/hudson.plugins.git.browser.KilnGit"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GitWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitBlitRepositoryBrowser": {"$id": "#/definitions/hudson.plugins.git.browser.GitBlitRepositoryBrowser"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitoriousWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GitoriousWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"tfs2013": {"$id": "#/definitions/hudson.plugins.git.browser.TFS2013GitRepositoryBrowser"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"rhodeCodeLegacy": {"$id": "#/definitions/hudson.plugins.mercurial.browser.RhodeCodeLegacy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"phabricator": {"$id": "#/definitions/hudson.plugins.git.browser.Phabricator"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"googleCode": {"$id": "#/definitions/hudson.plugins.mercurial.browser.GoogleCode"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gogsGit": {"$id": "#/definitions/hudson.plugins.git.browser.GogsGit"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"fisheye": {"$id": "#/definitions/hudson.plugins.git.browser.FisheyeGitRepositoryBrowser"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"kallithea": {"$id": "#/definitions/hudson.plugins.mercurial.browser.Kallithea"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"githubWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GithubWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"hgWeb": {"$id": "#/definitions/hudson.plugins.mercurial.browser.HgWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"assemblaWeb": {"$id": "#/definitions/hudson.plugins.git.browser.AssemblaWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"stash": {"$id": "#/definitions/hudson.plugins.git.browser.Stash"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "mailaccount": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "address": {"type": "string"},
+                        "smtpHost": {"type": "string"},
+                        "advProperties": {"type": "string"},
+                        "jo": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/net.sf.json.JSONObject"
+                        },
+                        "smtpUsername": {"type": "string"},
+                        "smtpPort": {"type": "string"},
+                        "smtpPassword": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.util.Secret"
+                        },
+                        "useSsl": {"type": "boolean"}
+                    }
+                },
+                "ignorenotifycommit": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "triggersconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "envVar": {"type": "string"},
+                        "skipScmCause": {"type": "boolean"},
+                        "skipUpstreamCause": {"type": "boolean"}
+                    }
+                },
+                "bitbucket": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "fastestWriteSpeed": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.FastestWriteSpeedStrategy$DescriptorImpl"
+                },
+                "gogsgit": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "libraryretriever": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"modernSCM": {"$id": "#/definitions/org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"legacySCM": {"$id": "#/definitions/org.jenkinsci.plugins.workflow.libs.SCMRetriever"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "slackNotifier": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.plugins.slack.SlackNotifier$DescriptorImpl"
+                },
+                "scmsourcetrait": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"tagDiscoveryTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.TagDiscoveryTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitLFSPullTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.GitLFSPullTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"ignoreOnPushNotificationTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.IgnoreOnPushNotificationTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cleanMercurial": {"$id": "#/definitions/hudson.plugins.mercurial.traits.CleanMercurialSCMSourceTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cloneOptionTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.CloneOptionTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"submoduleOptionTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.SubmoduleOptionTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitTool": {"$id": "#/definitions/jenkins.plugins.git.traits.GitToolSCMSourceTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"wipeWorkspaceTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.WipeWorkspaceTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"branchDiscoveryTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.BranchDiscoveryTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"localBranchTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.LocalBranchTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cleanBeforeCheckoutTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.CleanBeforeCheckoutTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubBranchDiscovery": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"discoverOtherRefsTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.DiscoverOtherRefsTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cleanAfterCheckoutTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.CleanAfterCheckoutTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"pruneStaleBranchTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.PruneStaleBranchTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubForkDiscovery": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubSshCheckout": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.SSHCheckoutTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitBrowser": {"$id": "#/definitions/jenkins.plugins.git.traits.GitBrowserSCMSourceTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"refSpecs": {"$id": "#/definitions/jenkins.plugins.git.traits.RefSpecsSCMSourceTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mercurialInstallation": {"$id": "#/definitions/hudson.plugins.mercurial.traits.MercurialInstallationSCMSourceTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"userIdentityTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.UserIdentityTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"headWildcardFilter": {"$id": "#/definitions/jenkins.scm.impl.trait.WildcardSCMHeadFilterTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubTagDiscovery": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.TagDiscoveryTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"authorInChangelogTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.AuthorInChangelogTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mercurialBrowser": {"$id": "#/definitions/hudson.plugins.mercurial.traits.MercurialBrowserSCMSourceTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"checkoutOptionTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.CheckoutOptionTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"originPullRequestDiscoveryTrait": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"headRegexFilter": {"$id": "#/definitions/jenkins.scm.impl.trait.RegexSCMHeadFilterTrait"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"remoteName": {"$id": "#/definitions/jenkins.plugins.git.traits.RemoteNameSCMSourceTrait"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "cgit": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "myView": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.views.MyViewsTabBar$GlobalConfigurationImpl"
+                },
+                "statisticsconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "buildStepUrl": {"type": "string"},
+                        "awsRegion": {"type": "string"},
+                        "projectUrl": {"type": "string"},
+                        "awsAccessKey": {"type": "string"},
+                        "buildInfo": {"type": "boolean"},
+                        "scmCheckoutInfo": {"type": "boolean"},
+                        "shouldSendApiHttpRequests": {"type": "boolean"},
+                        "queueUrl": {"type": "string"},
+                        "awsSecretKey": {"type": "string"},
+                        "scmCheckoutUrl": {"type": "string"},
+                        "buildStepInfo": {"type": "boolean"},
+                        "projectInfo": {"type": "boolean"},
+                        "queueInfo": {"type": "boolean"},
+                        "snsTopicArn": {"type": "string"},
+                        "logbackConfigXmlUrl": {"type": "string"},
+                        "buildUrl": {"type": "string"},
+                        "shouldSendToLogback": {"type": "boolean"},
+                        "shouldPublishToAwsSnsQueue": {"type": "boolean"}
+                    }
+                },
+                "scmsourceretriever": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"scm": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/jenkins.scm.api.SCMSource"
+                    }}
+                },
+                "mavenModuleSet": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.maven.MavenModuleSet$DescriptorImpl"
+                },
+                "scmname": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"name": {"type": "string"}}
+                },
+                "jcloudsartifactmanagerfactory": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"provider": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/io.jenkins.plugins.artifact_manager_jclouds.BlobStoreProvider"
+                    }}
+                },
+                "githubserverconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "apiUrl": {"type": "string"},
+                        "clientCacheSize": {"type": "integer"},
+                        "manageHooks": {"type": "boolean"},
+                        "name": {"type": "string"},
+                        "credentialsId": {"type": "string"}
+                    }
+                },
+                "startedbyuserrestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "usersList": {
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.UserSelector"
+                        },
+                        "acceptAnonymousUsers": {"type": "boolean"},
+                        "acceptAutomaticRuns": {"type": "boolean"},
+                        "checkUpstreamProjects": {"type": "boolean"}
+                    }
+                },
+                "azurekeyvaultglobalconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "keyVaultURL": {"type": "string"},
+                        "credentialID": {"type": "string"}
+                    }
+                },
+                "groovyparser": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "regexp": {"type": "string"},
+                        "name": {"type": "string"},
+                        "id": {"type": "string"},
+                        "script": {"type": "string"},
+                        "example": {"type": "string"}
+                    }
+                },
+                "myview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "perbuildtag": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "gitlfspull": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "shell": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.tasks.Shell$DescriptorImpl"
+                },
+                "diskallocationstrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"fastestReadSpeed": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.FastestReadSpeedStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"fastestWriteSpeed": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.FastestWriteSpeedStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mostUsableSpace": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.MostUsableSpaceStrategy"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "regexscmheadfiltertrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"regex": {"type": "string"}}
+                },
+                "refspectemplate": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"value": {"type": "string"}}
+                },
+                "keycloakSecurityRealm": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.KeycloakSecurityRealm$DescriptorImpl"
+                },
+                "regexnamerestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "checkShortName": {"type": "boolean"},
+                        "regexExpression": {"type": "string"}
+                    }
+                },
+                "groovyscriptpath": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"path": {"type": "string"}}
+                },
+                "gitscm": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "extensions": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.git.extensions.GitSCMExtension"
+                        },
+                        "gitTool": {"type": "string"},
+                        "submoduleCfg": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.git.SubmoduleConfig"
+                        },
+                        "userRemoteConfigs": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.git.UserRemoteConfig"
+                        },
+                        "browser": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.git.browser.GitRepositoryBrowser"
+                        },
+                        "buildChooser": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.git.util.BuildChooser"
+                        },
+                        "doGenerateSubmoduleConfigurations": {"type": "boolean"},
+                        "branches": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.git.BranchSpec"
+                        }
+                    }
+                },
+                "kilnhg": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "hashicorpVault": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/com.datapipe.jenkins.vault.configuration.GlobalVaultConfiguration"
+                },
+                "nodediskpool": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "diskPoolRefId": {"type": "string"},
+                        "nodeDisks": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.nodes.NodeDisk"
+                        }
+                    }
+                },
+                "usageStatistics": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.model.UsageStatistics"
+                },
+                "disableremotepoll": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "checkoutoption": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"timeout": {"type": "integer"}}
+                },
+                "projectNamingStrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.GlobalProjectNamingStrategyConfiguration"
+                },
+                "groupselector": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"selectedGroupId": {"type": "string"}}
+                },
+                "npmconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "providerId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "comment": {"type": "string"},
+                        "id": {"type": "string"},
+                        "registries": {
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.plugins.nodejs.configfiles.NPMRegistry"
+                        },
+                        "content": {"type": "string"}
+                    }
+                },
+                "originpullrequestdiscoverytrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"strategyId": {"type": "integer"}}
+                },
+                "branchspec": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"name": {"type": "string"}}
+                },
+                "changelogtobranch": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"options": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.plugins.git.ChangelogToBranchOptions"
+                    }}
+                },
+                "metricsAccessKey": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.metrics.api.MetricsAccessKey$DescriptorImpl"
+                },
+                "githubtrustpermissions": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "location": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.JenkinsLocationConfiguration"
+                },
+                "gitLabConnectionConfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig"
+                },
+                "stash": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "artifactoryBuilder": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jfrog.hudson.ArtifactoryBuilder$DescriptorImpl"
+                },
+                "pathrestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "excludedRegions": {"type": "string"},
+                        "includedRegions": {"type": "string"}
+                    }
+                },
+                "discoverotherrefstrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "ref": {"type": "string"},
+                        "nameMapping": {"type": "string"}
+                    }
+                },
+                "ivybuildtrigger": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "mercurialbrowserscmsourcetrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"browser": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.plugins.mercurial.browser.HgBrowser"
+                    }}
+                },
+                "jenkinslocationconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "adminAddress": {"type": "string"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "credentialsconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {"type": "string"},
+                        "overridingCredentials": {"type": "boolean"},
+                        "credentialsId": {"type": "string"},
+                        "ignoreCredentialPluginDisabled": {"type": "boolean"},
+                        "username": {"type": "string"}
+                    }
+                },
+                "globalLibraries": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.workflow.libs.GlobalLibraries"
+                },
+                "useridentitytrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"extension": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.plugins.git.extensions.impl.UserIdentity"
+                    }}
+                },
+                "scmheadauthority": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubTrustNobody": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustNobody"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"originChangeRequest": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait$OriginChangeRequestSCMHeadAuthority"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubTrustEveryone": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustEveryone"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubTrustPermissions": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustPermission"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"tag": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.TagDiscoveryTrait$TagSCMHeadAuthority"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubBranchHeadAuthority": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait$BranchSCMHeadAuthority"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubTrustContributors": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustContributors"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"branch": {"$id": "#/definitions/jenkins.plugins.git.traits.BranchDiscoveryTrait$BranchSCMHeadAuthority"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "groovytemplateconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "providerId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "comment": {"type": "string"},
+                        "id": {"type": "string"},
+                        "content": {"type": "string"}
+                    }
+                },
+                "gitscmextension": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"buildChooserSetting": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.BuildChooserSetting"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"preBuildMerge": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.PreBuildMerge"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitLFSPull": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.GitLFSPull"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cleanCheckout": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.CleanCheckout"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"changelogToBranch": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.ChangelogToBranch"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"pathRestriction": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.PathRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"scmName": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.ScmName"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"authorInChangelog": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.AuthorInChangelog"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"checkoutOption": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.CheckoutOption"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"userIdentity": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.UserIdentity"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cloneOption": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.CloneOption"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"disableRemotePoll": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.DisableRemotePoll"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"relativeTargetDirectory": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.RelativeTargetDirectory"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cleanBeforeCheckout": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.CleanBeforeCheckout"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"ignoreNotifyCommit": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.IgnoreNotifyCommit"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"messageExclusion": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.MessageExclusion"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"wipeWorkspace": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.WipeWorkspace"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"userExclusion": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.UserExclusion"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"pruneStaleBranch": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.PruneStaleBranch"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"submoduleOption": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.SubmoduleOption"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"sparseCheckoutPaths": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.SparseCheckoutPaths"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"perBuildTag": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.PerBuildTag"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"localBranch": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.LocalBranch"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "none": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "localrepositorylocator": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"perExecutor": {"$id": "#/definitions/hudson.maven.local_repo.PerExecutorLocalRepositoryLocator"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"default": {"$id": "#/definitions/hudson.maven.local_repo.DefaultLocalRepositoryLocator"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"perJob": {"$id": "#/definitions/hudson.maven.local_repo.PerJobLocalRepositoryLocator"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "gitHubPluginConfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.github.config.GitHubPluginConfig"
+                },
+                "scmsource": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"fromScm": {"$id": "#/definitions/jenkins.scm.impl.SingleSCMSource"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"github": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.GitHubSCMSource"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"git": {"$id": "#/definitions/jenkins.plugins.git.GitSCMSource"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mercurial": {"$id": "#/definitions/hudson.plugins.mercurial.MercurialSCMSource"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "tfs2013gitrepositorybrowser": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "gitlist": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "scmretrycount": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "usagestatistics": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "orjobrestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "first": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                        },
+                        "second": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                        }
+                    }
+                },
+                "descriptorimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "keycloakValidate": {"type": "boolean"},
+                        "keycloakIdp": {"type": "string"},
+                        "keycloakRespectAccessTokenTimeout": {"type": "boolean"},
+                        "keycloakJson": {"type": "string"}
+                    }
+                },
+                "googlecode": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "githubtagdiscovery": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "sonarglobalconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "installations": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.sonar.SonarInstallation"
+                        },
+                        "buildWrapperEnabled": {"type": "boolean"}
+                    }
+                },
+                "localbranch": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"localBranch": {"type": "string"}}
+                },
+                "ancestrybuildchooser": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "ancestorCommitSha1": {"type": "string"},
+                        "maximumAgeInDays": {"type": "integer"}
+                    }
+                },
+                "githubscmsource": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "apiUri": {"type": "string"},
+                        "traits": {
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.scm.api.trait.SCMSourceTrait"
+                        },
+                        "repoOwner": {"type": "string"},
+                        "credentialsId": {"type": "string"},
+                        "id": {"type": "string"},
+                        "repository": {"type": "string"},
+                        "configuredByUrl": {"type": "boolean"},
+                        "repositoryUrl": {"type": "string"}
+                    }
+                },
+                "statisticsConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkins.plugins.statistics.gatherer.StatisticsConfiguration"
+                },
+                "sshcheckouttrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"credentialsId": {"type": "string"}}
+                },
+                "mostUsableSpace": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.MostUsableSpaceStrategy$DescriptorImpl"
+                },
+                "gitSCM": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.plugins.git.GitSCM$DescriptorImpl"
+                },
+                "checkoutoptiontrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"extension": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.plugins.git.extensions.impl.CheckoutOption"
+                    }}
+                },
+                "hgbrowser": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitiles": {"$id": "#/definitions/hudson.plugins.git.browser.Gitiles"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"tFS2013GitRepositoryBrowser": {"$id": "#/definitions/hudson.plugins.git.browser.TFS2013GitRepositoryBrowser"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cGit": {"$id": "#/definitions/hudson.plugins.git.browser.CGit"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitList": {"$id": "#/definitions/hudson.plugins.git.browser.GitList"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"bitBucket": {"$id": "#/definitions/hudson.plugins.mercurial.browser.BitBucket"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"viewGitWeb": {"$id": "#/definitions/hudson.plugins.git.browser.ViewGitWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"redmineWeb": {"$id": "#/definitions/hudson.plugins.git.browser.RedmineWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"bitbucketWeb": {"$id": "#/definitions/hudson.plugins.git.browser.BitbucketWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"kilnHG": {"$id": "#/definitions/hudson.plugins.mercurial.browser.KilnHG"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"fishEye": {"$id": "#/definitions/hudson.plugins.mercurial.browser.FishEye"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitLab": {"$id": "#/definitions/hudson.plugins.git.browser.GitLab"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"rhodeCode": {"$id": "#/definitions/hudson.plugins.git.browser.RhodeCode"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"kilnGit": {"$id": "#/definitions/hudson.plugins.git.browser.KilnGit"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GitWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitBlitRepositoryBrowser": {"$id": "#/definitions/hudson.plugins.git.browser.GitBlitRepositoryBrowser"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitoriousWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GitoriousWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"rhodeCodeLegacy": {"$id": "#/definitions/hudson.plugins.mercurial.browser.RhodeCodeLegacy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"phabricator": {"$id": "#/definitions/hudson.plugins.git.browser.Phabricator"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"googleCode": {"$id": "#/definitions/hudson.plugins.mercurial.browser.GoogleCode"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gogsGit": {"$id": "#/definitions/hudson.plugins.git.browser.GogsGit"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"kallithea": {"$id": "#/definitions/hudson.plugins.mercurial.browser.Kallithea"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"fisheyeGitRepositoryBrowser": {"$id": "#/definitions/hudson.plugins.git.browser.FisheyeGitRepositoryBrowser"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"githubWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GithubWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"hgWeb": {"$id": "#/definitions/hudson.plugins.mercurial.browser.HgWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"assemblaWeb": {"$id": "#/definitions/hudson.plugins.git.browser.AssemblaWeb"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"stash": {"$id": "#/definitions/hudson.plugins.git.browser.Stash"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "mailer": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.tasks.Mailer$DescriptorImpl"
+                },
+                "themeelement": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cssText": {"$id": "#/definitions/org.jenkinsci.plugins.simpletheme.CssTextThemeElement"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"faviconUrl": {"$id": "#/definitions/org.jenkinsci.plugins.simpletheme.FaviconUrlThemeElement"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cssUrl": {"$id": "#/definitions/org.jenkinsci.plugins.simpletheme.CssUrlThemeElement"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jsUrl": {"$id": "#/definitions/org.jenkinsci.plugins.simpletheme.JsUrlThemeElement"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "artifactmanagerfactory": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"jclouds": {"$id": "#/definitions/io.jenkins.plugins.artifact_manager_jclouds.JCloudsArtifactManagerFactory"}}
+                    }],
+                    "type": "object"
+                },
+                "fastestreadspeedstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"estimatedWorkspaceSize": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/long"
+                    }}
+                },
+                "diskinfoprovider": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"noDiskInfo": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.providers.NoDiskInfo"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"userProvidedDiskInfo": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.providers.UserProvidedDiskInfo"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "mostusablespace": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "globalvaultconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"configuration": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/com.datapipe.jenkins.vault.configuration.VaultConfiguration"
+                    }}
+                },
+                "csstextthemeelement": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "text": {"type": "string"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "gittoolscmsourcetrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"gitTool": {"type": "string"}}
+                },
+                "template": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "nodeDiskPools": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.nodes.NodeDiskPool"
+                        },
+                        "label": {"type": "string"}
+                    }
+                },
+                "buildchooser": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"inverse": {"$id": "#/definitions/hudson.plugins.git.util.InverseBuildChooser"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"default": {"$id": "#/definitions/hudson.plugins.git.util.DefaultBuildChooser"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"ancestry": {"$id": "#/definitions/hudson.plugins.git.util.AncestryBuildChooser"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"specificRevision": {"$id": "#/definitions/jenkins.plugins.git.AbstractGitSCMSource$SpecificRevisionBuildChooser"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "mavensettingsconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "serverCredentialMappings": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.security.ServerCredentialMapping"
+                        },
+                        "providerId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "comment": {"type": "string"},
+                        "id": {"type": "string"},
+                        "isReplaceAll": {"type": "boolean"},
+                        "content": {"type": "string"}
+                    }
+                },
+                "exwsGlobalConfigurationTemplates": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.ewm.steps.ExwsStep$DescriptorImpl"
+                },
+                "simple-theme-plugin": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.codefirst.SimpleThemeDecorator"
+                },
+                "xmlconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "providerId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "comment": {"type": "string"},
+                        "id": {"type": "string"},
+                        "content": {"type": "string"}
+                    }
+                },
+                "relativetargetdirectory": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"relativeTargetDir": {"type": "string"}}
+                },
+                "cssurlthemeelement": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "viewstabbar": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "quietperiod": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "submoduleoption": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "reference": {"type": "string"},
+                        "recursiveSubmodules": {"type": "boolean"},
+                        "trackingSubmodules": {"type": "boolean"},
+                        "parentCredentials": {"type": "boolean"},
+                        "timeout": {"type": "integer"},
+                        "disableSubmodules": {"type": "boolean"}
+                    }
+                },
+                "sonarinstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "serverUrl": {"type": "string"},
+                        "additionalAnalysisProperties": {"type": "string"},
+                        "name": {"type": "string"},
+                        "serverAuthenticationToken": {"type": "string"},
+                        "additionalProperties": {"type": "string"},
+                        "triggers": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.sonar.model.TriggersConfig"
+                        },
+                        "mojoVersion": {"type": "string"}
+                    }
+                },
+                "assemblaweb": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "fastestwritespeedstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"estimatedWorkspaceSize": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/long"
+                    }}
+                },
+                "githubtrusteveryone": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "administrativeMonitorsConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.management.AdministrativeMonitorsConfiguration"
+                },
+                "perjob": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "redmineweb": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "cloneoptiontrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"extension": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.plugins.git.extensions.impl.CloneOption"
+                    }}
+                },
+                "githubpluginconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "configs": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.github.config.GitHubServerConfig"
+                        },
+                        "hookSecretConfig": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.github.config.HookSecretConfig"
+                        },
+                        "hookUrl": {"type": "string"}
+                    }
+                },
+                "phabricator": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "repoUrl": {"type": "string"},
+                        "repo": {"type": "string"}
+                    }
+                },
+                "globalDefaultFlowDurabilityLevel": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.workflow.flow.GlobalDefaultFlowDurabilityLevel$DescriptorImpl"
+                },
+                "defaultView": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.views.GlobalDefaultViewConfiguration"
+                },
+                "azureKeyVault": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.azurekeyvaultplugin.AzureKeyVaultGlobalConfiguration"
+                },
+                "nodiskinfo": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "diskpool": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "diskPoolId": {"type": "string"},
+                        "disks": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.definitions.Disk"
+                        },
+                        "displayName": {"type": "string"},
+                        "restriction": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                        },
+                        "description": {"type": "string"},
+                        "workspaceTemplate": {"type": "string"},
+                        "strategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.DiskAllocationStrategy"
+                        }
+                    }
+                },
+                "gitiles": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "gitweb": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "slackuseridresolver": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"no": {"$id": "#/definitions/jenkins.plugins.slack.user.NoSlackUserIdResolver"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"email": {"$id": "#/definitions/jenkins.plugins.slack.user.EmailSlackUserIdResolver"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "copytoslavebuildwrapper": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "gitlabconnection": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "apiTokenId": {"type": "string"},
+                        "readTimeout": {"type": "integer"},
+                        "clientBuilderId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "connectionTimeout": {"type": "integer"},
+                        "url": {"type": "string"},
+                        "ignoreCertificateErrors": {"type": "boolean"}
+                    }
+                },
+                "vaultconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "engineVersion": {"type": "integer"},
+                        "vaultNamespace": {"type": "string"},
+                        "skipSslVerification": {"type": "boolean"},
+                        "failIfNotFound": {"type": "boolean"},
+                        "vaultCredentialId": {"type": "string"},
+                        "vaultUrl": {"type": "string"},
+                        "timeout": {"type": "integer"}
+                    }
+                },
+                "nodeProperties": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.GlobalNodePropertiesConfiguration"
+                },
+                "gitHubConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.GitHubConfiguration"
+                },
+                "cloud": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "cleanbeforecheckout": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "branchdiscoverytrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"strategyId": {"type": "integer"}}
+                },
+                "maventoolchainsconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "providerId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "comment": {"type": "string"},
+                        "id": {"type": "string"},
+                        "content": {"type": "string"}
+                    }
+                },
+                "rhodecodelegacy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "pollSCM": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.triggers.SCMTrigger$DescriptorImpl"
+                },
+                "administrativemonitorsconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "artifactoryserver": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "deployerCredentialsConfig": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.jfrog.hudson.CredentialsConfig"
+                        },
+                        "artifactoryUrl": {"type": "string"},
+                        "deploymentThreads": {"type": "integer"},
+                        "bypassProxy": {"type": "boolean"},
+                        "connectionRetry": {"type": "integer"},
+                        "resolverCredentialsConfig": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.jfrog.hudson.CredentialsConfig"
+                        },
+                        "serverId": {"type": "string"},
+                        "timeout": {"type": "integer"}
+                    }
+                },
+                "scmretriever": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"scm": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.scm.SCM"
+                    }}
+                },
+                "blobstoreprovider": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"s3": {"$id": "#/definitions/io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore"}}
+                    }],
+                    "type": "object"
+                },
+                "fastestwritespeed": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "metricsaccesskey": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "canPing": {"type": "boolean"},
+                        "canMetrics": {"type": "boolean"},
+                        "canThreadDump": {"type": "boolean"},
+                        "canHealthCheck": {"type": "boolean"},
+                        "description": {"type": "string"},
+                        "origins": {"type": "string"},
+                        "key": {"type": "string"}
+                    }
+                },
+                "casCGlobalConfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/io.jenkins.plugins.casc.CasCGlobalConfig"
+                },
+                "viewgitweb": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "repoUrl": {"type": "string"},
+                        "projectName": {"type": "string"}
+                    }
+                },
+                "disk": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "displayName": {"type": "string"},
+                        "diskId": {"type": "string"},
+                        "diskInfo": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.DiskInfoProvider"
+                        },
+                        "masterMountPoint": {"type": "string"},
+                        "physicalPathOnDisk": {"type": "string"}
+                    }
+                },
+                "libraryconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "implicit": {"type": "boolean"},
+                        "allowVersionOverride": {"type": "boolean"},
+                        "retriever": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.workflow.libs.LibraryRetriever"
+                        },
+                        "name": {"type": "string"},
+                        "defaultVersion": {"type": "string"},
+                        "includeInChangesets": {"type": "boolean"}
+                    }
+                },
+                "fisheye": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "perexecutor": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "gitlab": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "repoUrl": {"type": "string"},
+                        "version": {"type": "string"}
+                    }
+                },
+                "submoduleoptiontrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"extension": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.plugins.git.extensions.impl.SubmoduleOption"
+                    }}
+                },
+                "masterbuild": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "mercurialscm": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "subdir": {"type": "string"},
+                        "revisionType": {
+                            "type": "string",
+                            "enum": [
+                                "BRANCH",
+                                "TAG",
+                                "CHANGESET",
+                                "REVSET"
+                            ]
+                        },
+                        "browser": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.mercurial.browser.HgBrowser"
+                        },
+                        "installation": {"type": "string"},
+                        "disableChangeLog": {"type": "boolean"},
+                        "credentialsId": {"type": "string"},
+                        "source": {"type": "string"},
+                        "clean": {"type": "boolean"},
+                        "modules": {"type": "string"},
+                        "revision": {"type": "string"}
+                    }
+                },
+                "useridentity": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "email": {"type": "string"}
+                    }
+                },
+                "no": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "notjobrestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"restriction": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                    }}
+                },
+                "globalSettings": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.plugins.analysis.core.GlobalSettings$DescriptorImpl"
+                },
+                "wipeworkspace": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "copyToSlaveBuildWrapper": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper$DescriptorImpl"
+                },
+                "startedbymemberofgrouprestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "checkUpstreamProjects": {"type": "boolean"},
+                        "groupList": {
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.GroupSelector"
+                        }
+                    }
+                },
+                "userselector": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"selectedUserId": {"type": "string"}}
+                },
+                "forkpullrequestdiscoverytrait": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "trust": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.scm.api.trait.SCMHeadAuthority"
+                        },
+                        "strategyId": {"type": "integer"}
+                    }
+                },
+                "customconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "providerId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "comment": {"type": "string"},
+                        "id": {"type": "string"},
+                        "content": {"type": "string"}
+                    }
+                },
+                "githubtrustnobody": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "smtpauthentication": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.util.Secret"
+                        },
+                        "username": {"type": "string"}
+                    }
+                },
+                "globalmavensettingsconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "serverCredentialMappings": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.security.ServerCredentialMapping"
+                        },
+                        "providerId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "comment": {"type": "string"},
+                        "id": {"type": "string"},
+                        "isReplaceAll": {"type": "boolean"},
+                        "content": {"type": "string"}
+                    }
+                },
+                "jsonconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "providerId": {"type": "string"},
+                        "name": {"type": "string"},
+                        "comment": {"type": "string"},
+                        "id": {"type": "string"},
+                        "content": {"type": "string"}
+                    }
+                },
+                "andjobrestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "first": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                        },
+                        "second": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                        }
+                    }
+                },
+                "servercredentialmapping": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "credentialsId": {"type": "string"},
+                        "serverId": {"type": "string"}
+                    }
+                },
+                "githubweb": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                },
+                "inverse": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "warnings": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "sparsecheckoutpath": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"path": {"type": "string"}}
+                },
+                "extendedEmailPublisher": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.plugins.emailext.ExtendedEmailPublisherDescriptor"
+                },
+                "extendedemailpublisherdescriptor": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "charset": {"type": "string"},
+                        "smtpPort": {"type": "string"},
+                        "defaultContentType": {"type": "string"},
+                        "listId": {"type": "string"},
+                        "advProperties": {"type": "string"},
+                        "defaultPostsendScript": {"type": "string"},
+                        "smtpPassword": {"type": "string"},
+                        "maxAttachmentSizeMb": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/long"
+                        },
+                        "adminRequiredForTemplateTesting": {"type": "boolean"},
+                        "defaultSuffix": {"type": "string"},
+                        "excludedCommitters": {"type": "string"},
+                        "allowedDomains": {"type": "string"},
+                        "watchingEnabled": {"type": "boolean"},
+                        "smtpUsername": {"type": "string"},
+                        "allowUnregisteredEnabled": {"type": "boolean"},
+                        "defaultRecipients": {"type": "string"},
+                        "addAccounts": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.emailext.MailAccount"
+                        },
+                        "defaultBody": {"type": "string"},
+                        "useSsl": {"type": "boolean"},
+                        "defaultClasspath": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.emailext.GroovyScriptPath"
+                        },
+                        "smtpServer": {"type": "string"},
+                        "defaultReplyTo": {"type": "string"},
+                        "defaultSubject": {"type": "string"},
+                        "maxAttachmentSize": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/long"
+                        },
+                        "defaultPresendScript": {"type": "string"},
+                        "precedenceBulk": {"type": "boolean"},
+                        "debugMode": {"type": "boolean"}
+                    }
+                },
+                "changelogtobranchoptions": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "compareRemote": {"type": "string"},
+                        "compareTarget": {"type": "string"}
+                    }
+                },
+                "artifactManager": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.ArtifactManagerConfiguration"
+                },
+                "any": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "jsurlthemeelement": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"url": {"type": "string"}}
+                },
+                "exwsGlobalConfigurationDiskPools": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.ewm.steps.ExwsAllocateStep$DescriptorImpl"
+                },
+                "kilngit": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"repoUrl": {"type": "string"}}
+                }
+            }
+        },
+        "credentials": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the credentials classifier",
+            "properties": {
+                "vaultapprolecredential": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "path": {"type": "string"},
+                        "roleId": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "secretId": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.util.Secret"
+                        },
+                        "id": {"type": "string"}
+                    }
+                },
+                "credentials": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"dockerDirectory": {"$id": "#/definitions/com.nirima.jenkins.plugins.docker.utils.DockerDirectoryCredentials"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"vaultGCPCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultGCPCredential"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"string": {"$id": "#/definitions/org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"vaultTokenFileCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultTokenFileCredential"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"vaultAppRoleCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultAppRoleCredential"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"basicSSHUserPrivateKey": {"$id": "#/definitions/com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"vaultKubernetesCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultKubernetesCredential"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"certificate": {"$id": "#/definitions/com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"openShiftBearerTokenCredentialImpl": {"$id": "#/definitions/org.jenkinsci.plugins.kubernetes.credentials.OpenShiftBearerTokenCredentialImpl"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"secretString": {"$id": "#/definitions/com.microsoft.jenkins.keyvault.SecretStringCredentials"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitLabApiTokenImpl": {"$id": "#/definitions/com.dabsquared.gitlabjenkins.connection.GitLabApiTokenImpl"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"vaultGithubTokenCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultGithubTokenCredential"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"vaultTokenCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultTokenCredential"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"usernamePassword": {"$id": "#/definitions/com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"vaultUsernamePasswordCredentialImpl": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.common.VaultUsernamePasswordCredentialImpl"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"dockerServer": {"$id": "#/definitions/org.jenkinsci.plugins.docker.commons.credentials.DockerServerCredentials"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"azureMsi": {"$id": "#/definitions/com.microsoft.azure.util.AzureMsiCredentials"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"azureImds": {"$id": "#/definitions/com.microsoft.azure.util.AzureImdsCredentials"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"file": {"$id": "#/definitions/org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"secretCertificate": {"$id": "#/definitions/com.microsoft.jenkins.keyvault.SecretCertificateCredentials"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"openShiftTokenCredentialImpl": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.OpenShiftTokenCredentialImpl"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"aws": {"$id": "#/definitions/com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsImpl"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"azure": {"$id": "#/definitions/com.microsoft.azure.util.AzureCredentials"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "openshiftbearertokencredentialimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "username": {"type": "string"}
+                    }
+                },
+                "vaulttokenfilecredential": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "filepath": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"}
+                    }
+                },
+                "keystoresource": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"uploaded": {"$id": "#/definitions/com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"}}
+                    }],
+                    "type": "object"
+                },
+                "dockerserver": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "hostnameportspecification": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "excludes": {"type": "string"},
+                        "includes": {"type": "string"}
+                    }
+                },
+                "vaultusernamepasswordcredentialimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "engineVersion": {"type": "integer"},
+                        "path": {"type": "string"},
+                        "usernameKey": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "passwordKey": {"type": "string"}
+                    }
+                },
+                "vaultgithubtokencredential": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "accessToken": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.util.Secret"
+                        }
+                    }
+                },
+                "dockerservercredentials": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "clientCertificate": {"type": "string"},
+                        "clientKey": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "serverCaCertificate": {"type": "string"},
+                        "description": {"type": "string"},
+                        "id": {"type": "string"}
+                    }
+                },
+                "vaulttokencredential": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "token": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.util.Secret"
+                        }
+                    }
+                },
+                "basicsshuserprivatekey": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "privateKeySource": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey$PrivateKeySource"
+                        },
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "passphrase": {"type": "string"},
+                        "id": {"type": "string"},
+                        "username": {"type": "string"}
+                    }
+                },
+                "awscredentialsimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "secretKey": {"type": "string"},
+                        "accessKey": {"type": "string"},
+                        "iamRoleArn": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "iamMfaSerialNumber": {"type": "string"},
+                        "id": {"type": "string"}
+                    }
+                },
+                "gitlabapitokenimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "apiToken": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.util.Secret"
+                        },
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"}
+                    }
+                },
+                "azurecredentials": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "clientId": {"type": "string"},
+                        "certificateId": {"type": "string"},
+                        "activeDirectoryEndpoint": {"type": "string"},
+                        "graphEndpoint": {"type": "string"},
+                        "description": {"type": "string"},
+                        "azureEnvironmentName": {"type": "string"},
+                        "managementEndpoint": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "clientSecret": {"type": "string"},
+                        "id": {"type": "string"},
+                        "subscriptionId": {"type": "string"},
+                        "tenant": {"type": "string"},
+                        "resourceManagerEndpoint": {"type": "string"}
+                    }
+                },
+                "uploadedkeystoresource": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"uploadedKeystore": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/com.cloudbees.plugins.credentials.SecretBytes"
+                    }}
+                },
+                "vaultkubernetescredential": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "role": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"}
+                    }
+                },
+                "openshifttokencredentialimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "secret": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.util.Secret"
+                        }
+                    }
+                },
+                "domainspecification": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"dockerServer": {"$id": "#/definitions/org.jenkinsci.plugins.docker.commons.credentials.DockerServerDomainSpecification"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mavenServerIdSpecification": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.security.MavenServerIdSpecification"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"schemeSpecification": {"$id": "#/definitions/com.cloudbees.plugins.credentials.domains.SchemeSpecification"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"hostnamePortSpecification": {"$id": "#/definitions/com.cloudbees.plugins.credentials.domains.HostnamePortSpecification"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"pathSpecification": {"$id": "#/definitions/com.cloudbees.plugins.credentials.domains.PathSpecification"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"hostnameSpecification": {"$id": "#/definitions/com.cloudbees.plugins.credentials.domains.HostnameSpecification"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "domaincredentials": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "credentials": {
+                            "type": "object",
+                            "$id": "#/definitions/com.cloudbees.plugins.credentials.Credentials"
+                        },
+                        "domain": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.cloudbees.plugins.credentials.domains.Domain"
+                        }
+                    }
+                },
+                "usernamepasswordcredentialsimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "username": {"type": "string"}
+                    }
+                },
+                "schemespecification": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"schemes": {"type": "string"}}
+                },
+                "vaultgcpcredential": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "audience": {"type": "string"},
+                        "role": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"}
+                    }
+                },
+                "directentryprivatekeysource": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"privateKey": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.util.Secret"
+                    }}
+                },
+                "certificatecredentialsimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "keyStoreSource": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$KeyStoreSource"
+                        }
+                    }
+                },
+                "secretcertificatecredentials": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.util.Secret"
+                        },
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "secretIdentifier": {"type": "string"},
+                        "servicePrincipalId": {"type": "string"}
+                    }
+                },
+                "secretstringcredentials": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "secretIdentifier": {"type": "string"},
+                        "servicePrincipalId": {"type": "string"}
+                    }
+                },
+                "system": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/com.cloudbees.plugins.credentials.SystemCredentialsProvider"
+                },
+                "azuremsicredentials": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "msiPort": {"type": "integer"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "azureEnvName": {"type": "string"}
+                    }
+                },
+                "privatekeysource": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"directEntry": {"$id": "#/definitions/com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey$DirectEntryPrivateKeySource"}}
+                    }],
+                    "type": "object"
+                },
+                "filecredentialsimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "fileName": {"type": "string"},
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "secretBytes": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.cloudbees.plugins.credentials.SecretBytes"
+                        }
+                    }
+                },
+                "domain": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "description": {"type": "string"},
+                        "specifications": {
+                            "type": "object",
+                            "$id": "#/definitions/com.cloudbees.plugins.credentials.domains.DomainSpecification"
+                        }
+                    }
+                },
+                "pathspecification": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "excludes": {"type": "string"},
+                        "caseSensitive": {"type": "boolean"},
+                        "includes": {"type": "string"}
+                    }
+                },
+                "stringcredentialsimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "secret": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.util.Secret"
+                        }
+                    }
+                },
+                "hostnamespecification": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "excludes": {"type": "string"},
+                        "includes": {"type": "string"}
+                    }
+                },
+                "mavenserveridspecification": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "excludes": {"type": "string"},
+                        "includes": {"type": "string"}
+                    }
+                },
+                "azureimdscredentials": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "scope": {
+                            "type": "string",
+                            "enum": [
+                                "SYSTEM",
+                                "GLOBAL",
+                                "USER"
+                            ]
+                        },
+                        "description": {"type": "string"},
+                        "id": {"type": "string"},
+                        "azureEnvName": {"type": "string"}
+                    }
+                }
+            }
+        },
+        "jobs": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the jobs classifier",
+            "properties": {
+                "": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/javaposse.jobdsl.plugin.casc.ScriptSource"
+                },
+                "scriptsource": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"file": {"$id": "#/definitions/javaposse.jobdsl.plugin.casc.FromFileScriptSource"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"script": {"$id": "#/definitions/javaposse.jobdsl.plugin.casc.InlineGroovyScriptSource"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"url": {"$id": "#/definitions/javaposse.jobdsl.plugin.casc.FromUrlScriptSource"}}
+                        }
+                    ],
+                    "type": "object"
+                }
+            }
+        },
+        "configuration-as-code": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the configuration-as-code classifier",
+            "properties": {
+                "restricted": {
+                    "type": "string",
+                    "enum": [
+                        "reject",
+                        "beta",
+                        "warn"
+                    ]
+                },
+                "deprecated": {
+                    "type": "string",
+                    "enum": [
+                        "reject",
+                        "warn"
+                    ]
+                },
+                "version": {
+                    "type": "string",
+                    "enum": ["1"]
+                },
+                "unknown": {
+                    "type": "string",
+                    "enum": [
+                        "reject",
+                        "warn"
+                    ]
+                }
+            }
+        },
+        "jenkins": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the jenkins classifier",
+            "properties": {
+                "roledefinition": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "assignments": {"type": "string"},
+                        "permissions": {"type": "string"},
+                        "name": {"type": "string"},
+                        "pattern": {"type": "string"},
+                        "description": {"type": "string"}
+                    }
+                },
+                "listview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "includeRegex": {"type": "string"},
+                        "columns": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.views.ListViewColumn"
+                        },
+                        "recurse": {"type": "boolean"},
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.ViewProperty"
+                        },
+                        "jobFilters": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.views.ViewJobFilter"
+                        }
+                    }
+                },
+                "kubernetesslave": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "nodeName": {"type": "string"},
+                        "template": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PodTemplate"
+                        },
+                        "rs": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
+                        },
+                        "labelStr": {"type": "string"},
+                        "nodeDescription": {"type": "string"},
+                        "userId": {"type": "string"},
+                        "nodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        },
+                        "mode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "numExecutors": {"type": "integer"},
+                        "retentionStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
+                        },
+                        "cloudName": {"type": "string"},
+                        "labelString": {"type": "string"},
+                        "launcher": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
+                        }
+                    }
+                },
+                "computerlauncher": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"simpleCommandLauncher": {"$id": "#/definitions/org.jvnet.hudson.test.SimpleCommandLauncher"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jnlp": {"$id": "#/definitions/hudson.slaves.JNLPLauncher"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"ssh": {"$id": "#/definitions/hudson.plugins.sshslaves.SSHLauncher"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"command": {"$id": "#/definitions/hudson.slaves.CommandLauncher"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "remotingworkdirsettings": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "internalDir": {"type": "string"},
+                        "disabled": {"type": "boolean"},
+                        "failIfWorkDirIsMissing": {"type": "boolean"},
+                        "workDirPath": {"type": "string"}
+                    }
+                },
+                "sshlauncher": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "maxNumRetries": {"type": "integer"},
+                        "sshHostKeyVerificationStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategy"
+                        },
+                        "launchTimeoutSeconds": {"type": "integer"},
+                        "credentialsId": {"type": "string"},
+                        "jvmOptions": {"type": "string"},
+                        "suffixStartSlaveCmd": {"type": "string"},
+                        "port": {"type": "integer"},
+                        "javaPath": {"type": "string"},
+                        "host": {"type": "string"},
+                        "prefixStartSlaveCmd": {"type": "string"},
+                        "workDir": {"type": "string"},
+                        "retryWaitTime": {"type": "integer"},
+                        "tcpNoDelay": {"type": "boolean"}
+                    }
+                },
+                "caseinsensitive": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "quietPeriod": {"type": "integer"},
+                "markupformatter": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"rawHtml": {"$id": "#/definitions/hudson.markup.RawHtmlMarkupFormatter"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"plainText": {"$id": "#/definitions/hudson.markup.EscapedMarkupFormatter"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "jDKs": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.model.JDK"
+                },
+                "itemcolumn": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "antinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "retentionstrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"always": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Always"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"dockerOnce": {"$id": "#/definitions/com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"schedule": {"$id": "#/definitions/hudson.slaves.SimpleScheduledRetentionStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"demand": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Demand"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "defaultcrumbissuer": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"excludeClientIPFromCrumb": {"type": "boolean"}}
+                },
+                "manuallytrustedkeyverificationstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"requireInitialManualTrust": {"type": "boolean"}}
+                },
+                "containerenvvar": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "value": {"type": "string"},
+                        "key": {"type": "string"}
+                    }
+                },
+                "ec2tag": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "value": {"type": "string"}
+                    }
+                },
+                "githubbranchfilter": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "maveninstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "rolebasedauthorizationstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"roles": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/org.jenkinsci.plugins.rolestrategy.casc.GrantedRoles"
+                    }}
+                },
+                "nodeproperty": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"toolLocation": {"$id": "#/definitions/hudson.tools.ToolLocationNodeProperty"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"envVars": {"$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"exwsNodeConfigurationDiskPools": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.nodes.ExternalWorkspaceProperty"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"authorizationMatrix": {"$id": "#/definitions/org.jenkinsci.plugins.matrixauth.AuthorizationMatrixNodeProperty"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jobRestrictionProperty": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.nodes.JobRestrictionProperty"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "ec2spotslave": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "idleTerminationMinutes": {"type": "string"},
+                        "nodeName": {"type": "string"},
+                        "jvmopts": {"type": "string"},
+                        "description": {"type": "string"},
+                        "nodeDescription": {"type": "string"},
+                        "launchTimeout": {"type": "integer"},
+                        "userId": {"type": "string"},
+                        "maxTotalUses": {"type": "integer"},
+                        "nodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        },
+                        "remoteAdmin": {"type": "string"},
+                        "tags": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.ec2.EC2Tag"
+                        },
+                        "mode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "tmpDir": {"type": "string"},
+                        "numExecutors": {"type": "integer"},
+                        "retentionStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
+                        },
+                        "spotInstanceRequestId": {"type": "string"},
+                        "cloudName": {"type": "string"},
+                        "labelString": {"type": "string"},
+                        "name": {"type": "string"},
+                        "connectionStrategy": {
+                            "type": "string",
+                            "enum": [
+                                "Public DNS",
+                                "Public IP",
+                                "Private DNS",
+                                "Private IP"
+                            ]
+                        },
+                        "amiType": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.ec2.AMITypeData"
+                        },
+                        "initScript": {"type": "string"},
+                        "remoteFS": {"type": "string"},
+                        "launcher": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
+                        }
+                    }
+                },
+                "demand": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "idleDelay": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/long"
+                        },
+                        "inDemandDelay": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/long"
+                        }
+                    }
+                },
+                "dockerserverendpoint": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "credentialsId": {"type": "string"},
+                        "uri": {"type": "string"}
+                    }
+                },
+                "proxy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.ProxyConfiguration"
+                },
+                "node": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"eC2OndemandSlave": {"$id": "#/definitions/hudson.plugins.ec2.EC2OndemandSlave"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"pretendSlave": {"$id": "#/definitions/org.jvnet.hudson.test.PretendSlave"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"batchSlave": {"$id": "#/definitions/org.jenkinsci.plugins.sge.BatchSlave"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"permanent": {"$id": "#/definitions/hudson.slaves.DumbSlave"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"eC2SpotSlave": {"$id": "#/definitions/hudson.plugins.ec2.EC2SpotSlave"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"kubernetesSlave": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jenkins": {"$id": "#/definitions/jenkins.model.Jenkins"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mesosSlave": {"$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlave"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "gitbranchspecifiercolumn": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "nodejsinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "npmPackagesRefreshHours": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/long"
+                        },
+                        "id": {"type": "string"},
+                        "npmPackages": {"type": "string"},
+                        "force32Bit": {"type": "boolean"}
+                    }
+                },
+                "fullcontrolonceloggedinauthorizationstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"allowAnonymousRead": {"type": "boolean"}}
+                },
+                "dockeronceretentionstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"idleMinutes": {"type": "integer"}}
+                },
+                "toolproperty": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}}
+                    }],
+                    "type": "object"
+                },
+                "persistentvolumeclaim": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "mountPath": {"type": "string"},
+                        "claimName": {"type": "string"},
+                        "readOnly": {"type": "boolean"}
+                    }
+                },
+                "securityrealm": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"github": {"$id": "#/definitions/org.jenkinsci.plugins.GithubSecurityRealm"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"keycloak": {"$id": "#/definitions/org.jenkinsci.plugins.KeycloakSecurityRealm"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacySecurityRealm"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"ldap": {"$id": "#/definitions/hudson.security.LDAPSecurityRealm"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"activeDirectory": {"$id": "#/definitions/hudson.plugins.active_directory.ActiveDirectorySecurityRealm"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"local": {"$id": "#/definitions/hudson.security.HudsonPrivateSecurityRealm"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "knownhostsfilekeyverificationstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "classselector": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"selectedClass": {"type": "string"}}
+                },
+                "activedirectorydomain": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "site": {"type": "string"},
+                        "servers": {"type": "string"},
+                        "bindName": {"type": "string"},
+                        "bindPassword": {"type": "string"},
+                        "name": {"type": "string"}
+                    }
+                },
+                "amazonec2cloud": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "noDelayProvisioning": {"type": "boolean"},
+                        "privateKey": {"type": "string"},
+                        "instanceCapStr": {"type": "string"},
+                        "cloudName": {"type": "string"},
+                        "roleArn": {"type": "string"},
+                        "roleSessionName": {"type": "string"},
+                        "templates": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.ec2.SlaveTemplate"
+                        },
+                        "testMode": {"type": "boolean"},
+                        "credentialsId": {"type": "string"},
+                        "region": {"type": "string"},
+                        "useInstanceProfileForCredentials": {"type": "boolean"}
+                    }
+                },
+                "ldapgroupmembershipstrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"fromUserRecord": {"$id": "#/definitions/jenkins.security.plugins.ldap.FromUserRecordLDAPGroupMembershipStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"fromGroupSearch": {"$id": "#/definitions/jenkins.security.plugins.ldap.FromGroupSearchLDAPGroupMembershipStrategy"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "podtemplate": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "slaveConnectTimeoutStr": {"type": "string"},
+                        "instanceCapStr": {"type": "string"},
+                        "imagePullSecrets": {
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PodImagePullSecret"
+                        },
+                        "envVars": {
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar"
+                        },
+                        "instanceCap": {"type": "integer"},
+                        "volumes": {
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.PodVolume"
+                        },
+                        "workspaceVolume": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.WorkspaceVolume"
+                        },
+                        "annotations": {
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PodAnnotation"
+                        },
+                        "idleMinutesStr": {"type": "string"},
+                        "serviceAccount": {"type": "string"},
+                        "label": {"type": "string"},
+                        "idleMinutes": {"type": "integer"},
+                        "nodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolLocationNodeProperty"
+                        },
+                        "nodeSelector": {"type": "string"},
+                        "inheritFrom": {"type": "string"},
+                        "customWorkspaceVolumeEnabled": {"type": "boolean"},
+                        "nodeUsageMode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "name": {"type": "string"},
+                        "namespace": {"type": "string"},
+                        "containers": {
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate"
+                        },
+                        "slaveConnectTimeout": {"type": "integer"},
+                        "activeDeadlineSecondsStr": {"type": "string"},
+                        "activeDeadlineSeconds": {"type": "integer"},
+                        "yaml": {"type": "string"}
+                    }
+                },
+                "lastfailure": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "nodedisk": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "nodeMountPoint": {"type": "string"},
+                        "diskRefId": {"type": "string"}
+                    }
+                },
+                "plaintext": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "unsecured": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "jdk": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "jobrestriction": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"multipleAnd": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.MultipleAndJobRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"not": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.NotJobRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"or": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.OrJobRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"multipleOr": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.MultipleOrJobRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"and": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.AndJobRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"startedByMemberOfGroupRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.StartedByMemberOfGroupRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"regexNameRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.RegexNameRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"startedByUserRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.StartedByUserRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jobClassNameRestriction": {"$id": "#/definitions/io.jenkins.plugins.jobrestrictions.restrictions.job.JobClassNameRestriction"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"any": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.AnyJobRestriction"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "secretvolume": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "mountPath": {"type": "string"},
+                        "secretName": {"type": "string"}
+                    }
+                },
+                "allview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.ViewProperty"
+                        }
+                    }
+                },
+                "projectnamingstrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"standard": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"pattern": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$PatternProjectNamingStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"roleBased": {"$id": "#/definitions/org.jenkinsci.plugins.rolestrategy.RoleBasedProjectNamingStrategy"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "githubauthorizationstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "adminUserNames": {"type": "string"},
+                        "authenticatedUserCreateJobPermission": {"type": "boolean"},
+                        "organizationNames": {"type": "string"},
+                        "authenticatedUserReadPermission": {"type": "boolean"},
+                        "allowAnonymousReadPermission": {"type": "boolean"},
+                        "allowGithubWebHookPermission": {"type": "boolean"},
+                        "allowCcTrayPermission": {"type": "boolean"},
+                        "useRepositoryPermissions": {"type": "boolean"},
+                        "allowAnonymousJobStatusPermission": {"type": "boolean"}
+                    }
+                },
+                "sbtinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "standard": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "warningscolumn": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "inheritancestrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"inheritingGlobal": {"$id": "#/definitions/org.jenkinsci.plugins.matrixauth.inheritance.InheritGlobalStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"nonInheriting": {"$id": "#/definitions/org.jenkinsci.plugins.matrixauth.inheritance.NonInheritingStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"inheriting": {"$id": "#/definitions/org.jenkinsci.plugins.matrixauth.inheritance.InheritParentStrategy"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "view": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"": {"$id": "#/definitions/jenkins.branch.MultiBranchProjectViewHolder$ViewImpl"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"all": {"$id": "#/definitions/hudson.model.AllView"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"proxy": {"$id": "#/definitions/hudson.model.ProxyView"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"myView": {"$id": "#/definitions/hudson.model.MyView"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"list": {"$id": "#/definitions/hudson.model.ListView"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "batchcommandinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "label": {"type": "string"},
+                        "toolHome": {"type": "string"},
+                        "command": {"type": "string"}
+                    }
+                },
+                "githubsecurityrealm": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "captchaSupport": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
+                        },
+                        "githubWebUri": {"type": "string"},
+                        "clientID": {"type": "string"},
+                        "githubApiUri": {"type": "string"},
+                        "clientSecret": {"type": "string"},
+                        "oauthScopes": {"type": "string"}
+                    }
+                },
+                "listviewcolumn": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jobName": {"$id": "#/definitions/hudson.views.JobColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"warningsColumn": {"$id": "#/definitions/hudson.plugins.warnings.WarningsColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"buildButton": {"$id": "#/definitions/hudson.views.BuildButtonColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mercurialRevisionColumn": {"$id": "#/definitions/hudson.plugins.mercurial.MercurialRevisionColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"lastStable": {"$id": "#/definitions/hudson.views.LastStableColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"itemColumn": {"$id": "#/definitions/jenkins.branch.ItemColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"lastSuccess": {"$id": "#/definitions/hudson.views.LastSuccessColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"lastDuration": {"$id": "#/definitions/hudson.views.LastDurationColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitBranchSpecifierColumn": {"$id": "#/definitions/hudson.plugins.git.GitBranchSpecifierColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"weather": {"$id": "#/definitions/hudson.views.WeatherColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"branchStatusColumn": {"$id": "#/definitions/jenkins.branch.BranchStatusColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"lastFailure": {"$id": "#/definitions/hudson.views.LastFailureColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"descriptionColumn": {"$id": "#/definitions/jenkins.branch.DescriptionColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"status": {"$id": "#/definitions/hudson.views.StatusColumn"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "injectsshkey": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"user": {"type": "string"}}
+                },
+                "authorizationstrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"projectMatrix": {"$id": "#/definitions/hudson.security.ProjectMatrixAuthorizationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"globalMatrix": {"$id": "#/definitions/hudson.security.GlobalMatrixAuthorizationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"github": {"$id": "#/definitions/org.jenkinsci.plugins.GithubAuthorizationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacyAuthorizationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"loggedInUsersCanDoAnything": {"$id": "#/definitions/hudson.security.FullControlOnceLoggedInAuthorizationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"roleBased": {"$id": "#/definitions/com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"unsecured": {"$id": "#/definitions/hudson.security.AuthorizationStrategy$Unsecured"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "nfsvolume": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "serverPath": {"type": "string"},
+                        "mountPath": {"type": "string"},
+                        "serverAddress": {"type": "string"},
+                        "readOnly": {"type": "boolean"}
+                    }
+                },
+                "zipextractioninstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "subdir": {"type": "string"},
+                        "label": {"type": "string"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "test": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "rawBuildsDir": {"type": "string"},
+                "adminwhitelistrule": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"enabled": {"type": "boolean"}}
+                },
+                "startedbyuserrestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "usersList": {
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.UserSelector"
+                        },
+                        "acceptAnonymousUsers": {"type": "boolean"},
+                        "acceptAutomaticRuns": {"type": "boolean"},
+                        "checkUpstreamProjects": {"type": "boolean"}
+                    }
+                },
+                "rolebasedprojectnamingstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"forceExistingJobs": {"type": "boolean"}}
+                },
+                "volume": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "readOnly": {"type": "boolean"},
+                        "containerPath": {"type": "string"},
+                        "hostPath": {"type": "string"}
+                    }
+                },
+                "myview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.ViewProperty"
+                        }
+                    }
+                },
+                "manuallyconfiguredsshkey": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "sshHostKeyVerificationStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategy"
+                        },
+                        "credentialsId": {"type": "string"}
+                    }
+                },
+                "mesoscloud": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "checkpoint": {"type": "boolean"},
+                        "role": {"type": "string"},
+                        "slavesUser": {"type": "string"},
+                        "frameworkName": {"type": "string"},
+                        "description": {"type": "string"},
+                        "credentialsId": {"type": "string"},
+                        "jenkinsURL": {"type": "string"},
+                        "onDemandRegistration": {"type": "boolean"},
+                        "nfsRemoteFSRoot": {"type": "boolean"},
+                        "master": {"type": "string"},
+                        "slaveInfos": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo"
+                        },
+                        "declineOfferDuration": {"type": "string"},
+                        "cloudID": {"type": "string"},
+                        "nativeLibraryPath": {"type": "string"}
+                    }
+                },
+                "podenvvar": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "value": {"type": "string"},
+                        "key": {"type": "string"}
+                    }
+                },
+                "regexnamerestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "checkShortName": {"type": "boolean"},
+                        "regexExpression": {"type": "string"}
+                    }
+                },
+                "spotconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "fallbackToOndemand": {"type": "boolean"},
+                        "useBidPrice": {"type": "boolean"},
+                        "spotBlockReservationDurationStr": {"type": "string"},
+                        "spotMaxBidPrice": {"type": "string"}
+                    }
+                },
+                "emptydirworkspacevolume": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"memory": {"type": "boolean"}}
+                },
+                "simplescheduledretentionstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "keepUpWhenActive": {"type": "boolean"},
+                        "startTimeSpec": {"type": "string"},
+                        "upTimeMins": {"type": "integer"}
+                    }
+                },
+                "podannotation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "value": {"type": "string"},
+                        "key": {"type": "string"}
+                    }
+                },
+                "mesosslaveinfo": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "idleTerminationMinutes": {"type": "string"},
+                        "slaveMem": {"type": "string"},
+                        "minExecutors": {"type": "string"},
+                        "remoteFSRoot": {"type": "string"},
+                        "slaveCpus": {"type": "string"},
+                        "defaultSlave": {"type": "string"},
+                        "slaveAttributes": {"type": "string"},
+                        "diskNeeded": {"type": "string"},
+                        "nodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        },
+                        "mode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "jvmArgs": {"type": "string"},
+                        "labelString": {"type": "string"},
+                        "containerInfo": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$ContainerInfo"
+                        },
+                        "executorCpus": {"type": "string"},
+                        "executorMem": {"type": "string"},
+                        "jnlpArgs": {"type": "string"},
+                        "additionalURIs": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$URI"
+                        },
+                        "maxExecutors": {"type": "string"}
+                    }
+                },
+                "workspacevolume": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"hostPathWorkspaceVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.HostPathWorkspaceVolume"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"emptyDirWorkspaceVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.EmptyDirWorkspaceVolume"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"nfsWorkspaceVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.NfsWorkspaceVolume"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"persistentVolumeClaimWorkspaceVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.PersistentVolumeClaimWorkspaceVolume"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "proxyconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {"type": "string"},
+                        "port": {"type": "integer"},
+                        "name": {"type": "string"},
+                        "testUrl": {"type": "string"},
+                        "userName": {"type": "string"},
+                        "noProxyHost": {"type": "string"}
+                    }
+                },
+                "nfsworkspacevolume": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "serverPath": {"type": "string"},
+                        "serverAddress": {"type": "string"},
+                        "readOnly": {"type": "boolean"}
+                    }
+                },
+                "nodediskpool": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "diskPoolRefId": {"type": "string"},
+                        "nodeDisks": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.nodes.NodeDisk"
+                        }
+                    }
+                },
+                "containertemplate": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "image": {"type": "string"},
+                        "livenessProbe": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.ContainerLivenessProbe"
+                        },
+                        "resourceRequestMemory": {"type": "string"},
+                        "workingDir": {"type": "string"},
+                        "envVars": {
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar"
+                        },
+                        "resourceLimitMemory": {"type": "string"},
+                        "ports": {
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PortMapping"
+                        },
+                        "command": {"type": "string"},
+                        "args": {"type": "string"},
+                        "privileged": {"type": "boolean"},
+                        "resourceLimitCpu": {"type": "string"},
+                        "alwaysPullImage": {"type": "boolean"},
+                        "shell": {"type": "string"},
+                        "resourceRequestCpu": {"type": "string"},
+                        "ttyEnabled": {"type": "boolean"},
+                        "name": {"type": "string"}
+                    }
+                },
+                "groupselector": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"selectedGroupId": {"type": "string"}}
+                },
+                "buildbutton": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "containerlivenessprobe": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "execArgs": {"type": "string"},
+                        "failureThreshold": {"type": "integer"},
+                        "periodSeconds": {"type": "integer"},
+                        "timeoutSeconds": {"type": "integer"},
+                        "successThreshold": {"type": "integer"},
+                        "initialDelaySeconds": {"type": "integer"}
+                    }
+                },
+                "disableRememberMe": {"type": "boolean"},
+                "legacysecurityrealm": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"captchaSupport": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
+                    }}
+                },
+                "toollocation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "key": {"type": "string"},
+                        "home": {"type": "string"}
+                    }
+                },
+                "ec2ondemandslave": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "nodeName": {"type": "string"},
+                        "description": {"type": "string"},
+                        "privateDNS": {"type": "string"},
+                        "nodeDescription": {"type": "string"},
+                        "nodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        },
+                        "mode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "tmpDir": {"type": "string"},
+                        "numExecutors": {"type": "integer"},
+                        "retentionStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
+                        },
+                        "instanceId": {"type": "string"},
+                        "labelString": {"type": "string"},
+                        "connectionStrategy": {
+                            "type": "string",
+                            "enum": [
+                                "Public DNS",
+                                "Public IP",
+                                "Private DNS",
+                                "Private IP"
+                            ]
+                        },
+                        "idleTerminationMinutes": {"type": "string"},
+                        "jvmopts": {"type": "string"},
+                        "stopOnTerminate": {"type": "boolean"},
+                        "useDedicatedTenancy": {"type": "boolean"},
+                        "launchTimeout": {"type": "integer"},
+                        "userId": {"type": "string"},
+                        "maxTotalUses": {"type": "integer"},
+                        "remoteAdmin": {"type": "string"},
+                        "tags": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.ec2.EC2Tag"
+                        },
+                        "cloudName": {"type": "string"},
+                        "name": {"type": "string"},
+                        "amiType": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.ec2.AMITypeData"
+                        },
+                        "initScript": {"type": "string"},
+                        "publicDNS": {"type": "string"},
+                        "remoteFS": {"type": "string"},
+                        "launcher": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
+                        }
+                    }
+                },
+                "idstrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"caseSensitive": {"$id": "#/definitions/jenkins.model.IdStrategy$CaseSensitive"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"caseInsensitive": {"$id": "#/definitions/jenkins.model.IdStrategy$CaseInsensitive"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"caseSensitiveEmailAddress": {"$id": "#/definitions/jenkins.model.IdStrategy$CaseSensitiveEmailAddress"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "jobrestrictionproperty": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"jobRestriction": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                    }}
+                },
+                "sshkeystrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"manuallyConfiguredSSHKey": {"$id": "#/definitions/io.jenkins.docker.connector.DockerComputerSSHConnector$ManuallyConfiguredSSHKey"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"injectSSHKey": {"$id": "#/definitions/io.jenkins.docker.connector.DockerComputerSSHConnector$InjectSSHKey"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "dockercomputerattachconnector": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"user": {"type": "string"}}
+                },
+                "lastduration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "myviewstabbar": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultMyViewsTabBar"}}
+                    }],
+                    "type": "object"
+                },
+                "batchcloud": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "maximumIdleMinutes": {"type": "integer"},
+                        "hostname": {"type": "string"},
+                        "password": {"type": "string"},
+                        "port": {"type": "integer"},
+                        "cloudName": {"type": "string"},
+                        "queueType": {"type": "string"},
+                        "label": {"type": "string"},
+                        "username": {"type": "string"}
+                    }
+                },
+                "casesensitiveemailaddress": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "systemMessage": {"type": "string"},
+                "casesensitive": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "nonverifyingkeyverificationstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "activedirectorysecurityrealm": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "captchaSupport": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
+                        },
+                        "removeIrrelevantGroups": {"type": "boolean"},
+                        "server": {"type": "string"},
+                        "cache": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.active_directory.CacheConfiguration"
+                        },
+                        "bindPassword": {"type": "string"},
+                        "environmentProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.active_directory.ActiveDirectorySecurityRealm$EnvironmentProperty"
+                        },
+                        "startTls": {"type": "boolean"},
+                        "tlsConfiguration": {
+                            "type": "string",
+                            "enum": [
+                                "TRUST_ALL_CERTIFICATES",
+                                "JDK_TRUSTSTORE"
+                            ]
+                        },
+                        "groupLookupStrategy": {
+                            "type": "string",
+                            "enum": [
+                                "AUTO",
+                                "RECURSIVE",
+                                "CHAIN",
+                                "TOKENGROUPS"
+                            ]
+                        },
+                        "internalUsersDatabase": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.active_directory.ActiveDirectoryInternalUsersDatabase"
+                        },
+                        "domains": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.active_directory.ActiveDirectoryDomain"
+                        },
+                        "customDomain": {"type": "boolean"},
+                        "site": {"type": "string"},
+                        "bindName": {"type": "string"},
+                        "domain": {"type": "string"}
+                    }
+                },
+                "amitypedata": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"windowsData": {"$id": "#/definitions/hudson.plugins.ec2.WindowsData"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"unixData": {"$id": "#/definitions/hudson.plugins.ec2.UnixData"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "weather": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "scmCheckoutRetryCount": {"type": "integer"},
+                "orjobrestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "first": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                        },
+                        "second": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                        }
+                    }
+                },
+                "patternprojectnamingstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "namePattern": {"type": "string"},
+                        "description": {"type": "string"},
+                        "forceExistingJobs": {"type": "boolean"}
+                    }
+                },
+                "dockertemplatebase": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "cpuShares": {"type": "integer"},
+                        "image": {"type": "string"},
+                        "bindAllPorts": {"type": "boolean"},
+                        "memorySwap": {"type": "integer"},
+                        "volumes": {"type": "string"},
+                        "extraHostsString": {"type": "string"},
+                        "pullCredentialsId": {"type": "string"},
+                        "bindPorts": {"type": "string"},
+                        "environmentsString": {"type": "string"},
+                        "network": {"type": "string"},
+                        "privileged": {"type": "boolean"},
+                        "hostname": {"type": "string"},
+                        "macAddress": {"type": "string"},
+                        "volumesString": {"type": "string"},
+                        "extraHosts": {"type": "string"},
+                        "dockerCommand": {"type": "string"},
+                        "tty": {"type": "boolean"},
+                        "dnsString": {"type": "string"},
+                        "memoryLimit": {"type": "integer"},
+                        "volumesFromString": {"type": "string"},
+                        "volumesFrom2": {"type": "string"}
+                    }
+                },
+                "inheritingglobal": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "mercurialrevisioncolumn": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "fromuserrecordldapgroupmembershipstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"attributeName": {"type": "string"}}
+                },
+                "configmapvolume": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "mountPath": {"type": "string"},
+                        "configMapName": {"type": "string"}
+                    }
+                },
+                "githubpullrequestfilter": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "dockerapi": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "hostname": {"type": "string"},
+                        "apiVersion": {"type": "string"},
+                        "dockerHost": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.docker.commons.credentials.DockerServerEndpoint"
+                        },
+                        "connectTimeout": {"type": "integer"}
+                    }
+                },
+                "status": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "nodeName": {"type": "string"},
+                "sonarrunnerinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "agentProtocols": {"type": "string"},
+                "crumbissuer": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"standard": {"$id": "#/definitions/hudson.security.csrf.DefaultCrumbIssuer"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"test": {"$id": "#/definitions/org.jvnet.hudson.test.TestCrumbIssuer"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "podimagepullsecret": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"name": {"type": "string"}}
+                },
+                "viewstabbar": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultViewsTabBar"}}
+                    }],
+                    "type": "object"
+                },
+                "jenkins": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "authorizationStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.AuthorizationStrategy"
+                        },
+                        "nodeName": {"type": "string"},
+                        "systemMessage": {"type": "string"},
+                        "agentProtocols": {"type": "string"},
+                        "clouds": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.Cloud"
+                        },
+                        "primaryView": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.View"
+                        },
+                        "nodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        },
+                        "mode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "numExecutors": {"type": "integer"},
+                        "quietPeriod": {"type": "integer"},
+                        "labelString": {"type": "string"},
+                        "scmCheckoutRetryCount": {"type": "integer"},
+                        "projectNamingStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.model.ProjectNamingStrategy"
+                        },
+                        "views": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.View"
+                        },
+                        "crumbIssuer": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.csrf.CrumbIssuer"
+                        },
+                        "disableRememberMe": {"type": "boolean"},
+                        "markupFormatter": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.markup.MarkupFormatter"
+                        },
+                        "globalNodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        },
+                        "securityRealm": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.SecurityRealm"
+                        },
+                        "slaveAgentPort": {"type": "integer"},
+                        "myViewsTabBar": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.views.MyViewsTabBar"
+                        },
+                        "updateCenter": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.UpdateCenter"
+                        },
+                        "proxy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.ProxyConfiguration"
+                        },
+                        "viewsTabBar": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.views.ViewsTabBar"
+                        },
+                        "nodes": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.Node"
+                        },
+                        "remotingSecurity": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule"
+                        }
+                    }
+                },
+                "commandinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "label": {"type": "string"},
+                        "toolHome": {"type": "string"},
+                        "command": {"type": "string"}
+                    }
+                },
+                "inheriting": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "templateenvvar": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"envVar": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.model.KeyValueEnvVar"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"containerEnvVar": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.ContainerEnvVar"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"podEnvVar": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PodEnvVar"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"secretEnvVar": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.model.SecretEnvVar"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "laststable": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "noninheriting": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "gradleinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "hudsonprivatesecurityrealm": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "captchaSupport": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
+                        },
+                        "allowsSignup": {"type": "boolean"},
+                        "enableCaptcha": {"type": "boolean"},
+                        "users": {
+                            "type": "object",
+                            "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword"
+                        }
+                    }
+                },
+                "jdkinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "id": {"type": "string"},
+                        "acceptLicense": {"type": "boolean"}
+                    }
+                },
+                "lastsuccess": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "commandlauncher": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"command": {"type": "string"}}
+                },
+                "msbuildsonarquberunnerinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "sshhostkeyverificationstrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"manuallyTrustedKeyVerificationStrategy": {"$id": "#/definitions/hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"manuallyProvidedKeyVerificationStrategy": {"$id": "#/definitions/hudson.plugins.sshslaves.verifiers.ManuallyProvidedKeyVerificationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"nonVerifyingKeyVerificationStrategy": {"$id": "#/definitions/hudson.plugins.sshslaves.verifiers.NonVerifyingKeyVerificationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"knownHostsFileKeyVerificationStrategy": {"$id": "#/definitions/hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationStrategy"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "persistentvolumeclaimworkspacevolume": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "claimName": {"type": "string"},
+                        "readOnly": {"type": "boolean"}
+                    }
+                },
+                "uri": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "extract": {"type": "boolean"},
+                        "value": {"type": "string"},
+                        "executable": {"type": "boolean"}
+                    }
+                },
+                "fromgroupsearchldapgroupmembershipstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"filter": {"type": "string"}}
+                },
+                "remotingSecurity": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule"
+                },
+                "portmapping": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "protocol": {"type": "string"},
+                        "containerPort": {"type": "integer"},
+                        "hostPort": {"type": "integer"}
+                    }
+                },
+                "secretenvvar": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "secretName": {"type": "string"},
+                        "secretKey": {"type": "string"},
+                        "key": {"type": "string"}
+                    }
+                },
+                "networkinfo": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"networkName": {"type": "string"}}
+                },
+                "hostpathvolume": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "mountPath": {"type": "string"},
+                        "hostPath": {"type": "string"}
+                    }
+                },
+                "eucalyptus": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "privateKey": {"type": "string"},
+                        "s3endpoint": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/java.net.URL"
+                        },
+                        "instanceCapStr": {"type": "string"},
+                        "roleArn": {"type": "string"},
+                        "roleSessionName": {"type": "string"},
+                        "templates": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.ec2.SlaveTemplate"
+                        },
+                        "credentialsId": {"type": "string"},
+                        "useInstanceProfileForCredentials": {"type": "boolean"},
+                        "ec2endpoint": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/java.net.URL"
+                        }
+                    }
+                },
+                "branchstatuscolumn": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "manuallyprovidedkeyverificationstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"key": {"type": "string"}}
+                },
+                "cloud": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mesos": {"$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosCloud"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"kubernetes": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"eucalyptus": {"$id": "#/definitions/hudson.plugins.ec2.Eucalyptus"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"batch": {"$id": "#/definitions/org.jenkinsci.plugins.sge.BatchCloud"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"amazonEC2": {"$id": "#/definitions/hudson.plugins.ec2.AmazonEC2Cloud"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"nonConfigurableKubernetes": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.NonConfigurableKubernetesCloud"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"docker": {"$id": "#/definitions/com.nirima.jenkins.plugins.docker.DockerCloud"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "mode": {
+                    "type": "string",
+                    "enum": [
+                        "NORMAL",
+                        "EXCLUSIVE"
+                    ]
+                },
+                "numExecutors": {"type": "integer"},
+                "labelString": {"type": "string"},
+                "emptydirvolume": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "mountPath": {"type": "string"},
+                        "memory": {"type": "boolean"}
+                    }
+                },
+                "keycloaksecurityrealm": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"captchaSupport": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
+                    }}
+                },
+                "environmentproperty": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "value": {"type": "string"}
+                    }
+                },
+                "windowsdata": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {"type": "string"},
+                        "bootDelay": {"type": "string"},
+                        "useHTTPS": {"type": "boolean"}
+                    }
+                },
+                "jobname": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "always": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "proxyview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "proxiedViewName": {"type": "string"},
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.ViewProperty"
+                        }
+                    }
+                },
+                "slaveAgentPort": {"type": "integer"},
+                "captchasupport": {},
+                "ldapconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "server": {"type": "string"},
+                        "environmentProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.LDAPSecurityRealm$EnvironmentProperty"
+                        },
+                        "inhibitInferRootDN": {"type": "boolean"},
+                        "displayNameAttributeName": {"type": "string"},
+                        "groupSearchBase": {"type": "string"},
+                        "mailAddressAttributeName": {"type": "string"},
+                        "userSearchBase": {"type": "string"},
+                        "managerDN": {"type": "string"},
+                        "managerPasswordSecret": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.util.Secret"
+                        },
+                        "rootDN": {"type": "string"},
+                        "groupSearchFilter": {"type": "string"},
+                        "groupMembershipStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.security.plugins.ldap.LDAPGroupMembershipStrategy"
+                        },
+                        "userSearch": {"type": "string"}
+                    }
+                },
+                "updateCenter": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.model.UpdateCenter"
+                },
+                "authorizationmatrixnodeproperty": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "permissions": {"type": "string"},
+                        "inheritanceStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.matrixauth.inheritance.InheritanceStrategy"
+                        }
+                    }
+                },
+                "entry": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "value": {"type": "string"},
+                        "key": {"type": "string"}
+                    }
+                },
+                "podvolume": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"configMapVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.ConfigMapVolume"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"emptyDirVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.EmptyDirVolume"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"nfsVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.NfsVolume"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"secretVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.SecretVolume"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"persistentVolumeClaim": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.PersistentVolumeClaim"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"hostPathVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.HostPathVolume"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "viewjobfilter": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubBranchFilter": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.GitHubBranchFilter"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gitHubPullRequestFilter": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.GitHubPullRequestFilter"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "cacheconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "size": {"type": "integer"},
+                        "ttl": {"type": "integer"}
+                    }
+                },
+                "jnlplauncher": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "workDirSettings": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.slaves.RemotingWorkDirSettings"
+                        },
+                        "vmargs": {"type": "string"},
+                        "tunnel": {"type": "string"}
+                    }
+                },
+                "toolinstaller": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"nodeJSInstaller": {"$id": "#/definitions/jenkins.plugins.nodejs.tools.NodeJSInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gradleInstaller": {"$id": "#/definitions/hudson.plugins.gradle.GradleInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"antInstaller": {"$id": "#/definitions/hudson.tasks.Ant$AntInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"sbtInstaller": {"$id": "#/definitions/org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"sonarRunnerInstaller": {"$id": "#/definitions/hudson.plugins.sonar.SonarRunnerInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"msBuildSonarQubeRunnerInstaller": {"$id": "#/definitions/hudson.plugins.sonar.MsBuildSonarQubeRunnerInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"docker": {"$id": "#/definitions/org.jenkinsci.plugins.docker.commons.tools.DockerToolInstaller"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "dockercomputersshconnector": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "maxNumRetries": {"type": "integer"},
+                        "suffixStartSlaveCmd": {"type": "string"},
+                        "port": {"type": "integer"},
+                        "javaPath": {"type": "string"},
+                        "launchTimeoutSeconds": {"type": "integer"},
+                        "prefixStartSlaveCmd": {"type": "string"},
+                        "retryWaitTime": {"type": "integer"},
+                        "jvmOptions": {"type": "string"},
+                        "sshKeyStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/io.jenkins.docker.connector.DockerComputerSSHConnector$SSHKeyStrategy"
+                        }
+                    }
+                },
+                "userwithpassword": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {"type": "string"},
+                        "id": {"type": "string"}
+                    }
+                },
+                "notjobrestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"restriction": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                    }}
+                },
+                "dockertoolinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "label": {"type": "string"},
+                        "version": {"type": "string"}
+                    }
+                },
+                "legacy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "startedbymemberofgrouprestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "checkUpstreamProjects": {"type": "boolean"},
+                        "groupList": {
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.GroupSelector"
+                        }
+                    }
+                },
+                "userselector": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"selectedUserId": {"type": "string"}}
+                },
+                "dockercloud": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "containerCap": {"type": "integer"},
+                        "templates": {
+                            "type": "object",
+                            "$id": "#/definitions/com.nirima.jenkins.plugins.docker.DockerTemplate"
+                        },
+                        "name": {"type": "string"},
+                        "exposeDockerHost": {"type": "boolean"},
+                        "dockerApi": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/io.jenkins.docker.client.DockerAPI"
+                        }
+                    }
+                },
+                "ldapsecurityrealm": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "disableMailAddressResolver": {"type": "boolean"},
+                        "captchaSupport": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
+                        },
+                        "cache": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.LDAPSecurityRealm$CacheConfiguration"
+                        },
+                        "userIdStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.model.IdStrategy"
+                        },
+                        "disableRolePrefixing": {"type": "boolean"},
+                        "configurations": {
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.security.plugins.ldap.LDAPConfiguration"
+                        },
+                        "groupIdStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.model.IdStrategy"
+                        }
+                    }
+                },
+                "kubernetescloud": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "retentionTimeout": {"type": "integer"},
+                        "skipTlsVerify": {"type": "boolean"},
+                        "templates": {
+                            "type": "object",
+                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PodTemplate"
+                        },
+                        "addMasterProxyEnvVars": {"type": "boolean"},
+                        "credentialsId": {"type": "string"},
+                        "jenkinsUrl": {"type": "string"},
+                        "maxRequestsPerHostStr": {"type": "string"},
+                        "serverCertificate": {"type": "string"},
+                        "jenkinsTunnel": {"type": "string"},
+                        "readTimeout": {"type": "integer"},
+                        "serverUrl": {"type": "string"},
+                        "connectTimeout": {"type": "integer"},
+                        "name": {"type": "string"},
+                        "namespace": {"type": "string"},
+                        "containerCapStr": {"type": "string"},
+                        "defaultsProviderTemplate": {"type": "string"}
+                    }
+                },
+                "parameter": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "value": {"type": "string"},
+                        "key": {"type": "string"}
+                    }
+                },
+                "simplecommandlauncher": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"cmd": {"type": "string"}}
+                },
+                "keyvalueenvvar": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "value": {"type": "string"},
+                        "key": {"type": "string"}
+                    }
+                },
+                "slavetemplate": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "launchTimeoutStr": {"type": "string"},
+                        "subnetId": {"type": "string"},
+                        "instanceCapStr": {"type": "string"},
+                        "userData": {"type": "string"},
+                        "description": {"type": "string"},
+                        "connectBySSHProcess": {"type": "boolean"},
+                        "type": {
+                            "type": "string",
+                            "enum": [
+                                "t1.micro",
+                                "t2.nano",
+                                "t2.micro",
+                                "t2.small",
+                                "t2.medium",
+                                "t2.large",
+                                "t2.xlarge",
+                                "t2.2xlarge",
+                                "t3.nano",
+                                "t3.micro",
+                                "t3.small",
+                                "t3.medium",
+                                "t3.large",
+                                "t3.xlarge",
+                                "t3.2xlarge",
+                                "m1.small",
+                                "m1.medium",
+                                "m1.large",
+                                "m1.xlarge",
+                                "m3.medium",
+                                "m3.large",
+                                "m3.xlarge",
+                                "m3.2xlarge",
+                                "m4.large",
+                                "m4.xlarge",
+                                "m4.2xlarge",
+                                "m4.4xlarge",
+                                "m4.10xlarge",
+                                "m4.16xlarge",
+                                "m2.xlarge",
+                                "m2.2xlarge",
+                                "m2.4xlarge",
+                                "cr1.8xlarge",
+                                "r3.large",
+                                "r3.xlarge",
+                                "r3.2xlarge",
+                                "r3.4xlarge",
+                                "r3.8xlarge",
+                                "r4.large",
+                                "r4.xlarge",
+                                "r4.2xlarge",
+                                "r4.4xlarge",
+                                "r4.8xlarge",
+                                "r4.16xlarge",
+                                "r5.large",
+                                "r5.xlarge",
+                                "r5.2xlarge",
+                                "r5.4xlarge",
+                                "r5.8xlarge",
+                                "r5.12xlarge",
+                                "r5.16xlarge",
+                                "r5.24xlarge",
+                                "r5.metal",
+                                "r5a.large",
+                                "r5a.xlarge",
+                                "r5a.2xlarge",
+                                "r5a.4xlarge",
+                                "r5a.12xlarge",
+                                "r5a.24xlarge",
+                                "r5d.large",
+                                "r5d.xlarge",
+                                "r5d.2xlarge",
+                                "r5d.4xlarge",
+                                "r5d.8xlarge",
+                                "r5d.12xlarge",
+                                "r5d.16xlarge",
+                                "r5d.24xlarge",
+                                "r5d.metal",
+                                "x1.16xlarge",
+                                "x1.32xlarge",
+                                "x1e.xlarge",
+                                "x1e.2xlarge",
+                                "x1e.4xlarge",
+                                "x1e.8xlarge",
+                                "x1e.16xlarge",
+                                "x1e.32xlarge",
+                                "i2.xlarge",
+                                "i2.2xlarge",
+                                "i2.4xlarge",
+                                "i2.8xlarge",
+                                "i3.large",
+                                "i3.xlarge",
+                                "i3.2xlarge",
+                                "i3.4xlarge",
+                                "i3.8xlarge",
+                                "i3.16xlarge",
+                                "i3.metal",
+                                "hi1.4xlarge",
+                                "hs1.8xlarge",
+                                "c1.medium",
+                                "c1.xlarge",
+                                "c3.large",
+                                "c3.xlarge",
+                                "c3.2xlarge",
+                                "c3.4xlarge",
+                                "c3.8xlarge",
+                                "c4.large",
+                                "c4.xlarge",
+                                "c4.2xlarge",
+                                "c4.4xlarge",
+                                "c4.8xlarge",
+                                "c5.large",
+                                "c5.xlarge",
+                                "c5.2xlarge",
+                                "c5.4xlarge",
+                                "c5.9xlarge",
+                                "c5.18xlarge",
+                                "c5d.large",
+                                "c5d.xlarge",
+                                "c5d.2xlarge",
+                                "c5d.4xlarge",
+                                "c5d.9xlarge",
+                                "c5d.18xlarge",
+                                "c5n.large",
+                                "c5n.xlarge",
+                                "c5n.2xlarge",
+                                "c5n.4xlarge",
+                                "c5n.9xlarge",
+                                "c5n.18xlarge",
+                                "cc1.4xlarge",
+                                "cc2.8xlarge",
+                                "g2.2xlarge",
+                                "g2.8xlarge",
+                                "g3.4xlarge",
+                                "g3.8xlarge",
+                                "g3.16xlarge",
+                                "g3s.xlarge",
+                                "cg1.4xlarge",
+                                "p2.xlarge",
+                                "p2.8xlarge",
+                                "p2.16xlarge",
+                                "p3.2xlarge",
+                                "p3.8xlarge",
+                                "p3.16xlarge",
+                                "d2.xlarge",
+                                "d2.2xlarge",
+                                "d2.4xlarge",
+                                "d2.8xlarge",
+                                "f1.2xlarge",
+                                "f1.4xlarge",
+                                "f1.16xlarge",
+                                "m5.large",
+                                "m5.xlarge",
+                                "m5.2xlarge",
+                                "m5.4xlarge",
+                                "m5.12xlarge",
+                                "m5.24xlarge",
+                                "m5a.large",
+                                "m5a.xlarge",
+                                "m5a.2xlarge",
+                                "m5a.4xlarge",
+                                "m5a.12xlarge",
+                                "m5a.24xlarge",
+                                "m5d.large",
+                                "m5d.xlarge",
+                                "m5d.2xlarge",
+                                "m5d.4xlarge",
+                                "m5d.12xlarge",
+                                "m5d.24xlarge",
+                                "h1.2xlarge",
+                                "h1.4xlarge",
+                                "h1.8xlarge",
+                                "h1.16xlarge",
+                                "z1d.large",
+                                "z1d.xlarge",
+                                "z1d.2xlarge",
+                                "z1d.3xlarge",
+                                "z1d.6xlarge",
+                                "z1d.12xlarge",
+                                "u-6tb1.metal",
+                                "u-9tb1.metal",
+                                "u-12tb1.metal",
+                                "a1.medium",
+                                "a1.large",
+                                "a1.xlarge",
+                                "a1.2xlarge",
+                                "a1.4xlarge"
+                            ]
+                        },
+                        "customDeviceMapping": {"type": "string"},
+                        "mode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "tmpDir": {"type": "string"},
+                        "useEphemeralDevices": {"type": "boolean"},
+                        "numExecutors": {"type": "string"},
+                        "zone": {"type": "string"},
+                        "labelString": {"type": "string"},
+                        "connectionStrategy": {
+                            "type": "string",
+                            "enum": [
+                                "Public DNS",
+                                "Public IP",
+                                "Private DNS",
+                                "Private IP"
+                            ]
+                        },
+                        "deleteRootOnTermination": {"type": "boolean"},
+                        "idleTerminationMinutes": {"type": "string"},
+                        "ebsOptimized": {"type": "boolean"},
+                        "associatePublicIp": {"type": "boolean"},
+                        "jvmopts": {"type": "string"},
+                        "stopOnTerminate": {"type": "boolean"},
+                        "monitoring": {"type": "boolean"},
+                        "spotConfig": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.ec2.SpotConfiguration"
+                        },
+                        "useDedicatedTenancy": {"type": "boolean"},
+                        "iamInstanceProfile": {"type": "string"},
+                        "maxTotalUses": {"type": "integer"},
+                        "remoteAdmin": {"type": "string"},
+                        "tags": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.ec2.EC2Tag"
+                        },
+                        "t2Unlimited": {"type": "boolean"},
+                        "securityGroups": {"type": "string"},
+                        "amiType": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.plugins.ec2.AMITypeData"
+                        },
+                        "initScript": {"type": "string"},
+                        "ami": {"type": "string"},
+                        "remoteFS": {"type": "string"}
+                    }
+                },
+                "andjobrestriction": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "first": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                        },
+                        "second": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
+                        }
+                    }
+                },
+                "hostpathworkspacevolume": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"hostPath": {"type": "string"}}
+                },
+                "dumbslave": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "mode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "nodeName": {"type": "string"},
+                        "numExecutors": {"type": "integer"},
+                        "retentionStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
+                        },
+                        "labelString": {"type": "string"},
+                        "name": {"type": "string"},
+                        "nodeDescription": {"type": "string"},
+                        "remoteFS": {"type": "string"},
+                        "userId": {"type": "string"},
+                        "launcher": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
+                        },
+                        "nodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        }
+                    }
+                },
+                "activedirectoryinternalusersdatabase": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"jenkinsInternalUser": {"type": "string"}}
+                },
+                "containerinfo": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "customDockerCommandShell": {"type": "string"},
+                        "dockerImage": {"type": "string"},
+                        "useCustomDockerCommandShell": {"type": "boolean"},
+                        "dockerForcePullImage": {"type": "boolean"},
+                        "isDind": {"type": "boolean"},
+                        "dockerImageCustomizable": {"type": "boolean"},
+                        "volumes": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$Volume"
+                        },
+                        "networkInfos": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$NetworkInfo"
+                        },
+                        "networking": {"type": "string"},
+                        "type": {"type": "string"},
+                        "portMappings": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$PortMapping"
+                        },
+                        "parameters": {
+                            "type": "object",
+                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$Parameter"
+                        },
+                        "dockerPrivilegedMode": {"type": "boolean"}
+                    }
+                },
+                "dockercomputerjnlpconnector": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "jnlpLauncher": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.JNLPLauncher"
+                        },
+                        "user": {"type": "string"}
+                    }
+                },
+                "any": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "dockertemplate": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "mode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "retentionStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy"
+                        },
+                        "instanceCapStr": {"type": "string"},
+                        "connector": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/io.jenkins.docker.connector.DockerComputerConnector"
+                        },
+                        "labelString": {"type": "string"},
+                        "removeVolumes": {"type": "boolean"},
+                        "dockerTemplateBase": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.nirima.jenkins.plugins.docker.DockerTemplateBase"
+                        },
+                        "pullStrategy": {
+                            "type": "string",
+                            "enum": [
+                                "PULL_ALWAYS",
+                                "PULL_LATEST",
+                                "PULL_NEVER"
+                            ]
+                        },
+                        "remoteFs": {"type": "string"},
+                        "nodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        }
+                    }
+                },
+                "rawhtmlmarkupformatter": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"disableSyntaxHighlighting": {"type": "boolean"}}
+                },
+                "dockercomputerconnector": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jnlp": {"$id": "#/definitions/io.jenkins.docker.connector.DockerComputerJNLPConnector"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"ssh": {"$id": "#/definitions/io.jenkins.docker.connector.DockerComputerSSHConnector"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"attach": {"$id": "#/definitions/io.jenkins.docker.connector.DockerComputerAttachConnector"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "descriptioncolumn": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "updatesite": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "id": {"type": "string"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "unixdata": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "sshPort": {"type": "string"},
+                        "slaveCommandSuffix": {"type": "string"},
+                        "rootCommandPrefix": {"type": "string"},
+                        "slaveCommandPrefix": {"type": "string"}
+                    }
+                }
+            }
+        },
+        "aws": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the aws classifier",
+            "properties": {
+                "s3": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStoreConfig"
+                },
+                "credentialsawsglobalconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "credentialsId": {"type": "string"},
+                        "region": {"type": "string"}
+                    }
+                },
+                "awsCredentials": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/io.jenkins.plugins.aws.global_configuration.CredentialsAwsGlobalConfiguration"
+                },
+                "s3blobstoreconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "container": {"type": "string"},
+                        "prefix": {"type": "string"}
+                    }
+                }
+            }
+        },
+        "tool": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the tool classifier",
+            "properties": {
+                "standard": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "gradleinstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "nodejsinstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "globalsettingsprovider": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultGlobalSettingsProvider"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mvn": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.job.MvnGlobalSettingsProvider"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathGlobalSettingsProvider"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "jgitapache": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.gitclient.JGitApacheTool$DescriptorImpl"
+                },
+                "filepathsettingsprovider": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"path": {"type": "string"}}
+                },
+                "gittool": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "customTool": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/com.cloudbees.jenkins.plugins.customtools.CustomTool$DescriptorImpl"
+                },
+                "settingsprovider": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultSettingsProvider"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mvn": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathSettingsProvider"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "batchcommandinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "label": {"type": "string"},
+                        "toolHome": {"type": "string"},
+                        "command": {"type": "string"}
+                    }
+                },
+                "mvnglobalsettingsprovider": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"settingsConfigId": {"type": "string"}}
+                },
+                "antinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "jgit": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.gitclient.JGitTool$DescriptorImpl"
+                },
+                "antinstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "toolversionconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"versionsListSource": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/com.cwctravel.hudson.plugins.extended_choice_parameter.ExtendedChoiceParameterDefinition"
+                    }}
+                },
+                "zipextractioninstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "subdir": {"type": "string"},
+                        "label": {"type": "string"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "maven": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.mvn.GlobalMavenConfig"
+                },
+                "maveninstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "mercurialInstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.plugins.mercurial.MercurialInstallation$DescriptorImpl"
+                },
+                "dockerTool": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.plugins.docker.commons.tools.DockerTool$DescriptorImpl"
+                },
+                "filepathglobalsettingsprovider": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"path": {"type": "string"}}
+                },
+                "maveninstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "mvnsettingsprovider": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"settingsConfigId": {"type": "string"}}
+                },
+                "toolinstaller": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"nodeJSInstaller": {"$id": "#/definitions/jenkins.plugins.nodejs.tools.NodeJSInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gradleInstaller": {"$id": "#/definitions/hudson.plugins.gradle.GradleInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"antInstaller": {"$id": "#/definitions/hudson.tasks.Ant$AntInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"sbtInstaller": {"$id": "#/definitions/org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"sonarRunnerInstaller": {"$id": "#/definitions/hudson.plugins.sonar.SonarRunnerInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"msBuildSonarQubeRunnerInstaller": {"$id": "#/definitions/hudson.plugins.sonar.MsBuildSonarQubeRunnerInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"docker": {"$id": "#/definitions/org.jenkinsci.plugins.docker.commons.tools.DockerToolInstaller"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "extendedchoiceparameterdefinition": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "propertyKey": {"type": "string"},
+                        "defaultPropertyKey": {"type": "string"},
+                        "propertyFile": {"type": "string"},
+                        "defaultValue": {"type": "string"},
+                        "defaultPropertyFile": {"type": "string"},
+                        "name": {"type": "string"},
+                        "description": {"type": "string"},
+                        "type": {"type": "string"},
+                        "visibleItemCount": {"type": "integer"},
+                        "value": {"type": "string"},
+                        "quoteValue": {"type": "boolean"}
+                    }
+                },
+                "dockertool": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "nodejsinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "npmPackagesRefreshHours": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/long"
+                        },
+                        "id": {"type": "string"},
+                        "npmPackages": {"type": "string"},
+                        "force32Bit": {"type": "boolean"}
+                    }
+                },
+                "sonarRunnerInstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.plugins.sonar.SonarRunnerInstallation$DescriptorImpl"
+                },
+                "mercurialinstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "debug": {"type": "boolean"},
+                        "masterCacheRoot": {"type": "string"},
+                        "useCaches": {"type": "boolean"},
+                        "name": {"type": "string"},
+                        "useSharing": {"type": "boolean"},
+                        "config": {"type": "string"},
+                        "executable": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "toolproperty": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}}
+                    }],
+                    "type": "object"
+                },
+                "dockertoolinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "label": {"type": "string"},
+                        "version": {"type": "string"}
+                    }
+                },
+                "sonarrunnerinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "antInstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.tasks.Ant$AntInstallation$DescriptorImpl"
+                },
+                "msbuildsqrunnerinstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "toolinstallation": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"antInstallation": {"$id": "#/definitions/hudson.tasks.Ant$AntInstallation"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstallation"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"msBuildSQRunnerInstallation": {"$id": "#/definitions/hudson.plugins.sonar.MsBuildSQRunnerInstallation"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"mercurialInstallation": {"$id": "#/definitions/hudson.plugins.mercurial.MercurialInstallation"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"nodejs": {"$id": "#/definitions/jenkins.plugins.nodejs.tools.NodeJSInstallation"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jgitapache": {"$id": "#/definitions/org.jenkinsci.plugins.gitclient.JGitApacheTool"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"dockerTool": {"$id": "#/definitions/org.jenkinsci.plugins.docker.commons.tools.DockerTool"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"gradleInstallation": {"$id": "#/definitions/hudson.plugins.gradle.GradleInstallation"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"customTool": {"$id": "#/definitions/com.cloudbees.jenkins.plugins.customtools.CustomTool"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jdk": {"$id": "#/definitions/hudson.model.JDK"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"sbtInstallation": {"$id": "#/definitions/org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstallation"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"git": {"$id": "#/definitions/hudson.plugins.git.GitTool"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jgit": {"$id": "#/definitions/org.jenkinsci.plugins.gitclient.JGitTool"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"sonarRunnerInstallation": {"$id": "#/definitions/hudson.plugins.sonar.SonarRunnerInstallation"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "nodejs": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.plugins.nodejs.tools.NodeJSInstallation$DescriptorImpl"
+                },
+                "globalmavenconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "settingsProvider": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.mvn.SettingsProvider"
+                        },
+                        "installations": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tasks.Maven$MavenInstallation"
+                        },
+                        "globalSettingsProvider": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.mvn.GlobalSettingsProvider"
+                        }
+                    }
+                },
+                "customtool": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "toolVersion": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.customtools.versions.ToolVersionConfig"
+                        },
+                        "labelSpecifics": {
+                            "type": "object",
+                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.customtools.LabelSpecifics"
+                        },
+                        "exportedPaths": {"type": "string"},
+                        "name": {"type": "string"},
+                        "additionalVariables": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "sbtInstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstallation$DescriptorImpl"
+                },
+                "git": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.plugins.git.GitTool$DescriptorImpl"
+                },
+                "commandinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "label": {"type": "string"},
+                        "toolHome": {"type": "string"},
+                        "command": {"type": "string"}
+                    }
+                },
+                "labelspecifics": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "additionalVars": {"type": "string"},
+                        "exportedPaths": {"type": "string"},
+                        "label": {"type": "string"}
+                    }
+                },
+                "gradleinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "jdkinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "id": {"type": "string"},
+                        "acceptLicense": {"type": "boolean"}
+                    }
+                },
+                "msBuildSQRunnerInstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.plugins.sonar.MsBuildSQRunnerInstallation$DescriptorImpl"
+                },
+                "msbuildsonarquberunnerinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "gradleInstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.plugins.gradle.GradleInstallation$DescriptorImpl"
+                },
+                "sonarrunnerinstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "jdk": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.model.JDK$DescriptorImpl"
+                },
+                "sbtinstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "sbtArguments": {"type": "string"},
+                        "home": {"type": "string"}
+                    }
+                },
+                "sbtinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/integrations/pom.xml b/integrations/pom.xml
index 2f619c3d89..77c2d7f8b4 100644
--- a/integrations/pom.xml
+++ b/integrations/pom.xml
@@ -379,6 +379,12 @@
       3.0.0
     
 
+    
+      org.jenkins-ci.plugins
+      azure-keyvault
+      1.4
+    
+
     
       org.jenkins-ci.plugins
       display-url-api
diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java
new file mode 100644
index 0000000000..f93b072408
--- /dev/null
+++ b/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java
@@ -0,0 +1,33 @@
+package io.jenkins.plugins.casc;
+
+import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithReadmeRule;
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import org.junit.Rule;
+import org.junit.Test;
+
+import static io.jenkins.plugins.casc.SchemaGeneration.writeJSONSchema;
+import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson;
+import static io.jenkins.plugins.casc.misc.Util.validateSchema;
+import static org.hamcrest.Matchers.empty;
+import static org.junit.Assert.assertThat;
+
+public class AzureKeyVaultTest {
+
+    @Rule
+    public JenkinsConfiguredWithReadmeRule j = new JenkinsConfiguredWithReadmeRule();
+
+    @Test
+    public void validJsonSchema() throws Exception {
+        assertThat(
+            validateSchema(convertYamlFileToJson(this, "azureKeyVault.yml")),
+            empty());
+    }
+
+    @Test
+    public void writeSchema() throws Exception {
+        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
+        writer.write(writeJSONSchema());
+        writer.close();
+    }
+}
diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java
index 42068db88b..7f7153ac15 100644
--- a/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java
+++ b/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java
@@ -3,13 +3,20 @@
 import hudson.ExtensionList;
 import io.jenkins.plugins.casc.misc.ConfiguredWithReadme;
 import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithReadmeRule;
+import java.io.BufferedWriter;
+import java.io.FileWriter;
 import jenkins.plugins.slack.SlackNotifier;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.contrib.java.lang.system.EnvironmentVariables;
 import org.junit.rules.RuleChain;
 
-import static junit.framework.TestCase.assertNotNull;
+import static io.jenkins.plugins.casc.SchemaGeneration.writeJSONSchema;
+import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson;
+import static io.jenkins.plugins.casc.misc.Util.validateSchema;
+import static org.hamcrest.Matchers.empty;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
 
 /**
  * @author v1v (Victor Martinez)
@@ -29,4 +36,19 @@ public void configure_slack() throws Exception {
         SlackNotifier.DescriptorImpl slackNotifier = ExtensionList.lookupSingleton(SlackNotifier.DescriptorImpl.class);
         assertNotNull(slackNotifier);
     }
+
+    @Test
+    public void validJsonSchema() throws Exception {
+        assertThat(
+            validateSchema(convertYamlFileToJson(this, "slackSchema.yml")),
+            empty());
+    }
+
+    @Test
+    public void writeSchema() throws Exception {
+        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
+        writer.write(writeJSONSchema());
+        writer.close();
+    }
+
 }
diff --git a/integrations/src/test/resources/io/jenkins/plugins/casc/azureKeyVault.yml b/integrations/src/test/resources/io/jenkins/plugins/casc/azureKeyVault.yml
new file mode 100644
index 0000000000..d854e4ee82
--- /dev/null
+++ b/integrations/src/test/resources/io/jenkins/plugins/casc/azureKeyVault.yml
@@ -0,0 +1,4 @@
+unclassified:
+  azureKeyVault:
+    keyVaultURL: https://not-a-real-vault.vault.azure.net
+    credentialID: service-principal
\ No newline at end of file
diff --git a/integrations/src/test/resources/io/jenkins/plugins/casc/slackSchema.yml b/integrations/src/test/resources/io/jenkins/plugins/casc/slackSchema.yml
new file mode 100644
index 0000000000..63041044a3
--- /dev/null
+++ b/integrations/src/test/resources/io/jenkins/plugins/casc/slackSchema.yml
@@ -0,0 +1,4 @@
+unclassified:
+  slackNotifier:
+    teamDomain: workspace
+    tokenCredentialId: slack-token
\ No newline at end of file
diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
index 2a619d2862..9a98a343e2 100644
--- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
+++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
@@ -186,6 +186,7 @@ private static JSONObject generateNonEnumAttributeObject(Attribute attribute) {
 
             default:
                 attributeType.put("type", "object");
+                attributeType.put("additionalProperties", false);
                 attributeType.put("$id",
                     "#/definitions/" + attribute.type.getName());
                 break;

From 240383878bde23cbd842f5c36fb22050f9f8a2bf Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Sun, 8 Dec 2019 12:52:31 +0000
Subject: [PATCH 70/93] Fix enforcer

---
 integrations/pom.xml | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/integrations/pom.xml b/integrations/pom.xml
index 77c2d7f8b4..9481686d6b 100644
--- a/integrations/pom.xml
+++ b/integrations/pom.xml
@@ -422,6 +422,31 @@
 
   
     
+      
+        com.microsoft.azure
+        azure-annotations
+        1.8.0
+      
+      
+        io.reactivex
+        rxjava
+        1.3.8
+      
+      
+        com.google.code.gson
+        gson
+        2.8.0
+      
+      
+        com.squareup.okhttp3
+        logging-interceptor
+        3.12.2
+      
+      
+        com.squareup.okhttp3
+        okhttp
+        3.12.2
+      
 
       
         com.github.docker-java
@@ -518,7 +543,7 @@
       
         com.squareup.okio
         okio
-        1.13.0
+        1.15.0
       
       
         jaxen

From 0395bea3540e53a4ab54febcea49660c0224ca7c Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Sun, 8 Dec 2019 12:57:05 +0000
Subject: [PATCH 71/93] Comment out debug

---
 .../jenkins/plugins/casc/AzureKeyVaultTest.java   | 15 ++++++---------
 .../java/io/jenkins/plugins/casc/SlackTest.java   | 15 ++++++---------
 .../plugins/casc/SchemaGenerationTest.java        | 15 ++++++---------
 3 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java
index f93b072408..d186e9c7a1 100644
--- a/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java
+++ b/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java
@@ -1,12 +1,9 @@
 package io.jenkins.plugins.casc;
 
 import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithReadmeRule;
-import java.io.BufferedWriter;
-import java.io.FileWriter;
 import org.junit.Rule;
 import org.junit.Test;
 
-import static io.jenkins.plugins.casc.SchemaGeneration.writeJSONSchema;
 import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson;
 import static io.jenkins.plugins.casc.misc.Util.validateSchema;
 import static org.hamcrest.Matchers.empty;
@@ -24,10 +21,10 @@ public void validJsonSchema() throws Exception {
             empty());
     }
 
-    @Test
-    public void writeSchema() throws Exception {
-        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
-        writer.write(writeJSONSchema());
-        writer.close();
-    }
+//    @Test
+//    public void writeSchema() throws Exception {
+//        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
+//        writer.write(writeJSONSchema());
+//        writer.close();
+//    }
 }
diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java
index 7f7153ac15..7cbb50c458 100644
--- a/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java
+++ b/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java
@@ -3,15 +3,12 @@
 import hudson.ExtensionList;
 import io.jenkins.plugins.casc.misc.ConfiguredWithReadme;
 import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithReadmeRule;
-import java.io.BufferedWriter;
-import java.io.FileWriter;
 import jenkins.plugins.slack.SlackNotifier;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.contrib.java.lang.system.EnvironmentVariables;
 import org.junit.rules.RuleChain;
 
-import static io.jenkins.plugins.casc.SchemaGeneration.writeJSONSchema;
 import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson;
 import static io.jenkins.plugins.casc.misc.Util.validateSchema;
 import static org.hamcrest.Matchers.empty;
@@ -44,11 +41,11 @@ public void validJsonSchema() throws Exception {
             empty());
     }
 
-    @Test
-    public void writeSchema() throws Exception {
-        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
-        writer.write(writeJSONSchema());
-        writer.close();
-    }
+//    @Test
+//    public void writeSchema() throws Exception {
+//        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
+//        writer.write(writeJSONSchema());
+//        writer.close();
+//    }
 
 }
diff --git a/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java
index 1b11370409..2bf070ffc6 100644
--- a/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java
+++ b/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java
@@ -1,12 +1,9 @@
 package io.jenkins.plugins.casc;
 
 import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule;
-import java.io.BufferedWriter;
-import java.io.FileWriter;
 import org.junit.Rule;
 import org.junit.Test;
 
-import static io.jenkins.plugins.casc.SchemaGeneration.writeJSONSchema;
 import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson;
 import static io.jenkins.plugins.casc.misc.Util.validateSchema;
 import static org.hamcrest.Matchers.contains;
@@ -56,10 +53,10 @@ public void attributesNotFlattenedToTopLevel() throws Exception {
     }
 
     //    For testing purposes.To be removed
-    @Test
-    public void writeSchema() throws Exception {
-        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
-        writer.write(writeJSONSchema());
-        writer.close();
-    }
+//    @Test
+//    public void writeSchema() throws Exception {
+//        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
+//        writer.write(writeJSONSchema());
+//        writer.close();
+//    }
 }

From 30fdbf8250e999a6a6942e5475c566347c5521ee Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Sun, 8 Dec 2019 13:14:04 +0000
Subject: [PATCH 72/93] Fix tests

---
 .../plugins/casc/validJenkinsBaseConfig.yml   |    2 -
 .../jenkins/plugins/casc/validSelfConfig.yml  |    5 -
 test-harness/schema.json                      | 1198 +++++++++++++++++
 .../casc/attributesNotFlattenedToTop.yml      |    0
 .../plugins/casc/invalidBaseConfig.yml        |    0
 .../plugins/casc/invalidToolBaseConfig.yml    |    0
 .../plugins/casc}/validJenkinsBaseConfig.yml  |    0
 .../jenkins/plugins/casc}/validSelfConfig.yml |    2 +-
 8 files changed, 1199 insertions(+), 8 deletions(-)
 delete mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfig.yml
 delete mode 100644 plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml
 create mode 100644 test-harness/schema.json
 rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/attributesNotFlattenedToTop.yml (100%)
 rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml (100%)
 rename {plugin => test-harness}/src/test/resources/io/jenkins/plugins/casc/invalidToolBaseConfig.yml (100%)
 rename {plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators => test-harness/src/test/resources/io/jenkins/plugins/casc}/validJenkinsBaseConfig.yml (100%)
 rename {plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators => test-harness/src/test/resources/io/jenkins/plugins/casc}/validSelfConfig.yml (84%)

diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfig.yml
deleted file mode 100644
index a143de028f..0000000000
--- a/plugin/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfig.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-jenkins:
-  systemMessage: "hi"
diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml b/plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml
deleted file mode 100644
index 06eb4d6f11..0000000000
--- a/plugin/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-configuration-as-code:
-  version: "1"
-  deprecated: warn
-  restricted: warn
-  unknown: warn
\ No newline at end of file
diff --git a/test-harness/schema.json b/test-harness/schema.json
new file mode 100644
index 0000000000..49da03faba
--- /dev/null
+++ b/test-harness/schema.json
@@ -0,0 +1,1198 @@
+{
+    "$schema": "http://json-schema.org/draft-07/schema#",
+    "description": "Jenkins Configuration as Code",
+    "additionalProperties": false,
+    "type": "object",
+    "properties": {
+        "security": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the security classifier",
+            "properties": {
+                "downloadSettings": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.DownloadSettings"
+                },
+                "cli": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"enabled": {"type": "boolean"}}
+                },
+                "queueItemAuthenticator": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.security.QueueItemAuthenticatorConfiguration"
+                },
+                "updateSiteWarningsConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.security.UpdateSiteWarningsConfiguration"
+                },
+                "queueitemauthenticator": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"mock": {"$id": "#/definitions/org.jvnet.hudson.test.MockQueueItemAuthenticator"}}
+                    }],
+                    "type": "object"
+                },
+                "masterKillSwitchConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.security.s2m.MasterKillSwitchConfiguration"
+                },
+                "masterkillswitchconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "remotingCLI": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.CLI"
+                },
+                "sSHD": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/org.jenkinsci.main.modules.sshd.SSHD"
+                },
+                "sshd": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"port": {"type": "integer"}}
+                },
+                "crumb": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "downloadsettings": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"useBrowser": {"type": "boolean"}}
+                },
+                "updatesitewarningsconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                }
+            }
+        },
+        "unclassified": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the unclassified classifier",
+            "properties": {
+                "jenkinslocationconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "adminAddress": {"type": "string"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "nodeProperties": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.GlobalNodePropertiesConfiguration"
+                },
+                "cloud": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "quietPeriod": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.GlobalQuietPeriodConfiguration"
+                },
+                "foobar": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "bar": {"type": "string"},
+                        "foo": {"type": "string"}
+                    }
+                },
+                "viewstabbar": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "usageStatistics": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.model.UsageStatistics"
+                },
+                "pollSCM": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.triggers.SCMTrigger$DescriptorImpl"
+                },
+                "scmretrycount": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "quietperiod": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "cascglobalconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"configurationPath": {"type": "string"}}
+                },
+                "usagestatistics": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "administrativeMonitorsConfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.management.AdministrativeMonitorsConfiguration"
+                },
+                "administrativemonitorsconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "masterBuild": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.MasterBuildConfiguration"
+                },
+                "projectNamingStrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.GlobalProjectNamingStrategyConfiguration"
+                },
+                "descriptorimpl": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"pollingThreadCount": {"type": "integer"}}
+                },
+                "defaultview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "myView": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.views.MyViewsTabBar$GlobalConfigurationImpl"
+                },
+                "fooBarGlobal": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBarGlobalConfiguration"
+                },
+                "foobarglobalconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"fooBar": {
+                        "additionalProperties": false,
+                        "type": "object",
+                        "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBar"
+                    }}
+                },
+                "scmRetryCount": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.GlobalSCMRetryCountConfiguration"
+                },
+                "casCGlobalConfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/io.jenkins.plugins.casc.CasCGlobalConfig"
+                },
+                "artifactManager": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.ArtifactManagerConfiguration"
+                },
+                "artifactmanagerfactory": {},
+                "fooBar": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DescriptorConfiguratorTest$FooBar"
+                },
+                "myview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "viewsTabBar": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.views.ViewsTabBar$GlobalConfigurationImpl"
+                },
+                "defaultView": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.views.GlobalDefaultViewConfiguration"
+                },
+                "plugin": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "shell": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.tasks.Shell$DescriptorImpl"
+                },
+                "foobarone": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "bar": {"type": "string"},
+                        "foo": {"type": "string"}
+                    }
+                },
+                "location": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.model.JenkinsLocationConfiguration"
+                },
+                "nodeproperties": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "projectnamingstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "masterbuild": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                }
+            }
+        },
+        "configuration-as-code": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the configuration-as-code classifier",
+            "properties": {
+                "restricted": {
+                    "type": "string",
+                    "enum": [
+                        "reject",
+                        "beta",
+                        "warn"
+                    ]
+                },
+                "deprecated": {
+                    "type": "string",
+                    "enum": [
+                        "reject",
+                        "warn"
+                    ]
+                },
+                "version": {
+                    "type": "string",
+                    "enum": ["1"]
+                },
+                "unknown": {
+                    "type": "string",
+                    "enum": [
+                        "reject",
+                        "warn"
+                    ]
+                }
+            }
+        },
+        "jenkins": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the jenkins classifier",
+            "properties": {
+                "standard": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "systemMessage": {"type": "string"},
+                "listview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "includeRegex": {"type": "string"},
+                        "columns": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.views.ListViewColumn"
+                        },
+                        "recurse": {"type": "boolean"},
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.ViewProperty"
+                        },
+                        "jobFilters": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.views.ViewJobFilter"
+                        }
+                    }
+                },
+                "computerlauncher": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"simpleCommandLauncher": {"$id": "#/definitions/org.jvnet.hudson.test.SimpleCommandLauncher"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jnlp": {"$id": "#/definitions/hudson.slaves.JNLPLauncher"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"command": {"$id": "#/definitions/hudson.slaves.CommandLauncher"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "cloud": {},
+                "mode": {
+                    "type": "string",
+                    "enum": [
+                        "NORMAL",
+                        "EXCLUSIVE"
+                    ]
+                },
+                "numExecutors": {"type": "integer"},
+                "view": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"all": {"$id": "#/definitions/hudson.model.AllView"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"proxy": {"$id": "#/definitions/hudson.model.ProxyView"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"myView": {"$id": "#/definitions/hudson.model.MyView"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"list": {"$id": "#/definitions/hudson.model.ListView"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "quietPeriod": {"type": "integer"},
+                "batchcommandinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "label": {"type": "string"},
+                        "toolHome": {"type": "string"},
+                        "command": {"type": "string"}
+                    }
+                },
+                "markupformatter": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"plainText": {"$id": "#/definitions/hudson.markup.EscapedMarkupFormatter"}}
+                    }],
+                    "type": "object"
+                },
+                "jDKs": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.model.JDK"
+                },
+                "labelString": {"type": "string"},
+                "retentionstrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"always": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Always"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"schedule": {"$id": "#/definitions/hudson.slaves.SimpleScheduledRetentionStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"demand": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Demand"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "weather": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "defaultcrumbissuer": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"excludeClientIPFromCrumb": {"type": "boolean"}}
+                },
+                "listviewcolumn": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jobName": {"$id": "#/definitions/hudson.views.JobColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"lastDuration": {"$id": "#/definitions/hudson.views.LastDurationColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"buildButton": {"$id": "#/definitions/hudson.views.BuildButtonColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"lastStable": {"$id": "#/definitions/hudson.views.LastStableColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"weather": {"$id": "#/definitions/hudson.views.WeatherColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"lastSuccess": {"$id": "#/definitions/hudson.views.LastSuccessColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"lastFailure": {"$id": "#/definitions/hudson.views.LastFailureColumn"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"status": {"$id": "#/definitions/hudson.views.StatusColumn"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "scmCheckoutRetryCount": {"type": "integer"},
+                "authorizationstrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacyAuthorizationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"loggedInUsersCanDoAnything": {"$id": "#/definitions/hudson.security.FullControlOnceLoggedInAuthorizationStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"unsecured": {"$id": "#/definitions/hudson.security.AuthorizationStrategy$Unsecured"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "patternprojectnamingstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "namePattern": {"type": "string"},
+                        "description": {"type": "string"},
+                        "forceExistingJobs": {"type": "boolean"}
+                    }
+                },
+                "jobname": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "always": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "proxyview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "proxiedViewName": {"type": "string"},
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.ViewProperty"
+                        }
+                    }
+                },
+                "zipextractioninstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "subdir": {"type": "string"},
+                        "label": {"type": "string"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "test": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "rawBuildsDir": {"type": "string"},
+                "adminwhitelistrule": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"enabled": {"type": "boolean"}}
+                },
+                "maveninstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "slaveAgentPort": {"type": "integer"},
+                "captchasupport": {},
+                "nodeproperty": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"toolLocation": {"$id": "#/definitions/hudson.tools.ToolLocationNodeProperty"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"envVars": {"$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "updateCenter": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.model.UpdateCenter"
+                },
+                "demand": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "idleDelay": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/long"
+                        },
+                        "inDemandDelay": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/long"
+                        }
+                    }
+                },
+                "myview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.ViewProperty"
+                        }
+                    }
+                },
+                "entry": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "value": {"type": "string"},
+                        "key": {"type": "string"}
+                    }
+                },
+                "proxy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/hudson.ProxyConfiguration"
+                },
+                "node": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"pretendSlave": {"$id": "#/definitions/org.jvnet.hudson.test.PretendSlave"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jenkins": {"$id": "#/definitions/jenkins.model.Jenkins"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"dumb": {"$id": "#/definitions/hudson.slaves.DumbSlave"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"cloud1PretendSlave": {"$id": "#/definitions/io.jenkins.plugins.casc.core.JenkinsConfiguratorCloudSupportTest$Cloud1PretendSlave"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "viewjobfilter": {},
+                "toolinstaller": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "jnlplauncher": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "vmargs": {"type": "string"},
+                        "tunnel": {"type": "string"}
+                    }
+                },
+                "fullcontrolonceloggedinauthorizationstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"allowAnonymousRead": {"type": "boolean"}}
+                },
+                "status": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "userwithpassword": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {"type": "string"},
+                        "id": {"type": "string"}
+                    }
+                },
+                "nodeName": {"type": "string"},
+                "toolproperty": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}}
+                    }],
+                    "type": "object"
+                },
+                "legacy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "securityrealm": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacySecurityRealm"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"local": {"$id": "#/definitions/hudson.security.HudsonPrivateSecurityRealm"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "simplescheduledretentionstrategy": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "keepUpWhenActive": {"type": "boolean"},
+                        "startTimeSpec": {"type": "string"},
+                        "upTimeMins": {"type": "integer"}
+                    }
+                },
+                "agentProtocols": {"type": "string"},
+                "proxyconfiguration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "password": {"type": "string"},
+                        "port": {"type": "integer"},
+                        "name": {"type": "string"},
+                        "testUrl": {"type": "string"},
+                        "userName": {"type": "string"},
+                        "noProxyHost": {"type": "string"}
+                    }
+                },
+                "crumbissuer": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"standard": {"$id": "#/definitions/hudson.security.csrf.DefaultCrumbIssuer"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"test": {"$id": "#/definitions/org.jvnet.hudson.test.TestCrumbIssuer"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "viewstabbar": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultViewsTabBar"}}
+                    }],
+                    "type": "object"
+                },
+                "simplecommandlauncher": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"cmd": {"type": "string"}}
+                },
+                "jenkins": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "authorizationStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.AuthorizationStrategy"
+                        },
+                        "nodeName": {"type": "string"},
+                        "systemMessage": {"type": "string"},
+                        "agentProtocols": {"type": "string"},
+                        "clouds": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.Cloud"
+                        },
+                        "primaryView": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.View"
+                        },
+                        "nodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        },
+                        "mode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "numExecutors": {"type": "integer"},
+                        "quietPeriod": {"type": "integer"},
+                        "labelString": {"type": "string"},
+                        "scmCheckoutRetryCount": {"type": "integer"},
+                        "projectNamingStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.model.ProjectNamingStrategy"
+                        },
+                        "views": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.View"
+                        },
+                        "crumbIssuer": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.csrf.CrumbIssuer"
+                        },
+                        "disableRememberMe": {"type": "boolean"},
+                        "markupFormatter": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.markup.MarkupFormatter"
+                        },
+                        "globalNodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        },
+                        "securityRealm": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.SecurityRealm"
+                        },
+                        "slaveAgentPort": {"type": "integer"},
+                        "myViewsTabBar": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.views.MyViewsTabBar"
+                        },
+                        "updateCenter": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.UpdateCenter"
+                        },
+                        "proxy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.ProxyConfiguration"
+                        },
+                        "viewsTabBar": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.views.ViewsTabBar"
+                        },
+                        "nodes": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.Node"
+                        },
+                        "remotingSecurity": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule"
+                        }
+                    }
+                },
+                "commandinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "label": {"type": "string"},
+                        "toolHome": {"type": "string"},
+                        "command": {"type": "string"}
+                    }
+                },
+                "buildbutton": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "dumbslave": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "mode": {
+                            "type": "string",
+                            "enum": [
+                                "NORMAL",
+                                "EXCLUSIVE"
+                            ]
+                        },
+                        "nodeName": {"type": "string"},
+                        "numExecutors": {"type": "integer"},
+                        "retentionStrategy": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
+                        },
+                        "labelString": {"type": "string"},
+                        "name": {"type": "string"},
+                        "nodeDescription": {"type": "string"},
+                        "remoteFS": {"type": "string"},
+                        "userId": {"type": "string"},
+                        "launcher": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
+                        },
+                        "nodeProperties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.slaves.NodeProperty"
+                        }
+                    }
+                },
+                "laststable": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "disableRememberMe": {"type": "boolean"},
+                "toollocation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "key": {"type": "string"},
+                        "home": {"type": "string"}
+                    }
+                },
+                "hudsonprivatesecurityrealm": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "captchaSupport": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
+                        },
+                        "allowsSignup": {"type": "boolean"},
+                        "enableCaptcha": {"type": "boolean"},
+                        "users": {
+                            "type": "object",
+                            "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword"
+                        }
+                    }
+                },
+                "lastfailure": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "jdkinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "id": {"type": "string"},
+                        "acceptLicense": {"type": "boolean"}
+                    }
+                },
+                "lastsuccess": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "commandlauncher": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"command": {"type": "string"}}
+                },
+                "plaintext": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "unsecured": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "jdk": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "allview": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.model.ViewProperty"
+                        }
+                    }
+                },
+                "lastduration": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "remotingSecurity": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule"
+                },
+                "myviewstabbar": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultMyViewsTabBar"}}
+                    }],
+                    "type": "object"
+                },
+                "updatesite": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "id": {"type": "string"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "projectnamingstrategy": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"standard": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"pattern": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$PatternProjectNamingStrategy"}}
+                        }
+                    ],
+                    "type": "object"
+                }
+            }
+        },
+        "tool": {
+            "additionalProperties": false,
+            "type": "object",
+            "title": "Configuration base for the tool classifier",
+            "properties": {
+                "toolproperty": {
+                    "oneOf": [{
+                        "additionalProperties": false,
+                        "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}}
+                    }],
+                    "type": "object"
+                },
+                "standard": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {}
+                },
+                "zipextractioninstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "subdir": {"type": "string"},
+                        "label": {"type": "string"},
+                        "url": {"type": "string"}
+                    }
+                },
+                "jdkinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "id": {"type": "string"},
+                        "acceptLicense": {"type": "boolean"}
+                    }
+                },
+                "maven": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "$id": "#/definitions/jenkins.mvn.GlobalMavenConfig"
+                },
+                "globalsettingsprovider": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultGlobalSettingsProvider"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathGlobalSettingsProvider"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "maveninstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"id": {"type": "string"}}
+                },
+                "globalmavenconfig": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "settingsProvider": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.mvn.SettingsProvider"
+                        },
+                        "installations": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tasks.Maven$MavenInstallation"
+                        },
+                        "globalSettingsProvider": {
+                            "additionalProperties": false,
+                            "type": "object",
+                            "$id": "#/definitions/jenkins.mvn.GlobalSettingsProvider"
+                        }
+                    }
+                },
+                "filepathsettingsprovider": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"path": {"type": "string"}}
+                },
+                "jdk": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "settingsprovider": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultSettingsProvider"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathSettingsProvider"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "filepathglobalsettingsprovider": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {"path": {"type": "string"}}
+                },
+                "batchcommandinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "label": {"type": "string"},
+                        "toolHome": {"type": "string"},
+                        "command": {"type": "string"}
+                    }
+                },
+                "maveninstallation": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "name": {"type": "string"},
+                        "properties": {
+                            "type": "object",
+                            "$id": "#/definitions/hudson.tools.ToolProperty"
+                        },
+                        "home": {"type": "string"}
+                    }
+                },
+                "toolinstaller": {
+                    "oneOf": [
+                        {
+                            "additionalProperties": false,
+                            "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}}
+                        },
+                        {
+                            "additionalProperties": false,
+                            "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}}
+                        }
+                    ],
+                    "type": "object"
+                },
+                "commandinstaller": {
+                    "additionalProperties": false,
+                    "type": "object",
+                    "properties": {
+                        "label": {"type": "string"},
+                        "toolHome": {"type": "string"},
+                        "command": {"type": "string"}
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/attributesNotFlattenedToTop.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/attributesNotFlattenedToTop.yml
similarity index 100%
rename from plugin/src/test/resources/io/jenkins/plugins/casc/attributesNotFlattenedToTop.yml
rename to test-harness/src/test/resources/io/jenkins/plugins/casc/attributesNotFlattenedToTop.yml
diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml
similarity index 100%
rename from plugin/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml
rename to test-harness/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml
diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/invalidToolBaseConfig.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/invalidToolBaseConfig.yml
similarity index 100%
rename from plugin/src/test/resources/io/jenkins/plugins/casc/invalidToolBaseConfig.yml
rename to test-harness/src/test/resources/io/jenkins/plugins/casc/invalidToolBaseConfig.yml
diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validJenkinsBaseConfig.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfig.yml
similarity index 100%
rename from plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validJenkinsBaseConfig.yml
rename to test-harness/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfig.yml
diff --git a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validSelfConfig.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml
similarity index 84%
rename from plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validSelfConfig.yml
rename to test-harness/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml
index 421656694d..35cc7b81a9 100644
--- a/plugin/src/test/resources/io/jenkins/plugins/casc/impl/configurators/validSelfConfig.yml
+++ b/test-harness/src/test/resources/io/jenkins/plugins/casc/validSelfConfig.yml
@@ -1,5 +1,5 @@
 configuration-as-code:
-  version: 1
+  version: "1"
   deprecated: "warn"
   restricted: "warn"
   unknown: "warn"
\ No newline at end of file

From 912b46d48e35a22f56aeaaa94bbdbbea7e7642fa Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Sun, 8 Dec 2019 17:50:48 +0000
Subject: [PATCH 73/93] Add symbol support and fix tests

---
 demos/schema.json                             | 6723 -----------------
 .../plugins/casc/AzureKeyVaultTest.java       |    7 -
 .../io/jenkins/plugins/casc/SlackTest.java    |    8 -
 plugin/schema.json                            | 1151 ---
 .../plugins/casc/SchemaGeneration.java        |   27 +-
 .../HeteroDescribableConfigurator.java        |    3 +-
 test-harness/schema.json                      | 1198 ---
 .../plugins/casc/invalidBaseConfig.yml        |    3 -
 .../plugins/casc/validSchemaConfig.yml        |    5 +-
 9 files changed, 28 insertions(+), 9097 deletions(-)
 delete mode 100644 demos/schema.json
 delete mode 100644 plugin/schema.json
 delete mode 100644 test-harness/schema.json

diff --git a/demos/schema.json b/demos/schema.json
deleted file mode 100644
index 44581e7502..0000000000
--- a/demos/schema.json
+++ /dev/null
@@ -1,6723 +0,0 @@
-{
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "description": "Jenkins Configuration as Code",
-    "additionalProperties": false,
-    "type": "object",
-    "properties": {
-        "": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the  classifier",
-            "properties": {
-                "credentialsproviderfilter": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"excludes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsProviderFilter$Excludes"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"includes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsProviderFilter$Includes"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"none": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsProviderFilter$None"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "excludes": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "provider": {"type": "string"},
-                        "type": {"type": "string"}
-                    }
-                },
-                "configuration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "credentialstypefilter": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"excludes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsTypeFilter$Excludes"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"includes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsTypeFilter$Includes"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"none": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsTypeFilter$None"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "includes": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "provider": {"type": "string"},
-                        "type": {"type": "string"}
-                    }
-                },
-                "none": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "credentialsprovidertyperestriction": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"excludes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsProviderTypeRestriction$Excludes"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"includes": {"$id": "#/definitions/com.cloudbees.plugins.credentials.CredentialsProviderTypeRestriction$Includes"}}
-                        }
-                    ],
-                    "type": "object"
-                }
-            }
-        },
-        "security": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the security classifier",
-            "properties": {
-                "downloadSettings": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.DownloadSettings"
-                },
-                "queueItemAuthenticator": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.QueueItemAuthenticatorConfiguration"
-                },
-                "updateSiteWarningsConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.UpdateSiteWarningsConfiguration"
-                },
-                "queueitemauthenticator": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"mock": {"$id": "#/definitions/org.jvnet.hudson.test.MockQueueItemAuthenticator"}}
-                    }],
-                    "type": "object"
-                },
-                "globalJobDslSecurityConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/javaposse.jobdsl.plugin.GlobalJobDslSecurityConfiguration"
-                },
-                "masterKillSwitchConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.s2m.MasterKillSwitchConfiguration"
-                },
-                "masterkillswitchconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "sSHD": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.main.modules.sshd.SSHD"
-                },
-                "sshd": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"port": {"type": "integer"}}
-                },
-                "apitokenpropertyconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "tokenGenerationOnCreationEnabled": {"type": "boolean"},
-                        "creationOfLegacyTokenEnabled": {"type": "boolean"},
-                        "usageStatisticsEnabled": {"type": "boolean"}
-                    }
-                },
-                "crumb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "apiToken": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.apitoken.ApiTokenPropertyConfiguration"
-                },
-                "scriptApproval": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval"
-                },
-                "globaljobdslsecurityconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"useScriptSecurity": {"type": "boolean"}}
-                },
-                "downloadsettings": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"useBrowser": {"type": "boolean"}}
-                },
-                "updatesitewarningsconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                }
-            }
-        },
-        "unclassified": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the unclassified classifier",
-            "properties": {
-                "buildchoosersetting": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"buildChooser": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.plugins.git.util.BuildChooser"
-                    }}
-                },
-                "": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "submoduleconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "branches": {"type": "string"},
-                        "submoduleName": {"type": "string"}
-                    }
-                },
-                "githubtrustcontributors": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "fastestReadSpeed": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.FastestReadSpeedStrategy$DescriptorImpl"
-                },
-                "simplethemedecorator": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "faviconUrl": {"type": "string"},
-                        "cssUrl": {"type": "string"},
-                        "elements": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.simpletheme.ThemeElement"
-                        },
-                        "cssRules": {"type": "string"},
-                        "jsUrl": {"type": "string"}
-                    }
-                },
-                "rhodecode": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "groovyscript": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "providerId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "comment": {"type": "string"},
-                        "id": {"type": "string"},
-                        "content": {"type": "string"}
-                    }
-                },
-                "ivyBuildTrigger": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.ivy.IvyBuildTrigger$DescriptorImpl"
-                },
-                "fastestreadspeed": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "gitscmsource": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "traits": {
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.scm.api.trait.SCMSourceTrait"
-                        },
-                        "credentialsId": {"type": "string"},
-                        "id": {"type": "string"},
-                        "remote": {"type": "string"}
-                    }
-                },
-                "quietPeriod": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalQuietPeriodConfiguration"
-                },
-                "wildcardscmheadfiltertrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "excludes": {"type": "string"},
-                        "includes": {"type": "string"}
-                    }
-                },
-                "fisheyegitrepositorybrowser": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "mostusablespacestrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"estimatedWorkspaceSize": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/long"
-                    }}
-                },
-                "scm": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"git": {"$id": "#/definitions/hudson.plugins.git.GitSCM"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mercurial": {"$id": "#/definitions/hudson.plugins.mercurial.MercurialSCM"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"none": {"$id": "#/definitions/hudson.scm.NullSCM"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "masterBuild": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.MasterBuildConfiguration"
-                },
-                "singlescmsource": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "traits": {
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.scm.api.trait.SCMSourceTrait"
-                        },
-                        "name": {"type": "string"},
-                        "id": {"type": "string"},
-                        "scm": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.scm.SCM"
-                        }
-                    }
-                },
-                "userprovideddiskinfo": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "writeSpeed": {"type": "integer"},
-                        "readSpeed": {"type": "integer"}
-                    }
-                },
-                "hgweb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "s3": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "cleancheckout": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "globalConfigFiles": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.configfiles.GlobalConfigFiles"
-                },
-                "jiraGlobalConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.plugins.jira.JiraGlobalConfiguration"
-                },
-                "ivyModuleSet": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.ivy.IvyModuleSet$DescriptorImpl"
-                },
-                "scmRetryCount": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalSCMRetryCountConfiguration"
-                },
-                "prunestalebranch": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "bitbucketweb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "userremoteconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "credentialsId": {"type": "string"},
-                        "refspec": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "prebuildmerge": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"options": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.plugins.git.UserMergeOptions"
-                    }}
-                },
-                "hooksecretconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"credentialsId": {"type": "string"}}
-                },
-                "viewsTabBar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.views.ViewsTabBar$GlobalConfigurationImpl"
-                },
-                "kallithea": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "jirasite": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "roleVisibility": {"type": "string"},
-                        "appendChangeTimestamp": {"type": "boolean"},
-                        "recordScmChanges": {"type": "boolean"},
-                        "supportsWikiStyleComment": {"type": "boolean"},
-                        "updateJiraIssueForAllStatus": {"type": "boolean"},
-                        "alternativeUrl": {"type": "string"},
-                        "credentialsId": {"type": "string"},
-                        "timeout": {"type": "integer"},
-                        "url": {"type": "string"},
-                        "threadExecutorNumber": {"type": "integer"},
-                        "groupVisibility": {"type": "string"},
-                        "useHTTPAuth": {"type": "boolean"},
-                        "readTimeout": {"type": "integer"},
-                        "disableChangelogAnnotations": {"type": "boolean"},
-                        "dateTimePattern": {"type": "string"},
-                        "userPattern": {"type": "string"}
-                    }
-                },
-                "authorinchangelog": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "nodeproperties": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "usermergeoptions": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "mergeStrategy": {
-                            "type": "string",
-                            "enum": [
-                                "default",
-                                "resolve",
-                                "recursive",
-                                "octopus",
-                                "ours",
-                                "subtree",
-                                "recursive_theirs"
-                            ]
-                        },
-                        "fastForwardMode": {
-                            "type": "string",
-                            "enum": [
-                                "--ff",
-                                "--ff-only",
-                                "--no-ff"
-                            ]
-                        },
-                        "mergeTarget": {"type": "string"},
-                        "mergeRemote": {"type": "string"}
-                    }
-                },
-                "gitoriousweb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "userexclusion": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"excludedUsers": {"type": "string"}}
-                },
-                "mercurialinstallationscmsourcetrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"installation": {"type": "string"}}
-                },
-                "npmregistry": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "credentialsId": {"type": "string"},
-                        "scopes": {"type": "string"},
-                        "hasScopes": {"type": "boolean"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "gitbrowserscmsourcetrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"browser": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.plugins.git.browser.GitRepositoryBrowser"
-                    }}
-                },
-                "classselector": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"selectedClass": {"type": "string"}}
-                },
-                "default": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "endpoint": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "apiUri": {"type": "string"},
-                        "name": {"type": "string"}
-                    }
-                },
-                "sonarGlobalConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.plugins.sonar.SonarGlobalConfiguration"
-                },
-                "cascglobalconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"configurationPath": {"type": "string"}}
-                },
-                "messageexclusion": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"excludedMessage": {"type": "string"}}
-                },
-                "mercurialscmsource": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "traits": {
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.scm.api.trait.SCMSourceTrait"
-                        },
-                        "credentialsId": {"type": "string"},
-                        "id": {"type": "string"},
-                        "source": {"type": "string"}
-                    }
-                },
-                "email": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "defaultview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "gitblitrepositorybrowser": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "repoUrl": {"type": "string"},
-                        "projectName": {"type": "string"}
-                    }
-                },
-                "cloneoption": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "reference": {"type": "string"},
-                        "noTags": {"type": "boolean"},
-                        "depth": {"type": "integer"},
-                        "honorRefspec": {"type": "boolean"},
-                        "shallow": {"type": "boolean"},
-                        "timeout": {"type": "integer"}
-                    }
-                },
-                "nodedisk": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "nodeMountPoint": {"type": "string"},
-                        "diskRefId": {"type": "string"}
-                    }
-                },
-                "faviconurlthemeelement": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "warningsParsers": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/io.jenkins.plugins.analysis.warnings.groovy.ParserConfiguration"
-                },
-                "plugin": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "jobrestriction": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"multipleAnd": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.MultipleAndJobRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"not": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.NotJobRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"or": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.OrJobRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"multipleOr": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.MultipleOrJobRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"and": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.AndJobRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"startedByMemberOfGroupRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.StartedByMemberOfGroupRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"regexNameRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.RegexNameRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"startedByUserRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.StartedByUserRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jobClassNameRestriction": {"$id": "#/definitions/io.jenkins.plugins.jobrestrictions.restrictions.job.JobClassNameRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"any": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.AnyJobRestriction"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "jellytemplateconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "providerId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "comment": {"type": "string"},
-                        "id": {"type": "string"},
-                        "content": {"type": "string"}
-                    }
-                },
-                "projectnamingstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "config": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mavenToolchains": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.MavenToolchainsConfig"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jellyTemplate": {"$id": "#/definitions/hudson.plugins.emailext.JellyTemplateConfig"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"groovyTemplate": {"$id": "#/definitions/hudson.plugins.emailext.GroovyTemplateConfig"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"groovyScript": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.groovy.GroovyScript"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"xml": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.xml.XmlConfig"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"globalMavenSettings": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"custom": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.custom.CustomConfig"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"json": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.json.JsonConfig"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"npm": {"$id": "#/definitions/jenkins.plugins.nodejs.configfiles.NPMConfig"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mavenSettings": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "remotenamescmsourcetrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"remoteName": {"type": "string"}}
-                },
-                "gitrepositorybrowser": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitiles": {"$id": "#/definitions/hudson.plugins.git.browser.Gitiles"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cGit": {"$id": "#/definitions/hudson.plugins.git.browser.CGit"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitList": {"$id": "#/definitions/hudson.plugins.git.browser.GitList"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"bitBucket": {"$id": "#/definitions/hudson.plugins.mercurial.browser.BitBucket"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"viewGitWeb": {"$id": "#/definitions/hudson.plugins.git.browser.ViewGitWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"redmineWeb": {"$id": "#/definitions/hudson.plugins.git.browser.RedmineWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"bitbucketWeb": {"$id": "#/definitions/hudson.plugins.git.browser.BitbucketWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"kilnHG": {"$id": "#/definitions/hudson.plugins.mercurial.browser.KilnHG"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"fishEye": {"$id": "#/definitions/hudson.plugins.mercurial.browser.FishEye"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitLab": {"$id": "#/definitions/hudson.plugins.git.browser.GitLab"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"rhodeCode": {"$id": "#/definitions/hudson.plugins.git.browser.RhodeCode"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"kilnGit": {"$id": "#/definitions/hudson.plugins.git.browser.KilnGit"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GitWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitBlitRepositoryBrowser": {"$id": "#/definitions/hudson.plugins.git.browser.GitBlitRepositoryBrowser"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitoriousWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GitoriousWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"tfs2013": {"$id": "#/definitions/hudson.plugins.git.browser.TFS2013GitRepositoryBrowser"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"rhodeCodeLegacy": {"$id": "#/definitions/hudson.plugins.mercurial.browser.RhodeCodeLegacy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"phabricator": {"$id": "#/definitions/hudson.plugins.git.browser.Phabricator"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"googleCode": {"$id": "#/definitions/hudson.plugins.mercurial.browser.GoogleCode"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gogsGit": {"$id": "#/definitions/hudson.plugins.git.browser.GogsGit"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"fisheye": {"$id": "#/definitions/hudson.plugins.git.browser.FisheyeGitRepositoryBrowser"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"kallithea": {"$id": "#/definitions/hudson.plugins.mercurial.browser.Kallithea"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"githubWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GithubWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"hgWeb": {"$id": "#/definitions/hudson.plugins.mercurial.browser.HgWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"assemblaWeb": {"$id": "#/definitions/hudson.plugins.git.browser.AssemblaWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"stash": {"$id": "#/definitions/hudson.plugins.git.browser.Stash"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "mailaccount": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "address": {"type": "string"},
-                        "smtpHost": {"type": "string"},
-                        "advProperties": {"type": "string"},
-                        "jo": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/net.sf.json.JSONObject"
-                        },
-                        "smtpUsername": {"type": "string"},
-                        "smtpPort": {"type": "string"},
-                        "smtpPassword": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.util.Secret"
-                        },
-                        "useSsl": {"type": "boolean"}
-                    }
-                },
-                "ignorenotifycommit": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "triggersconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "envVar": {"type": "string"},
-                        "skipScmCause": {"type": "boolean"},
-                        "skipUpstreamCause": {"type": "boolean"}
-                    }
-                },
-                "bitbucket": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "fastestWriteSpeed": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.FastestWriteSpeedStrategy$DescriptorImpl"
-                },
-                "gogsgit": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "libraryretriever": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"modernSCM": {"$id": "#/definitions/org.jenkinsci.plugins.workflow.libs.SCMSourceRetriever"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"legacySCM": {"$id": "#/definitions/org.jenkinsci.plugins.workflow.libs.SCMRetriever"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "slackNotifier": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.plugins.slack.SlackNotifier$DescriptorImpl"
-                },
-                "scmsourcetrait": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"tagDiscoveryTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.TagDiscoveryTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitLFSPullTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.GitLFSPullTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"ignoreOnPushNotificationTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.IgnoreOnPushNotificationTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cleanMercurial": {"$id": "#/definitions/hudson.plugins.mercurial.traits.CleanMercurialSCMSourceTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cloneOptionTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.CloneOptionTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"submoduleOptionTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.SubmoduleOptionTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitTool": {"$id": "#/definitions/jenkins.plugins.git.traits.GitToolSCMSourceTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"wipeWorkspaceTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.WipeWorkspaceTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"branchDiscoveryTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.BranchDiscoveryTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"localBranchTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.LocalBranchTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cleanBeforeCheckoutTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.CleanBeforeCheckoutTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubBranchDiscovery": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"discoverOtherRefsTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.DiscoverOtherRefsTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cleanAfterCheckoutTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.CleanAfterCheckoutTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"pruneStaleBranchTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.PruneStaleBranchTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubForkDiscovery": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubSshCheckout": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.SSHCheckoutTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitBrowser": {"$id": "#/definitions/jenkins.plugins.git.traits.GitBrowserSCMSourceTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"refSpecs": {"$id": "#/definitions/jenkins.plugins.git.traits.RefSpecsSCMSourceTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mercurialInstallation": {"$id": "#/definitions/hudson.plugins.mercurial.traits.MercurialInstallationSCMSourceTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"userIdentityTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.UserIdentityTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"headWildcardFilter": {"$id": "#/definitions/jenkins.scm.impl.trait.WildcardSCMHeadFilterTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubTagDiscovery": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.TagDiscoveryTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"authorInChangelogTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.AuthorInChangelogTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mercurialBrowser": {"$id": "#/definitions/hudson.plugins.mercurial.traits.MercurialBrowserSCMSourceTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"checkoutOptionTrait": {"$id": "#/definitions/jenkins.plugins.git.traits.CheckoutOptionTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"originPullRequestDiscoveryTrait": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"headRegexFilter": {"$id": "#/definitions/jenkins.scm.impl.trait.RegexSCMHeadFilterTrait"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"remoteName": {"$id": "#/definitions/jenkins.plugins.git.traits.RemoteNameSCMSourceTrait"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "cgit": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "myView": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.views.MyViewsTabBar$GlobalConfigurationImpl"
-                },
-                "statisticsconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "buildStepUrl": {"type": "string"},
-                        "awsRegion": {"type": "string"},
-                        "projectUrl": {"type": "string"},
-                        "awsAccessKey": {"type": "string"},
-                        "buildInfo": {"type": "boolean"},
-                        "scmCheckoutInfo": {"type": "boolean"},
-                        "shouldSendApiHttpRequests": {"type": "boolean"},
-                        "queueUrl": {"type": "string"},
-                        "awsSecretKey": {"type": "string"},
-                        "scmCheckoutUrl": {"type": "string"},
-                        "buildStepInfo": {"type": "boolean"},
-                        "projectInfo": {"type": "boolean"},
-                        "queueInfo": {"type": "boolean"},
-                        "snsTopicArn": {"type": "string"},
-                        "logbackConfigXmlUrl": {"type": "string"},
-                        "buildUrl": {"type": "string"},
-                        "shouldSendToLogback": {"type": "boolean"},
-                        "shouldPublishToAwsSnsQueue": {"type": "boolean"}
-                    }
-                },
-                "scmsourceretriever": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"scm": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/jenkins.scm.api.SCMSource"
-                    }}
-                },
-                "mavenModuleSet": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.maven.MavenModuleSet$DescriptorImpl"
-                },
-                "scmname": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"name": {"type": "string"}}
-                },
-                "jcloudsartifactmanagerfactory": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"provider": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/io.jenkins.plugins.artifact_manager_jclouds.BlobStoreProvider"
-                    }}
-                },
-                "githubserverconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "apiUrl": {"type": "string"},
-                        "clientCacheSize": {"type": "integer"},
-                        "manageHooks": {"type": "boolean"},
-                        "name": {"type": "string"},
-                        "credentialsId": {"type": "string"}
-                    }
-                },
-                "startedbyuserrestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "usersList": {
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.UserSelector"
-                        },
-                        "acceptAnonymousUsers": {"type": "boolean"},
-                        "acceptAutomaticRuns": {"type": "boolean"},
-                        "checkUpstreamProjects": {"type": "boolean"}
-                    }
-                },
-                "azurekeyvaultglobalconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "keyVaultURL": {"type": "string"},
-                        "credentialID": {"type": "string"}
-                    }
-                },
-                "groovyparser": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "regexp": {"type": "string"},
-                        "name": {"type": "string"},
-                        "id": {"type": "string"},
-                        "script": {"type": "string"},
-                        "example": {"type": "string"}
-                    }
-                },
-                "myview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "perbuildtag": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "gitlfspull": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "shell": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.tasks.Shell$DescriptorImpl"
-                },
-                "diskallocationstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"fastestReadSpeed": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.FastestReadSpeedStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"fastestWriteSpeed": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.FastestWriteSpeedStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mostUsableSpace": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.MostUsableSpaceStrategy"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "regexscmheadfiltertrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"regex": {"type": "string"}}
-                },
-                "refspectemplate": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"value": {"type": "string"}}
-                },
-                "keycloakSecurityRealm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.KeycloakSecurityRealm$DescriptorImpl"
-                },
-                "regexnamerestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "checkShortName": {"type": "boolean"},
-                        "regexExpression": {"type": "string"}
-                    }
-                },
-                "groovyscriptpath": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"path": {"type": "string"}}
-                },
-                "gitscm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "extensions": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.git.extensions.GitSCMExtension"
-                        },
-                        "gitTool": {"type": "string"},
-                        "submoduleCfg": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.git.SubmoduleConfig"
-                        },
-                        "userRemoteConfigs": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.git.UserRemoteConfig"
-                        },
-                        "browser": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.git.browser.GitRepositoryBrowser"
-                        },
-                        "buildChooser": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.git.util.BuildChooser"
-                        },
-                        "doGenerateSubmoduleConfigurations": {"type": "boolean"},
-                        "branches": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.git.BranchSpec"
-                        }
-                    }
-                },
-                "kilnhg": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "hashicorpVault": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/com.datapipe.jenkins.vault.configuration.GlobalVaultConfiguration"
-                },
-                "nodediskpool": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "diskPoolRefId": {"type": "string"},
-                        "nodeDisks": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.nodes.NodeDisk"
-                        }
-                    }
-                },
-                "usageStatistics": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.model.UsageStatistics"
-                },
-                "disableremotepoll": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "checkoutoption": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"timeout": {"type": "integer"}}
-                },
-                "projectNamingStrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalProjectNamingStrategyConfiguration"
-                },
-                "groupselector": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"selectedGroupId": {"type": "string"}}
-                },
-                "npmconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "providerId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "comment": {"type": "string"},
-                        "id": {"type": "string"},
-                        "registries": {
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.plugins.nodejs.configfiles.NPMRegistry"
-                        },
-                        "content": {"type": "string"}
-                    }
-                },
-                "originpullrequestdiscoverytrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"strategyId": {"type": "integer"}}
-                },
-                "branchspec": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"name": {"type": "string"}}
-                },
-                "changelogtobranch": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"options": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.plugins.git.ChangelogToBranchOptions"
-                    }}
-                },
-                "metricsAccessKey": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.metrics.api.MetricsAccessKey$DescriptorImpl"
-                },
-                "githubtrustpermissions": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "location": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.JenkinsLocationConfiguration"
-                },
-                "gitLabConnectionConfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/com.dabsquared.gitlabjenkins.connection.GitLabConnectionConfig"
-                },
-                "stash": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "artifactoryBuilder": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jfrog.hudson.ArtifactoryBuilder$DescriptorImpl"
-                },
-                "pathrestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "excludedRegions": {"type": "string"},
-                        "includedRegions": {"type": "string"}
-                    }
-                },
-                "discoverotherrefstrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "ref": {"type": "string"},
-                        "nameMapping": {"type": "string"}
-                    }
-                },
-                "ivybuildtrigger": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "mercurialbrowserscmsourcetrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"browser": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.plugins.mercurial.browser.HgBrowser"
-                    }}
-                },
-                "jenkinslocationconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "adminAddress": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "credentialsconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "overridingCredentials": {"type": "boolean"},
-                        "credentialsId": {"type": "string"},
-                        "ignoreCredentialPluginDisabled": {"type": "boolean"},
-                        "username": {"type": "string"}
-                    }
-                },
-                "globalLibraries": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.workflow.libs.GlobalLibraries"
-                },
-                "useridentitytrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"extension": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.plugins.git.extensions.impl.UserIdentity"
-                    }}
-                },
-                "scmheadauthority": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubTrustNobody": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustNobody"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"originChangeRequest": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.OriginPullRequestDiscoveryTrait$OriginChangeRequestSCMHeadAuthority"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubTrustEveryone": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustEveryone"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubTrustPermissions": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustPermission"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"tag": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.TagDiscoveryTrait$TagSCMHeadAuthority"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubBranchHeadAuthority": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait$BranchSCMHeadAuthority"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubTrustContributors": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustContributors"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"branch": {"$id": "#/definitions/jenkins.plugins.git.traits.BranchDiscoveryTrait$BranchSCMHeadAuthority"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "groovytemplateconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "providerId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "comment": {"type": "string"},
-                        "id": {"type": "string"},
-                        "content": {"type": "string"}
-                    }
-                },
-                "gitscmextension": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"buildChooserSetting": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.BuildChooserSetting"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"preBuildMerge": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.PreBuildMerge"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitLFSPull": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.GitLFSPull"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cleanCheckout": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.CleanCheckout"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"changelogToBranch": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.ChangelogToBranch"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"pathRestriction": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.PathRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"scmName": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.ScmName"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"authorInChangelog": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.AuthorInChangelog"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"checkoutOption": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.CheckoutOption"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"userIdentity": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.UserIdentity"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cloneOption": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.CloneOption"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"disableRemotePoll": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.DisableRemotePoll"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"relativeTargetDirectory": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.RelativeTargetDirectory"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cleanBeforeCheckout": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.CleanBeforeCheckout"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"ignoreNotifyCommit": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.IgnoreNotifyCommit"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"messageExclusion": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.MessageExclusion"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"wipeWorkspace": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.WipeWorkspace"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"userExclusion": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.UserExclusion"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"pruneStaleBranch": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.PruneStaleBranch"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"submoduleOption": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.SubmoduleOption"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"sparseCheckoutPaths": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.SparseCheckoutPaths"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"perBuildTag": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.PerBuildTag"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"localBranch": {"$id": "#/definitions/hudson.plugins.git.extensions.impl.LocalBranch"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "none": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "localrepositorylocator": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"perExecutor": {"$id": "#/definitions/hudson.maven.local_repo.PerExecutorLocalRepositoryLocator"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"default": {"$id": "#/definitions/hudson.maven.local_repo.DefaultLocalRepositoryLocator"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"perJob": {"$id": "#/definitions/hudson.maven.local_repo.PerJobLocalRepositoryLocator"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "gitHubPluginConfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.github.config.GitHubPluginConfig"
-                },
-                "scmsource": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"fromScm": {"$id": "#/definitions/jenkins.scm.impl.SingleSCMSource"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"github": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.GitHubSCMSource"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"git": {"$id": "#/definitions/jenkins.plugins.git.GitSCMSource"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mercurial": {"$id": "#/definitions/hudson.plugins.mercurial.MercurialSCMSource"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "tfs2013gitrepositorybrowser": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "gitlist": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "scmretrycount": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "usagestatistics": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "orjobrestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "first": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                        },
-                        "second": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                        }
-                    }
-                },
-                "descriptorimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "keycloakValidate": {"type": "boolean"},
-                        "keycloakIdp": {"type": "string"},
-                        "keycloakRespectAccessTokenTimeout": {"type": "boolean"},
-                        "keycloakJson": {"type": "string"}
-                    }
-                },
-                "googlecode": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "githubtagdiscovery": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "sonarglobalconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "installations": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.sonar.SonarInstallation"
-                        },
-                        "buildWrapperEnabled": {"type": "boolean"}
-                    }
-                },
-                "localbranch": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"localBranch": {"type": "string"}}
-                },
-                "ancestrybuildchooser": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "ancestorCommitSha1": {"type": "string"},
-                        "maximumAgeInDays": {"type": "integer"}
-                    }
-                },
-                "githubscmsource": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "apiUri": {"type": "string"},
-                        "traits": {
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.scm.api.trait.SCMSourceTrait"
-                        },
-                        "repoOwner": {"type": "string"},
-                        "credentialsId": {"type": "string"},
-                        "id": {"type": "string"},
-                        "repository": {"type": "string"},
-                        "configuredByUrl": {"type": "boolean"},
-                        "repositoryUrl": {"type": "string"}
-                    }
-                },
-                "statisticsConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkins.plugins.statistics.gatherer.StatisticsConfiguration"
-                },
-                "sshcheckouttrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"credentialsId": {"type": "string"}}
-                },
-                "mostUsableSpace": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.ewm.strategies.MostUsableSpaceStrategy$DescriptorImpl"
-                },
-                "gitSCM": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.plugins.git.GitSCM$DescriptorImpl"
-                },
-                "checkoutoptiontrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"extension": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.plugins.git.extensions.impl.CheckoutOption"
-                    }}
-                },
-                "hgbrowser": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitiles": {"$id": "#/definitions/hudson.plugins.git.browser.Gitiles"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"tFS2013GitRepositoryBrowser": {"$id": "#/definitions/hudson.plugins.git.browser.TFS2013GitRepositoryBrowser"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cGit": {"$id": "#/definitions/hudson.plugins.git.browser.CGit"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitList": {"$id": "#/definitions/hudson.plugins.git.browser.GitList"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"bitBucket": {"$id": "#/definitions/hudson.plugins.mercurial.browser.BitBucket"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"viewGitWeb": {"$id": "#/definitions/hudson.plugins.git.browser.ViewGitWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"redmineWeb": {"$id": "#/definitions/hudson.plugins.git.browser.RedmineWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"bitbucketWeb": {"$id": "#/definitions/hudson.plugins.git.browser.BitbucketWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"kilnHG": {"$id": "#/definitions/hudson.plugins.mercurial.browser.KilnHG"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"fishEye": {"$id": "#/definitions/hudson.plugins.mercurial.browser.FishEye"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitLab": {"$id": "#/definitions/hudson.plugins.git.browser.GitLab"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"rhodeCode": {"$id": "#/definitions/hudson.plugins.git.browser.RhodeCode"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"kilnGit": {"$id": "#/definitions/hudson.plugins.git.browser.KilnGit"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GitWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitBlitRepositoryBrowser": {"$id": "#/definitions/hudson.plugins.git.browser.GitBlitRepositoryBrowser"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitoriousWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GitoriousWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"rhodeCodeLegacy": {"$id": "#/definitions/hudson.plugins.mercurial.browser.RhodeCodeLegacy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"phabricator": {"$id": "#/definitions/hudson.plugins.git.browser.Phabricator"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"googleCode": {"$id": "#/definitions/hudson.plugins.mercurial.browser.GoogleCode"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gogsGit": {"$id": "#/definitions/hudson.plugins.git.browser.GogsGit"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"kallithea": {"$id": "#/definitions/hudson.plugins.mercurial.browser.Kallithea"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"fisheyeGitRepositoryBrowser": {"$id": "#/definitions/hudson.plugins.git.browser.FisheyeGitRepositoryBrowser"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"githubWeb": {"$id": "#/definitions/hudson.plugins.git.browser.GithubWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"hgWeb": {"$id": "#/definitions/hudson.plugins.mercurial.browser.HgWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"assemblaWeb": {"$id": "#/definitions/hudson.plugins.git.browser.AssemblaWeb"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"stash": {"$id": "#/definitions/hudson.plugins.git.browser.Stash"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "mailer": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.tasks.Mailer$DescriptorImpl"
-                },
-                "themeelement": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cssText": {"$id": "#/definitions/org.jenkinsci.plugins.simpletheme.CssTextThemeElement"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"faviconUrl": {"$id": "#/definitions/org.jenkinsci.plugins.simpletheme.FaviconUrlThemeElement"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cssUrl": {"$id": "#/definitions/org.jenkinsci.plugins.simpletheme.CssUrlThemeElement"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jsUrl": {"$id": "#/definitions/org.jenkinsci.plugins.simpletheme.JsUrlThemeElement"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "artifactmanagerfactory": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"jclouds": {"$id": "#/definitions/io.jenkins.plugins.artifact_manager_jclouds.JCloudsArtifactManagerFactory"}}
-                    }],
-                    "type": "object"
-                },
-                "fastestreadspeedstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"estimatedWorkspaceSize": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/long"
-                    }}
-                },
-                "diskinfoprovider": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"noDiskInfo": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.providers.NoDiskInfo"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"userProvidedDiskInfo": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.providers.UserProvidedDiskInfo"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "mostusablespace": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "globalvaultconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"configuration": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/com.datapipe.jenkins.vault.configuration.VaultConfiguration"
-                    }}
-                },
-                "csstextthemeelement": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "text": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "gittoolscmsourcetrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"gitTool": {"type": "string"}}
-                },
-                "template": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "nodeDiskPools": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.nodes.NodeDiskPool"
-                        },
-                        "label": {"type": "string"}
-                    }
-                },
-                "buildchooser": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"inverse": {"$id": "#/definitions/hudson.plugins.git.util.InverseBuildChooser"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"default": {"$id": "#/definitions/hudson.plugins.git.util.DefaultBuildChooser"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"ancestry": {"$id": "#/definitions/hudson.plugins.git.util.AncestryBuildChooser"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"specificRevision": {"$id": "#/definitions/jenkins.plugins.git.AbstractGitSCMSource$SpecificRevisionBuildChooser"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "mavensettingsconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "serverCredentialMappings": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.security.ServerCredentialMapping"
-                        },
-                        "providerId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "comment": {"type": "string"},
-                        "id": {"type": "string"},
-                        "isReplaceAll": {"type": "boolean"},
-                        "content": {"type": "string"}
-                    }
-                },
-                "exwsGlobalConfigurationTemplates": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.ewm.steps.ExwsStep$DescriptorImpl"
-                },
-                "simple-theme-plugin": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.codefirst.SimpleThemeDecorator"
-                },
-                "xmlconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "providerId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "comment": {"type": "string"},
-                        "id": {"type": "string"},
-                        "content": {"type": "string"}
-                    }
-                },
-                "relativetargetdirectory": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"relativeTargetDir": {"type": "string"}}
-                },
-                "cssurlthemeelement": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "viewstabbar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "quietperiod": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "submoduleoption": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "reference": {"type": "string"},
-                        "recursiveSubmodules": {"type": "boolean"},
-                        "trackingSubmodules": {"type": "boolean"},
-                        "parentCredentials": {"type": "boolean"},
-                        "timeout": {"type": "integer"},
-                        "disableSubmodules": {"type": "boolean"}
-                    }
-                },
-                "sonarinstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "serverUrl": {"type": "string"},
-                        "additionalAnalysisProperties": {"type": "string"},
-                        "name": {"type": "string"},
-                        "serverAuthenticationToken": {"type": "string"},
-                        "additionalProperties": {"type": "string"},
-                        "triggers": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.sonar.model.TriggersConfig"
-                        },
-                        "mojoVersion": {"type": "string"}
-                    }
-                },
-                "assemblaweb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "fastestwritespeedstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"estimatedWorkspaceSize": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/long"
-                    }}
-                },
-                "githubtrusteveryone": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "administrativeMonitorsConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.management.AdministrativeMonitorsConfiguration"
-                },
-                "perjob": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "redmineweb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "cloneoptiontrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"extension": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.plugins.git.extensions.impl.CloneOption"
-                    }}
-                },
-                "githubpluginconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "configs": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.github.config.GitHubServerConfig"
-                        },
-                        "hookSecretConfig": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.github.config.HookSecretConfig"
-                        },
-                        "hookUrl": {"type": "string"}
-                    }
-                },
-                "phabricator": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "repoUrl": {"type": "string"},
-                        "repo": {"type": "string"}
-                    }
-                },
-                "globalDefaultFlowDurabilityLevel": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.workflow.flow.GlobalDefaultFlowDurabilityLevel$DescriptorImpl"
-                },
-                "defaultView": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.views.GlobalDefaultViewConfiguration"
-                },
-                "azureKeyVault": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.azurekeyvaultplugin.AzureKeyVaultGlobalConfiguration"
-                },
-                "nodiskinfo": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "diskpool": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "diskPoolId": {"type": "string"},
-                        "disks": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.definitions.Disk"
-                        },
-                        "displayName": {"type": "string"},
-                        "restriction": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                        },
-                        "description": {"type": "string"},
-                        "workspaceTemplate": {"type": "string"},
-                        "strategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.DiskAllocationStrategy"
-                        }
-                    }
-                },
-                "gitiles": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "gitweb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "slackuseridresolver": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"no": {"$id": "#/definitions/jenkins.plugins.slack.user.NoSlackUserIdResolver"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"email": {"$id": "#/definitions/jenkins.plugins.slack.user.EmailSlackUserIdResolver"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "copytoslavebuildwrapper": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "gitlabconnection": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "apiTokenId": {"type": "string"},
-                        "readTimeout": {"type": "integer"},
-                        "clientBuilderId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "connectionTimeout": {"type": "integer"},
-                        "url": {"type": "string"},
-                        "ignoreCertificateErrors": {"type": "boolean"}
-                    }
-                },
-                "vaultconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "engineVersion": {"type": "integer"},
-                        "vaultNamespace": {"type": "string"},
-                        "skipSslVerification": {"type": "boolean"},
-                        "failIfNotFound": {"type": "boolean"},
-                        "vaultCredentialId": {"type": "string"},
-                        "vaultUrl": {"type": "string"},
-                        "timeout": {"type": "integer"}
-                    }
-                },
-                "nodeProperties": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalNodePropertiesConfiguration"
-                },
-                "gitHubConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.GitHubConfiguration"
-                },
-                "cloud": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "cleanbeforecheckout": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "branchdiscoverytrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"strategyId": {"type": "integer"}}
-                },
-                "maventoolchainsconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "providerId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "comment": {"type": "string"},
-                        "id": {"type": "string"},
-                        "content": {"type": "string"}
-                    }
-                },
-                "rhodecodelegacy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "pollSCM": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.triggers.SCMTrigger$DescriptorImpl"
-                },
-                "administrativemonitorsconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "artifactoryserver": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "deployerCredentialsConfig": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.jfrog.hudson.CredentialsConfig"
-                        },
-                        "artifactoryUrl": {"type": "string"},
-                        "deploymentThreads": {"type": "integer"},
-                        "bypassProxy": {"type": "boolean"},
-                        "connectionRetry": {"type": "integer"},
-                        "resolverCredentialsConfig": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.jfrog.hudson.CredentialsConfig"
-                        },
-                        "serverId": {"type": "string"},
-                        "timeout": {"type": "integer"}
-                    }
-                },
-                "scmretriever": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"scm": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.scm.SCM"
-                    }}
-                },
-                "blobstoreprovider": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"s3": {"$id": "#/definitions/io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore"}}
-                    }],
-                    "type": "object"
-                },
-                "fastestwritespeed": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "metricsaccesskey": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "canPing": {"type": "boolean"},
-                        "canMetrics": {"type": "boolean"},
-                        "canThreadDump": {"type": "boolean"},
-                        "canHealthCheck": {"type": "boolean"},
-                        "description": {"type": "string"},
-                        "origins": {"type": "string"},
-                        "key": {"type": "string"}
-                    }
-                },
-                "casCGlobalConfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/io.jenkins.plugins.casc.CasCGlobalConfig"
-                },
-                "viewgitweb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "repoUrl": {"type": "string"},
-                        "projectName": {"type": "string"}
-                    }
-                },
-                "disk": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "displayName": {"type": "string"},
-                        "diskId": {"type": "string"},
-                        "diskInfo": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.DiskInfoProvider"
-                        },
-                        "masterMountPoint": {"type": "string"},
-                        "physicalPathOnDisk": {"type": "string"}
-                    }
-                },
-                "libraryconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "implicit": {"type": "boolean"},
-                        "allowVersionOverride": {"type": "boolean"},
-                        "retriever": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.workflow.libs.LibraryRetriever"
-                        },
-                        "name": {"type": "string"},
-                        "defaultVersion": {"type": "string"},
-                        "includeInChangesets": {"type": "boolean"}
-                    }
-                },
-                "fisheye": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "perexecutor": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "gitlab": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "repoUrl": {"type": "string"},
-                        "version": {"type": "string"}
-                    }
-                },
-                "submoduleoptiontrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"extension": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.plugins.git.extensions.impl.SubmoduleOption"
-                    }}
-                },
-                "masterbuild": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "mercurialscm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "subdir": {"type": "string"},
-                        "revisionType": {
-                            "type": "string",
-                            "enum": [
-                                "BRANCH",
-                                "TAG",
-                                "CHANGESET",
-                                "REVSET"
-                            ]
-                        },
-                        "browser": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.mercurial.browser.HgBrowser"
-                        },
-                        "installation": {"type": "string"},
-                        "disableChangeLog": {"type": "boolean"},
-                        "credentialsId": {"type": "string"},
-                        "source": {"type": "string"},
-                        "clean": {"type": "boolean"},
-                        "modules": {"type": "string"},
-                        "revision": {"type": "string"}
-                    }
-                },
-                "useridentity": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "email": {"type": "string"}
-                    }
-                },
-                "no": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "notjobrestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"restriction": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                    }}
-                },
-                "globalSettings": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.plugins.analysis.core.GlobalSettings$DescriptorImpl"
-                },
-                "wipeworkspace": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "copyToSlaveBuildWrapper": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/com.michelin.cio.hudson.plugins.copytoslave.CopyToSlaveBuildWrapper$DescriptorImpl"
-                },
-                "startedbymemberofgrouprestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "checkUpstreamProjects": {"type": "boolean"},
-                        "groupList": {
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.GroupSelector"
-                        }
-                    }
-                },
-                "userselector": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"selectedUserId": {"type": "string"}}
-                },
-                "forkpullrequestdiscoverytrait": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "trust": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.scm.api.trait.SCMHeadAuthority"
-                        },
-                        "strategyId": {"type": "integer"}
-                    }
-                },
-                "customconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "providerId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "comment": {"type": "string"},
-                        "id": {"type": "string"},
-                        "content": {"type": "string"}
-                    }
-                },
-                "githubtrustnobody": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "smtpauthentication": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.util.Secret"
-                        },
-                        "username": {"type": "string"}
-                    }
-                },
-                "globalmavensettingsconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "serverCredentialMappings": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.security.ServerCredentialMapping"
-                        },
-                        "providerId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "comment": {"type": "string"},
-                        "id": {"type": "string"},
-                        "isReplaceAll": {"type": "boolean"},
-                        "content": {"type": "string"}
-                    }
-                },
-                "jsonconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "providerId": {"type": "string"},
-                        "name": {"type": "string"},
-                        "comment": {"type": "string"},
-                        "id": {"type": "string"},
-                        "content": {"type": "string"}
-                    }
-                },
-                "andjobrestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "first": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                        },
-                        "second": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                        }
-                    }
-                },
-                "servercredentialmapping": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "credentialsId": {"type": "string"},
-                        "serverId": {"type": "string"}
-                    }
-                },
-                "githubweb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                },
-                "inverse": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "warnings": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "sparsecheckoutpath": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"path": {"type": "string"}}
-                },
-                "extendedEmailPublisher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.plugins.emailext.ExtendedEmailPublisherDescriptor"
-                },
-                "extendedemailpublisherdescriptor": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "charset": {"type": "string"},
-                        "smtpPort": {"type": "string"},
-                        "defaultContentType": {"type": "string"},
-                        "listId": {"type": "string"},
-                        "advProperties": {"type": "string"},
-                        "defaultPostsendScript": {"type": "string"},
-                        "smtpPassword": {"type": "string"},
-                        "maxAttachmentSizeMb": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/long"
-                        },
-                        "adminRequiredForTemplateTesting": {"type": "boolean"},
-                        "defaultSuffix": {"type": "string"},
-                        "excludedCommitters": {"type": "string"},
-                        "allowedDomains": {"type": "string"},
-                        "watchingEnabled": {"type": "boolean"},
-                        "smtpUsername": {"type": "string"},
-                        "allowUnregisteredEnabled": {"type": "boolean"},
-                        "defaultRecipients": {"type": "string"},
-                        "addAccounts": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.emailext.MailAccount"
-                        },
-                        "defaultBody": {"type": "string"},
-                        "useSsl": {"type": "boolean"},
-                        "defaultClasspath": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.emailext.GroovyScriptPath"
-                        },
-                        "smtpServer": {"type": "string"},
-                        "defaultReplyTo": {"type": "string"},
-                        "defaultSubject": {"type": "string"},
-                        "maxAttachmentSize": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/long"
-                        },
-                        "defaultPresendScript": {"type": "string"},
-                        "precedenceBulk": {"type": "boolean"},
-                        "debugMode": {"type": "boolean"}
-                    }
-                },
-                "changelogtobranchoptions": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "compareRemote": {"type": "string"},
-                        "compareTarget": {"type": "string"}
-                    }
-                },
-                "artifactManager": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.ArtifactManagerConfiguration"
-                },
-                "any": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "jsurlthemeelement": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"url": {"type": "string"}}
-                },
-                "exwsGlobalConfigurationDiskPools": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.ewm.steps.ExwsAllocateStep$DescriptorImpl"
-                },
-                "kilngit": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"repoUrl": {"type": "string"}}
-                }
-            }
-        },
-        "credentials": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the credentials classifier",
-            "properties": {
-                "vaultapprolecredential": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "path": {"type": "string"},
-                        "roleId": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "secretId": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.util.Secret"
-                        },
-                        "id": {"type": "string"}
-                    }
-                },
-                "credentials": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"dockerDirectory": {"$id": "#/definitions/com.nirima.jenkins.plugins.docker.utils.DockerDirectoryCredentials"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"vaultGCPCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultGCPCredential"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"string": {"$id": "#/definitions/org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"vaultTokenFileCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultTokenFileCredential"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"vaultAppRoleCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultAppRoleCredential"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"basicSSHUserPrivateKey": {"$id": "#/definitions/com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"vaultKubernetesCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultKubernetesCredential"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"certificate": {"$id": "#/definitions/com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"openShiftBearerTokenCredentialImpl": {"$id": "#/definitions/org.jenkinsci.plugins.kubernetes.credentials.OpenShiftBearerTokenCredentialImpl"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"secretString": {"$id": "#/definitions/com.microsoft.jenkins.keyvault.SecretStringCredentials"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitLabApiTokenImpl": {"$id": "#/definitions/com.dabsquared.gitlabjenkins.connection.GitLabApiTokenImpl"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"vaultGithubTokenCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultGithubTokenCredential"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"vaultTokenCredential": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.VaultTokenCredential"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"usernamePassword": {"$id": "#/definitions/com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"vaultUsernamePasswordCredentialImpl": {"$id": "#/definitions/com.datapipe.jenkins.vault.credentials.common.VaultUsernamePasswordCredentialImpl"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"dockerServer": {"$id": "#/definitions/org.jenkinsci.plugins.docker.commons.credentials.DockerServerCredentials"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"azureMsi": {"$id": "#/definitions/com.microsoft.azure.util.AzureMsiCredentials"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"azureImds": {"$id": "#/definitions/com.microsoft.azure.util.AzureImdsCredentials"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"file": {"$id": "#/definitions/org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"secretCertificate": {"$id": "#/definitions/com.microsoft.jenkins.keyvault.SecretCertificateCredentials"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"openShiftTokenCredentialImpl": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.OpenShiftTokenCredentialImpl"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"aws": {"$id": "#/definitions/com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsImpl"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"azure": {"$id": "#/definitions/com.microsoft.azure.util.AzureCredentials"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "openshiftbearertokencredentialimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "username": {"type": "string"}
-                    }
-                },
-                "vaulttokenfilecredential": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "filepath": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"}
-                    }
-                },
-                "keystoresource": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"uploaded": {"$id": "#/definitions/com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$UploadedKeyStoreSource"}}
-                    }],
-                    "type": "object"
-                },
-                "dockerserver": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "hostnameportspecification": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "excludes": {"type": "string"},
-                        "includes": {"type": "string"}
-                    }
-                },
-                "vaultusernamepasswordcredentialimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "engineVersion": {"type": "integer"},
-                        "path": {"type": "string"},
-                        "usernameKey": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "passwordKey": {"type": "string"}
-                    }
-                },
-                "vaultgithubtokencredential": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "accessToken": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.util.Secret"
-                        }
-                    }
-                },
-                "dockerservercredentials": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "clientCertificate": {"type": "string"},
-                        "clientKey": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "serverCaCertificate": {"type": "string"},
-                        "description": {"type": "string"},
-                        "id": {"type": "string"}
-                    }
-                },
-                "vaulttokencredential": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "token": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.util.Secret"
-                        }
-                    }
-                },
-                "basicsshuserprivatekey": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "privateKeySource": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey$PrivateKeySource"
-                        },
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "passphrase": {"type": "string"},
-                        "id": {"type": "string"},
-                        "username": {"type": "string"}
-                    }
-                },
-                "awscredentialsimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "secretKey": {"type": "string"},
-                        "accessKey": {"type": "string"},
-                        "iamRoleArn": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "iamMfaSerialNumber": {"type": "string"},
-                        "id": {"type": "string"}
-                    }
-                },
-                "gitlabapitokenimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "apiToken": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.util.Secret"
-                        },
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"}
-                    }
-                },
-                "azurecredentials": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "clientId": {"type": "string"},
-                        "certificateId": {"type": "string"},
-                        "activeDirectoryEndpoint": {"type": "string"},
-                        "graphEndpoint": {"type": "string"},
-                        "description": {"type": "string"},
-                        "azureEnvironmentName": {"type": "string"},
-                        "managementEndpoint": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "clientSecret": {"type": "string"},
-                        "id": {"type": "string"},
-                        "subscriptionId": {"type": "string"},
-                        "tenant": {"type": "string"},
-                        "resourceManagerEndpoint": {"type": "string"}
-                    }
-                },
-                "uploadedkeystoresource": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"uploadedKeystore": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/com.cloudbees.plugins.credentials.SecretBytes"
-                    }}
-                },
-                "vaultkubernetescredential": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "role": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"}
-                    }
-                },
-                "openshifttokencredentialimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "secret": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.util.Secret"
-                        }
-                    }
-                },
-                "domainspecification": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"dockerServer": {"$id": "#/definitions/org.jenkinsci.plugins.docker.commons.credentials.DockerServerDomainSpecification"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mavenServerIdSpecification": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.security.MavenServerIdSpecification"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"schemeSpecification": {"$id": "#/definitions/com.cloudbees.plugins.credentials.domains.SchemeSpecification"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"hostnamePortSpecification": {"$id": "#/definitions/com.cloudbees.plugins.credentials.domains.HostnamePortSpecification"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"pathSpecification": {"$id": "#/definitions/com.cloudbees.plugins.credentials.domains.PathSpecification"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"hostnameSpecification": {"$id": "#/definitions/com.cloudbees.plugins.credentials.domains.HostnameSpecification"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "domaincredentials": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "credentials": {
-                            "type": "object",
-                            "$id": "#/definitions/com.cloudbees.plugins.credentials.Credentials"
-                        },
-                        "domain": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.cloudbees.plugins.credentials.domains.Domain"
-                        }
-                    }
-                },
-                "usernamepasswordcredentialsimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "username": {"type": "string"}
-                    }
-                },
-                "schemespecification": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"schemes": {"type": "string"}}
-                },
-                "vaultgcpcredential": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "audience": {"type": "string"},
-                        "role": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"}
-                    }
-                },
-                "directentryprivatekeysource": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"privateKey": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.util.Secret"
-                    }}
-                },
-                "certificatecredentialsimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "keyStoreSource": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl$KeyStoreSource"
-                        }
-                    }
-                },
-                "secretcertificatecredentials": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.util.Secret"
-                        },
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "secretIdentifier": {"type": "string"},
-                        "servicePrincipalId": {"type": "string"}
-                    }
-                },
-                "secretstringcredentials": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "secretIdentifier": {"type": "string"},
-                        "servicePrincipalId": {"type": "string"}
-                    }
-                },
-                "system": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/com.cloudbees.plugins.credentials.SystemCredentialsProvider"
-                },
-                "azuremsicredentials": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "msiPort": {"type": "integer"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "azureEnvName": {"type": "string"}
-                    }
-                },
-                "privatekeysource": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"directEntry": {"$id": "#/definitions/com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey$DirectEntryPrivateKeySource"}}
-                    }],
-                    "type": "object"
-                },
-                "filecredentialsimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "fileName": {"type": "string"},
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "secretBytes": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.cloudbees.plugins.credentials.SecretBytes"
-                        }
-                    }
-                },
-                "domain": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "description": {"type": "string"},
-                        "specifications": {
-                            "type": "object",
-                            "$id": "#/definitions/com.cloudbees.plugins.credentials.domains.DomainSpecification"
-                        }
-                    }
-                },
-                "pathspecification": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "excludes": {"type": "string"},
-                        "caseSensitive": {"type": "boolean"},
-                        "includes": {"type": "string"}
-                    }
-                },
-                "stringcredentialsimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "secret": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.util.Secret"
-                        }
-                    }
-                },
-                "hostnamespecification": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "excludes": {"type": "string"},
-                        "includes": {"type": "string"}
-                    }
-                },
-                "mavenserveridspecification": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "excludes": {"type": "string"},
-                        "includes": {"type": "string"}
-                    }
-                },
-                "azureimdscredentials": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "scope": {
-                            "type": "string",
-                            "enum": [
-                                "SYSTEM",
-                                "GLOBAL",
-                                "USER"
-                            ]
-                        },
-                        "description": {"type": "string"},
-                        "id": {"type": "string"},
-                        "azureEnvName": {"type": "string"}
-                    }
-                }
-            }
-        },
-        "jobs": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the jobs classifier",
-            "properties": {
-                "": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/javaposse.jobdsl.plugin.casc.ScriptSource"
-                },
-                "scriptsource": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"file": {"$id": "#/definitions/javaposse.jobdsl.plugin.casc.FromFileScriptSource"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"script": {"$id": "#/definitions/javaposse.jobdsl.plugin.casc.InlineGroovyScriptSource"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"url": {"$id": "#/definitions/javaposse.jobdsl.plugin.casc.FromUrlScriptSource"}}
-                        }
-                    ],
-                    "type": "object"
-                }
-            }
-        },
-        "configuration-as-code": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the configuration-as-code classifier",
-            "properties": {
-                "restricted": {
-                    "type": "string",
-                    "enum": [
-                        "reject",
-                        "beta",
-                        "warn"
-                    ]
-                },
-                "deprecated": {
-                    "type": "string",
-                    "enum": [
-                        "reject",
-                        "warn"
-                    ]
-                },
-                "version": {
-                    "type": "string",
-                    "enum": ["1"]
-                },
-                "unknown": {
-                    "type": "string",
-                    "enum": [
-                        "reject",
-                        "warn"
-                    ]
-                }
-            }
-        },
-        "jenkins": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the jenkins classifier",
-            "properties": {
-                "roledefinition": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "assignments": {"type": "string"},
-                        "permissions": {"type": "string"},
-                        "name": {"type": "string"},
-                        "pattern": {"type": "string"},
-                        "description": {"type": "string"}
-                    }
-                },
-                "listview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "includeRegex": {"type": "string"},
-                        "columns": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.ListViewColumn"
-                        },
-                        "recurse": {"type": "boolean"},
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        },
-                        "jobFilters": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.ViewJobFilter"
-                        }
-                    }
-                },
-                "kubernetesslave": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "nodeName": {"type": "string"},
-                        "template": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PodTemplate"
-                        },
-                        "rs": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
-                        },
-                        "labelStr": {"type": "string"},
-                        "nodeDescription": {"type": "string"},
-                        "userId": {"type": "string"},
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        },
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "numExecutors": {"type": "integer"},
-                        "retentionStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
-                        },
-                        "cloudName": {"type": "string"},
-                        "labelString": {"type": "string"},
-                        "launcher": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
-                        }
-                    }
-                },
-                "computerlauncher": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"simpleCommandLauncher": {"$id": "#/definitions/org.jvnet.hudson.test.SimpleCommandLauncher"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jnlp": {"$id": "#/definitions/hudson.slaves.JNLPLauncher"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"ssh": {"$id": "#/definitions/hudson.plugins.sshslaves.SSHLauncher"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"command": {"$id": "#/definitions/hudson.slaves.CommandLauncher"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "remotingworkdirsettings": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "internalDir": {"type": "string"},
-                        "disabled": {"type": "boolean"},
-                        "failIfWorkDirIsMissing": {"type": "boolean"},
-                        "workDirPath": {"type": "string"}
-                    }
-                },
-                "sshlauncher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "maxNumRetries": {"type": "integer"},
-                        "sshHostKeyVerificationStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategy"
-                        },
-                        "launchTimeoutSeconds": {"type": "integer"},
-                        "credentialsId": {"type": "string"},
-                        "jvmOptions": {"type": "string"},
-                        "suffixStartSlaveCmd": {"type": "string"},
-                        "port": {"type": "integer"},
-                        "javaPath": {"type": "string"},
-                        "host": {"type": "string"},
-                        "prefixStartSlaveCmd": {"type": "string"},
-                        "workDir": {"type": "string"},
-                        "retryWaitTime": {"type": "integer"},
-                        "tcpNoDelay": {"type": "boolean"}
-                    }
-                },
-                "caseinsensitive": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "quietPeriod": {"type": "integer"},
-                "markupformatter": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"rawHtml": {"$id": "#/definitions/hudson.markup.RawHtmlMarkupFormatter"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"plainText": {"$id": "#/definitions/hudson.markup.EscapedMarkupFormatter"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "jDKs": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.model.JDK"
-                },
-                "itemcolumn": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "antinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "retentionstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"always": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Always"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"dockerOnce": {"$id": "#/definitions/com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"schedule": {"$id": "#/definitions/hudson.slaves.SimpleScheduledRetentionStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"demand": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Demand"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "defaultcrumbissuer": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"excludeClientIPFromCrumb": {"type": "boolean"}}
-                },
-                "manuallytrustedkeyverificationstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"requireInitialManualTrust": {"type": "boolean"}}
-                },
-                "containerenvvar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "value": {"type": "string"},
-                        "key": {"type": "string"}
-                    }
-                },
-                "ec2tag": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "value": {"type": "string"}
-                    }
-                },
-                "githubbranchfilter": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "maveninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "rolebasedauthorizationstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"roles": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/org.jenkinsci.plugins.rolestrategy.casc.GrantedRoles"
-                    }}
-                },
-                "nodeproperty": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"toolLocation": {"$id": "#/definitions/hudson.tools.ToolLocationNodeProperty"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"envVars": {"$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"exwsNodeConfigurationDiskPools": {"$id": "#/definitions/org.jenkinsci.plugins.ewm.nodes.ExternalWorkspaceProperty"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"authorizationMatrix": {"$id": "#/definitions/org.jenkinsci.plugins.matrixauth.AuthorizationMatrixNodeProperty"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jobRestrictionProperty": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.nodes.JobRestrictionProperty"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "ec2spotslave": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "idleTerminationMinutes": {"type": "string"},
-                        "nodeName": {"type": "string"},
-                        "jvmopts": {"type": "string"},
-                        "description": {"type": "string"},
-                        "nodeDescription": {"type": "string"},
-                        "launchTimeout": {"type": "integer"},
-                        "userId": {"type": "string"},
-                        "maxTotalUses": {"type": "integer"},
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        },
-                        "remoteAdmin": {"type": "string"},
-                        "tags": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.ec2.EC2Tag"
-                        },
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "tmpDir": {"type": "string"},
-                        "numExecutors": {"type": "integer"},
-                        "retentionStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
-                        },
-                        "spotInstanceRequestId": {"type": "string"},
-                        "cloudName": {"type": "string"},
-                        "labelString": {"type": "string"},
-                        "name": {"type": "string"},
-                        "connectionStrategy": {
-                            "type": "string",
-                            "enum": [
-                                "Public DNS",
-                                "Public IP",
-                                "Private DNS",
-                                "Private IP"
-                            ]
-                        },
-                        "amiType": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.ec2.AMITypeData"
-                        },
-                        "initScript": {"type": "string"},
-                        "remoteFS": {"type": "string"},
-                        "launcher": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
-                        }
-                    }
-                },
-                "demand": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "idleDelay": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/long"
-                        },
-                        "inDemandDelay": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/long"
-                        }
-                    }
-                },
-                "dockerserverendpoint": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "credentialsId": {"type": "string"},
-                        "uri": {"type": "string"}
-                    }
-                },
-                "proxy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.ProxyConfiguration"
-                },
-                "node": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"eC2OndemandSlave": {"$id": "#/definitions/hudson.plugins.ec2.EC2OndemandSlave"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"pretendSlave": {"$id": "#/definitions/org.jvnet.hudson.test.PretendSlave"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"batchSlave": {"$id": "#/definitions/org.jenkinsci.plugins.sge.BatchSlave"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"permanent": {"$id": "#/definitions/hudson.slaves.DumbSlave"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"eC2SpotSlave": {"$id": "#/definitions/hudson.plugins.ec2.EC2SpotSlave"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"kubernetesSlave": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jenkins": {"$id": "#/definitions/jenkins.model.Jenkins"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mesosSlave": {"$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlave"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "gitbranchspecifiercolumn": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "nodejsinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "npmPackagesRefreshHours": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/long"
-                        },
-                        "id": {"type": "string"},
-                        "npmPackages": {"type": "string"},
-                        "force32Bit": {"type": "boolean"}
-                    }
-                },
-                "fullcontrolonceloggedinauthorizationstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"allowAnonymousRead": {"type": "boolean"}}
-                },
-                "dockeronceretentionstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"idleMinutes": {"type": "integer"}}
-                },
-                "toolproperty": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}}
-                    }],
-                    "type": "object"
-                },
-                "persistentvolumeclaim": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "mountPath": {"type": "string"},
-                        "claimName": {"type": "string"},
-                        "readOnly": {"type": "boolean"}
-                    }
-                },
-                "securityrealm": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"github": {"$id": "#/definitions/org.jenkinsci.plugins.GithubSecurityRealm"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"keycloak": {"$id": "#/definitions/org.jenkinsci.plugins.KeycloakSecurityRealm"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacySecurityRealm"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"ldap": {"$id": "#/definitions/hudson.security.LDAPSecurityRealm"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"activeDirectory": {"$id": "#/definitions/hudson.plugins.active_directory.ActiveDirectorySecurityRealm"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"local": {"$id": "#/definitions/hudson.security.HudsonPrivateSecurityRealm"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "knownhostsfilekeyverificationstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "classselector": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"selectedClass": {"type": "string"}}
-                },
-                "activedirectorydomain": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "site": {"type": "string"},
-                        "servers": {"type": "string"},
-                        "bindName": {"type": "string"},
-                        "bindPassword": {"type": "string"},
-                        "name": {"type": "string"}
-                    }
-                },
-                "amazonec2cloud": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "noDelayProvisioning": {"type": "boolean"},
-                        "privateKey": {"type": "string"},
-                        "instanceCapStr": {"type": "string"},
-                        "cloudName": {"type": "string"},
-                        "roleArn": {"type": "string"},
-                        "roleSessionName": {"type": "string"},
-                        "templates": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.ec2.SlaveTemplate"
-                        },
-                        "testMode": {"type": "boolean"},
-                        "credentialsId": {"type": "string"},
-                        "region": {"type": "string"},
-                        "useInstanceProfileForCredentials": {"type": "boolean"}
-                    }
-                },
-                "ldapgroupmembershipstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"fromUserRecord": {"$id": "#/definitions/jenkins.security.plugins.ldap.FromUserRecordLDAPGroupMembershipStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"fromGroupSearch": {"$id": "#/definitions/jenkins.security.plugins.ldap.FromGroupSearchLDAPGroupMembershipStrategy"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "podtemplate": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "slaveConnectTimeoutStr": {"type": "string"},
-                        "instanceCapStr": {"type": "string"},
-                        "imagePullSecrets": {
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PodImagePullSecret"
-                        },
-                        "envVars": {
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar"
-                        },
-                        "instanceCap": {"type": "integer"},
-                        "volumes": {
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.PodVolume"
-                        },
-                        "workspaceVolume": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.WorkspaceVolume"
-                        },
-                        "annotations": {
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PodAnnotation"
-                        },
-                        "idleMinutesStr": {"type": "string"},
-                        "serviceAccount": {"type": "string"},
-                        "label": {"type": "string"},
-                        "idleMinutes": {"type": "integer"},
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolLocationNodeProperty"
-                        },
-                        "nodeSelector": {"type": "string"},
-                        "inheritFrom": {"type": "string"},
-                        "customWorkspaceVolumeEnabled": {"type": "boolean"},
-                        "nodeUsageMode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "name": {"type": "string"},
-                        "namespace": {"type": "string"},
-                        "containers": {
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate"
-                        },
-                        "slaveConnectTimeout": {"type": "integer"},
-                        "activeDeadlineSecondsStr": {"type": "string"},
-                        "activeDeadlineSeconds": {"type": "integer"},
-                        "yaml": {"type": "string"}
-                    }
-                },
-                "lastfailure": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "nodedisk": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "nodeMountPoint": {"type": "string"},
-                        "diskRefId": {"type": "string"}
-                    }
-                },
-                "plaintext": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "unsecured": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "jdk": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "jobrestriction": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"multipleAnd": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.MultipleAndJobRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"not": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.NotJobRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"or": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.OrJobRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"multipleOr": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.MultipleOrJobRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"and": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.AndJobRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"startedByMemberOfGroupRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.StartedByMemberOfGroupRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"regexNameRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.RegexNameRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"startedByUserRestriction": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job.StartedByUserRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jobClassNameRestriction": {"$id": "#/definitions/io.jenkins.plugins.jobrestrictions.restrictions.job.JobClassNameRestriction"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"any": {"$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.logic.AnyJobRestriction"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "secretvolume": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "mountPath": {"type": "string"},
-                        "secretName": {"type": "string"}
-                    }
-                },
-                "allview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        }
-                    }
-                },
-                "projectnamingstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"pattern": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$PatternProjectNamingStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"roleBased": {"$id": "#/definitions/org.jenkinsci.plugins.rolestrategy.RoleBasedProjectNamingStrategy"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "githubauthorizationstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "adminUserNames": {"type": "string"},
-                        "authenticatedUserCreateJobPermission": {"type": "boolean"},
-                        "organizationNames": {"type": "string"},
-                        "authenticatedUserReadPermission": {"type": "boolean"},
-                        "allowAnonymousReadPermission": {"type": "boolean"},
-                        "allowGithubWebHookPermission": {"type": "boolean"},
-                        "allowCcTrayPermission": {"type": "boolean"},
-                        "useRepositoryPermissions": {"type": "boolean"},
-                        "allowAnonymousJobStatusPermission": {"type": "boolean"}
-                    }
-                },
-                "sbtinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "standard": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "warningscolumn": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "inheritancestrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"inheritingGlobal": {"$id": "#/definitions/org.jenkinsci.plugins.matrixauth.inheritance.InheritGlobalStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"nonInheriting": {"$id": "#/definitions/org.jenkinsci.plugins.matrixauth.inheritance.NonInheritingStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"inheriting": {"$id": "#/definitions/org.jenkinsci.plugins.matrixauth.inheritance.InheritParentStrategy"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "view": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"": {"$id": "#/definitions/jenkins.branch.MultiBranchProjectViewHolder$ViewImpl"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"all": {"$id": "#/definitions/hudson.model.AllView"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"proxy": {"$id": "#/definitions/hudson.model.ProxyView"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"myView": {"$id": "#/definitions/hudson.model.MyView"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"list": {"$id": "#/definitions/hudson.model.ListView"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "batchcommandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                },
-                "githubsecurityrealm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "captchaSupport": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
-                        },
-                        "githubWebUri": {"type": "string"},
-                        "clientID": {"type": "string"},
-                        "githubApiUri": {"type": "string"},
-                        "clientSecret": {"type": "string"},
-                        "oauthScopes": {"type": "string"}
-                    }
-                },
-                "listviewcolumn": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jobName": {"$id": "#/definitions/hudson.views.JobColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"warningsColumn": {"$id": "#/definitions/hudson.plugins.warnings.WarningsColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"buildButton": {"$id": "#/definitions/hudson.views.BuildButtonColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mercurialRevisionColumn": {"$id": "#/definitions/hudson.plugins.mercurial.MercurialRevisionColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastStable": {"$id": "#/definitions/hudson.views.LastStableColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"itemColumn": {"$id": "#/definitions/jenkins.branch.ItemColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastSuccess": {"$id": "#/definitions/hudson.views.LastSuccessColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastDuration": {"$id": "#/definitions/hudson.views.LastDurationColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitBranchSpecifierColumn": {"$id": "#/definitions/hudson.plugins.git.GitBranchSpecifierColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"weather": {"$id": "#/definitions/hudson.views.WeatherColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"branchStatusColumn": {"$id": "#/definitions/jenkins.branch.BranchStatusColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastFailure": {"$id": "#/definitions/hudson.views.LastFailureColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"descriptionColumn": {"$id": "#/definitions/jenkins.branch.DescriptionColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"status": {"$id": "#/definitions/hudson.views.StatusColumn"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "injectsshkey": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"user": {"type": "string"}}
-                },
-                "authorizationstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"projectMatrix": {"$id": "#/definitions/hudson.security.ProjectMatrixAuthorizationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"globalMatrix": {"$id": "#/definitions/hudson.security.GlobalMatrixAuthorizationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"github": {"$id": "#/definitions/org.jenkinsci.plugins.GithubAuthorizationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacyAuthorizationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"loggedInUsersCanDoAnything": {"$id": "#/definitions/hudson.security.FullControlOnceLoggedInAuthorizationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"roleBased": {"$id": "#/definitions/com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"unsecured": {"$id": "#/definitions/hudson.security.AuthorizationStrategy$Unsecured"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "nfsvolume": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "serverPath": {"type": "string"},
-                        "mountPath": {"type": "string"},
-                        "serverAddress": {"type": "string"},
-                        "readOnly": {"type": "boolean"}
-                    }
-                },
-                "zipextractioninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "subdir": {"type": "string"},
-                        "label": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "test": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "rawBuildsDir": {"type": "string"},
-                "adminwhitelistrule": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"enabled": {"type": "boolean"}}
-                },
-                "startedbyuserrestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "usersList": {
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.UserSelector"
-                        },
-                        "acceptAnonymousUsers": {"type": "boolean"},
-                        "acceptAutomaticRuns": {"type": "boolean"},
-                        "checkUpstreamProjects": {"type": "boolean"}
-                    }
-                },
-                "rolebasedprojectnamingstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"forceExistingJobs": {"type": "boolean"}}
-                },
-                "volume": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "readOnly": {"type": "boolean"},
-                        "containerPath": {"type": "string"},
-                        "hostPath": {"type": "string"}
-                    }
-                },
-                "myview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        }
-                    }
-                },
-                "manuallyconfiguredsshkey": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "sshHostKeyVerificationStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.sshslaves.verifiers.SshHostKeyVerificationStrategy"
-                        },
-                        "credentialsId": {"type": "string"}
-                    }
-                },
-                "mesoscloud": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "checkpoint": {"type": "boolean"},
-                        "role": {"type": "string"},
-                        "slavesUser": {"type": "string"},
-                        "frameworkName": {"type": "string"},
-                        "description": {"type": "string"},
-                        "credentialsId": {"type": "string"},
-                        "jenkinsURL": {"type": "string"},
-                        "onDemandRegistration": {"type": "boolean"},
-                        "nfsRemoteFSRoot": {"type": "boolean"},
-                        "master": {"type": "string"},
-                        "slaveInfos": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo"
-                        },
-                        "declineOfferDuration": {"type": "string"},
-                        "cloudID": {"type": "string"},
-                        "nativeLibraryPath": {"type": "string"}
-                    }
-                },
-                "podenvvar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "value": {"type": "string"},
-                        "key": {"type": "string"}
-                    }
-                },
-                "regexnamerestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "checkShortName": {"type": "boolean"},
-                        "regexExpression": {"type": "string"}
-                    }
-                },
-                "spotconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "fallbackToOndemand": {"type": "boolean"},
-                        "useBidPrice": {"type": "boolean"},
-                        "spotBlockReservationDurationStr": {"type": "string"},
-                        "spotMaxBidPrice": {"type": "string"}
-                    }
-                },
-                "emptydirworkspacevolume": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"memory": {"type": "boolean"}}
-                },
-                "simplescheduledretentionstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "keepUpWhenActive": {"type": "boolean"},
-                        "startTimeSpec": {"type": "string"},
-                        "upTimeMins": {"type": "integer"}
-                    }
-                },
-                "podannotation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "value": {"type": "string"},
-                        "key": {"type": "string"}
-                    }
-                },
-                "mesosslaveinfo": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "idleTerminationMinutes": {"type": "string"},
-                        "slaveMem": {"type": "string"},
-                        "minExecutors": {"type": "string"},
-                        "remoteFSRoot": {"type": "string"},
-                        "slaveCpus": {"type": "string"},
-                        "defaultSlave": {"type": "string"},
-                        "slaveAttributes": {"type": "string"},
-                        "diskNeeded": {"type": "string"},
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        },
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "jvmArgs": {"type": "string"},
-                        "labelString": {"type": "string"},
-                        "containerInfo": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$ContainerInfo"
-                        },
-                        "executorCpus": {"type": "string"},
-                        "executorMem": {"type": "string"},
-                        "jnlpArgs": {"type": "string"},
-                        "additionalURIs": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$URI"
-                        },
-                        "maxExecutors": {"type": "string"}
-                    }
-                },
-                "workspacevolume": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"hostPathWorkspaceVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.HostPathWorkspaceVolume"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"emptyDirWorkspaceVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.EmptyDirWorkspaceVolume"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"nfsWorkspaceVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.NfsWorkspaceVolume"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"persistentVolumeClaimWorkspaceVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.PersistentVolumeClaimWorkspaceVolume"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "proxyconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "port": {"type": "integer"},
-                        "name": {"type": "string"},
-                        "testUrl": {"type": "string"},
-                        "userName": {"type": "string"},
-                        "noProxyHost": {"type": "string"}
-                    }
-                },
-                "nfsworkspacevolume": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "serverPath": {"type": "string"},
-                        "serverAddress": {"type": "string"},
-                        "readOnly": {"type": "boolean"}
-                    }
-                },
-                "nodediskpool": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "diskPoolRefId": {"type": "string"},
-                        "nodeDisks": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.ewm.nodes.NodeDisk"
-                        }
-                    }
-                },
-                "containertemplate": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "image": {"type": "string"},
-                        "livenessProbe": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.ContainerLivenessProbe"
-                        },
-                        "resourceRequestMemory": {"type": "string"},
-                        "workingDir": {"type": "string"},
-                        "envVars": {
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar"
-                        },
-                        "resourceLimitMemory": {"type": "string"},
-                        "ports": {
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PortMapping"
-                        },
-                        "command": {"type": "string"},
-                        "args": {"type": "string"},
-                        "privileged": {"type": "boolean"},
-                        "resourceLimitCpu": {"type": "string"},
-                        "alwaysPullImage": {"type": "boolean"},
-                        "shell": {"type": "string"},
-                        "resourceRequestCpu": {"type": "string"},
-                        "ttyEnabled": {"type": "boolean"},
-                        "name": {"type": "string"}
-                    }
-                },
-                "groupselector": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"selectedGroupId": {"type": "string"}}
-                },
-                "buildbutton": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "containerlivenessprobe": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "execArgs": {"type": "string"},
-                        "failureThreshold": {"type": "integer"},
-                        "periodSeconds": {"type": "integer"},
-                        "timeoutSeconds": {"type": "integer"},
-                        "successThreshold": {"type": "integer"},
-                        "initialDelaySeconds": {"type": "integer"}
-                    }
-                },
-                "disableRememberMe": {"type": "boolean"},
-                "legacysecurityrealm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"captchaSupport": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
-                    }}
-                },
-                "toollocation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "key": {"type": "string"},
-                        "home": {"type": "string"}
-                    }
-                },
-                "ec2ondemandslave": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "nodeName": {"type": "string"},
-                        "description": {"type": "string"},
-                        "privateDNS": {"type": "string"},
-                        "nodeDescription": {"type": "string"},
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        },
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "tmpDir": {"type": "string"},
-                        "numExecutors": {"type": "integer"},
-                        "retentionStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
-                        },
-                        "instanceId": {"type": "string"},
-                        "labelString": {"type": "string"},
-                        "connectionStrategy": {
-                            "type": "string",
-                            "enum": [
-                                "Public DNS",
-                                "Public IP",
-                                "Private DNS",
-                                "Private IP"
-                            ]
-                        },
-                        "idleTerminationMinutes": {"type": "string"},
-                        "jvmopts": {"type": "string"},
-                        "stopOnTerminate": {"type": "boolean"},
-                        "useDedicatedTenancy": {"type": "boolean"},
-                        "launchTimeout": {"type": "integer"},
-                        "userId": {"type": "string"},
-                        "maxTotalUses": {"type": "integer"},
-                        "remoteAdmin": {"type": "string"},
-                        "tags": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.ec2.EC2Tag"
-                        },
-                        "cloudName": {"type": "string"},
-                        "name": {"type": "string"},
-                        "amiType": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.ec2.AMITypeData"
-                        },
-                        "initScript": {"type": "string"},
-                        "publicDNS": {"type": "string"},
-                        "remoteFS": {"type": "string"},
-                        "launcher": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
-                        }
-                    }
-                },
-                "idstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"caseSensitive": {"$id": "#/definitions/jenkins.model.IdStrategy$CaseSensitive"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"caseInsensitive": {"$id": "#/definitions/jenkins.model.IdStrategy$CaseInsensitive"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"caseSensitiveEmailAddress": {"$id": "#/definitions/jenkins.model.IdStrategy$CaseSensitiveEmailAddress"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "jobrestrictionproperty": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"jobRestriction": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                    }}
-                },
-                "sshkeystrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"manuallyConfiguredSSHKey": {"$id": "#/definitions/io.jenkins.docker.connector.DockerComputerSSHConnector$ManuallyConfiguredSSHKey"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"injectSSHKey": {"$id": "#/definitions/io.jenkins.docker.connector.DockerComputerSSHConnector$InjectSSHKey"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "dockercomputerattachconnector": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"user": {"type": "string"}}
-                },
-                "lastduration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "myviewstabbar": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultMyViewsTabBar"}}
-                    }],
-                    "type": "object"
-                },
-                "batchcloud": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "maximumIdleMinutes": {"type": "integer"},
-                        "hostname": {"type": "string"},
-                        "password": {"type": "string"},
-                        "port": {"type": "integer"},
-                        "cloudName": {"type": "string"},
-                        "queueType": {"type": "string"},
-                        "label": {"type": "string"},
-                        "username": {"type": "string"}
-                    }
-                },
-                "casesensitiveemailaddress": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "systemMessage": {"type": "string"},
-                "casesensitive": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "nonverifyingkeyverificationstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "activedirectorysecurityrealm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "captchaSupport": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
-                        },
-                        "removeIrrelevantGroups": {"type": "boolean"},
-                        "server": {"type": "string"},
-                        "cache": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.active_directory.CacheConfiguration"
-                        },
-                        "bindPassword": {"type": "string"},
-                        "environmentProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.active_directory.ActiveDirectorySecurityRealm$EnvironmentProperty"
-                        },
-                        "startTls": {"type": "boolean"},
-                        "tlsConfiguration": {
-                            "type": "string",
-                            "enum": [
-                                "TRUST_ALL_CERTIFICATES",
-                                "JDK_TRUSTSTORE"
-                            ]
-                        },
-                        "groupLookupStrategy": {
-                            "type": "string",
-                            "enum": [
-                                "AUTO",
-                                "RECURSIVE",
-                                "CHAIN",
-                                "TOKENGROUPS"
-                            ]
-                        },
-                        "internalUsersDatabase": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.active_directory.ActiveDirectoryInternalUsersDatabase"
-                        },
-                        "domains": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.active_directory.ActiveDirectoryDomain"
-                        },
-                        "customDomain": {"type": "boolean"},
-                        "site": {"type": "string"},
-                        "bindName": {"type": "string"},
-                        "domain": {"type": "string"}
-                    }
-                },
-                "amitypedata": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"windowsData": {"$id": "#/definitions/hudson.plugins.ec2.WindowsData"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"unixData": {"$id": "#/definitions/hudson.plugins.ec2.UnixData"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "weather": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "scmCheckoutRetryCount": {"type": "integer"},
-                "orjobrestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "first": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                        },
-                        "second": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                        }
-                    }
-                },
-                "patternprojectnamingstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "namePattern": {"type": "string"},
-                        "description": {"type": "string"},
-                        "forceExistingJobs": {"type": "boolean"}
-                    }
-                },
-                "dockertemplatebase": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "cpuShares": {"type": "integer"},
-                        "image": {"type": "string"},
-                        "bindAllPorts": {"type": "boolean"},
-                        "memorySwap": {"type": "integer"},
-                        "volumes": {"type": "string"},
-                        "extraHostsString": {"type": "string"},
-                        "pullCredentialsId": {"type": "string"},
-                        "bindPorts": {"type": "string"},
-                        "environmentsString": {"type": "string"},
-                        "network": {"type": "string"},
-                        "privileged": {"type": "boolean"},
-                        "hostname": {"type": "string"},
-                        "macAddress": {"type": "string"},
-                        "volumesString": {"type": "string"},
-                        "extraHosts": {"type": "string"},
-                        "dockerCommand": {"type": "string"},
-                        "tty": {"type": "boolean"},
-                        "dnsString": {"type": "string"},
-                        "memoryLimit": {"type": "integer"},
-                        "volumesFromString": {"type": "string"},
-                        "volumesFrom2": {"type": "string"}
-                    }
-                },
-                "inheritingglobal": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "mercurialrevisioncolumn": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "fromuserrecordldapgroupmembershipstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"attributeName": {"type": "string"}}
-                },
-                "configmapvolume": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "mountPath": {"type": "string"},
-                        "configMapName": {"type": "string"}
-                    }
-                },
-                "githubpullrequestfilter": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "dockerapi": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "hostname": {"type": "string"},
-                        "apiVersion": {"type": "string"},
-                        "dockerHost": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.docker.commons.credentials.DockerServerEndpoint"
-                        },
-                        "connectTimeout": {"type": "integer"}
-                    }
-                },
-                "status": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "nodeName": {"type": "string"},
-                "sonarrunnerinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "agentProtocols": {"type": "string"},
-                "crumbissuer": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/hudson.security.csrf.DefaultCrumbIssuer"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"test": {"$id": "#/definitions/org.jvnet.hudson.test.TestCrumbIssuer"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "podimagepullsecret": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"name": {"type": "string"}}
-                },
-                "viewstabbar": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultViewsTabBar"}}
-                    }],
-                    "type": "object"
-                },
-                "jenkins": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "authorizationStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.AuthorizationStrategy"
-                        },
-                        "nodeName": {"type": "string"},
-                        "systemMessage": {"type": "string"},
-                        "agentProtocols": {"type": "string"},
-                        "clouds": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.Cloud"
-                        },
-                        "primaryView": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.View"
-                        },
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        },
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "numExecutors": {"type": "integer"},
-                        "quietPeriod": {"type": "integer"},
-                        "labelString": {"type": "string"},
-                        "scmCheckoutRetryCount": {"type": "integer"},
-                        "projectNamingStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.model.ProjectNamingStrategy"
-                        },
-                        "views": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.View"
-                        },
-                        "crumbIssuer": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.csrf.CrumbIssuer"
-                        },
-                        "disableRememberMe": {"type": "boolean"},
-                        "markupFormatter": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.markup.MarkupFormatter"
-                        },
-                        "globalNodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        },
-                        "securityRealm": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.SecurityRealm"
-                        },
-                        "slaveAgentPort": {"type": "integer"},
-                        "myViewsTabBar": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.MyViewsTabBar"
-                        },
-                        "updateCenter": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.UpdateCenter"
-                        },
-                        "proxy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.ProxyConfiguration"
-                        },
-                        "viewsTabBar": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.ViewsTabBar"
-                        },
-                        "nodes": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.Node"
-                        },
-                        "remotingSecurity": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule"
-                        }
-                    }
-                },
-                "commandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                },
-                "inheriting": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "templateenvvar": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"envVar": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.model.KeyValueEnvVar"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"containerEnvVar": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.ContainerEnvVar"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"podEnvVar": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PodEnvVar"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"secretEnvVar": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.model.SecretEnvVar"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "laststable": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "noninheriting": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "gradleinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "hudsonprivatesecurityrealm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "captchaSupport": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
-                        },
-                        "allowsSignup": {"type": "boolean"},
-                        "enableCaptcha": {"type": "boolean"},
-                        "users": {
-                            "type": "object",
-                            "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword"
-                        }
-                    }
-                },
-                "jdkinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "id": {"type": "string"},
-                        "acceptLicense": {"type": "boolean"}
-                    }
-                },
-                "lastsuccess": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "commandlauncher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"command": {"type": "string"}}
-                },
-                "msbuildsonarquberunnerinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "sshhostkeyverificationstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"manuallyTrustedKeyVerificationStrategy": {"$id": "#/definitions/hudson.plugins.sshslaves.verifiers.ManuallyTrustedKeyVerificationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"manuallyProvidedKeyVerificationStrategy": {"$id": "#/definitions/hudson.plugins.sshslaves.verifiers.ManuallyProvidedKeyVerificationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"nonVerifyingKeyVerificationStrategy": {"$id": "#/definitions/hudson.plugins.sshslaves.verifiers.NonVerifyingKeyVerificationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"knownHostsFileKeyVerificationStrategy": {"$id": "#/definitions/hudson.plugins.sshslaves.verifiers.KnownHostsFileKeyVerificationStrategy"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "persistentvolumeclaimworkspacevolume": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "claimName": {"type": "string"},
-                        "readOnly": {"type": "boolean"}
-                    }
-                },
-                "uri": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "extract": {"type": "boolean"},
-                        "value": {"type": "string"},
-                        "executable": {"type": "boolean"}
-                    }
-                },
-                "fromgroupsearchldapgroupmembershipstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"filter": {"type": "string"}}
-                },
-                "remotingSecurity": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule"
-                },
-                "portmapping": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "protocol": {"type": "string"},
-                        "containerPort": {"type": "integer"},
-                        "hostPort": {"type": "integer"}
-                    }
-                },
-                "secretenvvar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "secretName": {"type": "string"},
-                        "secretKey": {"type": "string"},
-                        "key": {"type": "string"}
-                    }
-                },
-                "networkinfo": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"networkName": {"type": "string"}}
-                },
-                "hostpathvolume": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "mountPath": {"type": "string"},
-                        "hostPath": {"type": "string"}
-                    }
-                },
-                "eucalyptus": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "privateKey": {"type": "string"},
-                        "s3endpoint": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/java.net.URL"
-                        },
-                        "instanceCapStr": {"type": "string"},
-                        "roleArn": {"type": "string"},
-                        "roleSessionName": {"type": "string"},
-                        "templates": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.ec2.SlaveTemplate"
-                        },
-                        "credentialsId": {"type": "string"},
-                        "useInstanceProfileForCredentials": {"type": "boolean"},
-                        "ec2endpoint": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/java.net.URL"
-                        }
-                    }
-                },
-                "branchstatuscolumn": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "manuallyprovidedkeyverificationstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"key": {"type": "string"}}
-                },
-                "cloud": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mesos": {"$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosCloud"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"kubernetes": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"eucalyptus": {"$id": "#/definitions/hudson.plugins.ec2.Eucalyptus"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"batch": {"$id": "#/definitions/org.jenkinsci.plugins.sge.BatchCloud"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"amazonEC2": {"$id": "#/definitions/hudson.plugins.ec2.AmazonEC2Cloud"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"nonConfigurableKubernetes": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.NonConfigurableKubernetesCloud"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"docker": {"$id": "#/definitions/com.nirima.jenkins.plugins.docker.DockerCloud"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "mode": {
-                    "type": "string",
-                    "enum": [
-                        "NORMAL",
-                        "EXCLUSIVE"
-                    ]
-                },
-                "numExecutors": {"type": "integer"},
-                "labelString": {"type": "string"},
-                "emptydirvolume": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "mountPath": {"type": "string"},
-                        "memory": {"type": "boolean"}
-                    }
-                },
-                "keycloaksecurityrealm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"captchaSupport": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
-                    }}
-                },
-                "environmentproperty": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "value": {"type": "string"}
-                    }
-                },
-                "windowsdata": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "bootDelay": {"type": "string"},
-                        "useHTTPS": {"type": "boolean"}
-                    }
-                },
-                "jobname": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "always": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "proxyview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "proxiedViewName": {"type": "string"},
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        }
-                    }
-                },
-                "slaveAgentPort": {"type": "integer"},
-                "captchasupport": {},
-                "ldapconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "server": {"type": "string"},
-                        "environmentProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.LDAPSecurityRealm$EnvironmentProperty"
-                        },
-                        "inhibitInferRootDN": {"type": "boolean"},
-                        "displayNameAttributeName": {"type": "string"},
-                        "groupSearchBase": {"type": "string"},
-                        "mailAddressAttributeName": {"type": "string"},
-                        "userSearchBase": {"type": "string"},
-                        "managerDN": {"type": "string"},
-                        "managerPasswordSecret": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.util.Secret"
-                        },
-                        "rootDN": {"type": "string"},
-                        "groupSearchFilter": {"type": "string"},
-                        "groupMembershipStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.security.plugins.ldap.LDAPGroupMembershipStrategy"
-                        },
-                        "userSearch": {"type": "string"}
-                    }
-                },
-                "updateCenter": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.model.UpdateCenter"
-                },
-                "authorizationmatrixnodeproperty": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "permissions": {"type": "string"},
-                        "inheritanceStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.matrixauth.inheritance.InheritanceStrategy"
-                        }
-                    }
-                },
-                "entry": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "value": {"type": "string"},
-                        "key": {"type": "string"}
-                    }
-                },
-                "podvolume": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"configMapVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.ConfigMapVolume"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"emptyDirVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.EmptyDirVolume"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"nfsVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.NfsVolume"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"secretVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.SecretVolume"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"persistentVolumeClaim": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.PersistentVolumeClaim"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"hostPathVolume": {"$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.volumes.HostPathVolume"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "viewjobfilter": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubBranchFilter": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.GitHubBranchFilter"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gitHubPullRequestFilter": {"$id": "#/definitions/org.jenkinsci.plugins.github_branch_source.GitHubPullRequestFilter"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "cacheconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "size": {"type": "integer"},
-                        "ttl": {"type": "integer"}
-                    }
-                },
-                "jnlplauncher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "workDirSettings": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.slaves.RemotingWorkDirSettings"
-                        },
-                        "vmargs": {"type": "string"},
-                        "tunnel": {"type": "string"}
-                    }
-                },
-                "toolinstaller": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"nodeJSInstaller": {"$id": "#/definitions/jenkins.plugins.nodejs.tools.NodeJSInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gradleInstaller": {"$id": "#/definitions/hudson.plugins.gradle.GradleInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"antInstaller": {"$id": "#/definitions/hudson.tasks.Ant$AntInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"sbtInstaller": {"$id": "#/definitions/org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"sonarRunnerInstaller": {"$id": "#/definitions/hudson.plugins.sonar.SonarRunnerInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"msBuildSonarQubeRunnerInstaller": {"$id": "#/definitions/hudson.plugins.sonar.MsBuildSonarQubeRunnerInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"docker": {"$id": "#/definitions/org.jenkinsci.plugins.docker.commons.tools.DockerToolInstaller"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "dockercomputersshconnector": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "maxNumRetries": {"type": "integer"},
-                        "suffixStartSlaveCmd": {"type": "string"},
-                        "port": {"type": "integer"},
-                        "javaPath": {"type": "string"},
-                        "launchTimeoutSeconds": {"type": "integer"},
-                        "prefixStartSlaveCmd": {"type": "string"},
-                        "retryWaitTime": {"type": "integer"},
-                        "jvmOptions": {"type": "string"},
-                        "sshKeyStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/io.jenkins.docker.connector.DockerComputerSSHConnector$SSHKeyStrategy"
-                        }
-                    }
-                },
-                "userwithpassword": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "id": {"type": "string"}
-                    }
-                },
-                "notjobrestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"restriction": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                    }}
-                },
-                "dockertoolinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "version": {"type": "string"}
-                    }
-                },
-                "legacy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "startedbymemberofgrouprestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "checkUpstreamProjects": {"type": "boolean"},
-                        "groupList": {
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.GroupSelector"
-                        }
-                    }
-                },
-                "userselector": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"selectedUserId": {"type": "string"}}
-                },
-                "dockercloud": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "containerCap": {"type": "integer"},
-                        "templates": {
-                            "type": "object",
-                            "$id": "#/definitions/com.nirima.jenkins.plugins.docker.DockerTemplate"
-                        },
-                        "name": {"type": "string"},
-                        "exposeDockerHost": {"type": "boolean"},
-                        "dockerApi": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/io.jenkins.docker.client.DockerAPI"
-                        }
-                    }
-                },
-                "ldapsecurityrealm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "disableMailAddressResolver": {"type": "boolean"},
-                        "captchaSupport": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
-                        },
-                        "cache": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.LDAPSecurityRealm$CacheConfiguration"
-                        },
-                        "userIdStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.model.IdStrategy"
-                        },
-                        "disableRolePrefixing": {"type": "boolean"},
-                        "configurations": {
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.security.plugins.ldap.LDAPConfiguration"
-                        },
-                        "groupIdStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.model.IdStrategy"
-                        }
-                    }
-                },
-                "kubernetescloud": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "retentionTimeout": {"type": "integer"},
-                        "skipTlsVerify": {"type": "boolean"},
-                        "templates": {
-                            "type": "object",
-                            "$id": "#/definitions/org.csanchez.jenkins.plugins.kubernetes.PodTemplate"
-                        },
-                        "addMasterProxyEnvVars": {"type": "boolean"},
-                        "credentialsId": {"type": "string"},
-                        "jenkinsUrl": {"type": "string"},
-                        "maxRequestsPerHostStr": {"type": "string"},
-                        "serverCertificate": {"type": "string"},
-                        "jenkinsTunnel": {"type": "string"},
-                        "readTimeout": {"type": "integer"},
-                        "serverUrl": {"type": "string"},
-                        "connectTimeout": {"type": "integer"},
-                        "name": {"type": "string"},
-                        "namespace": {"type": "string"},
-                        "containerCapStr": {"type": "string"},
-                        "defaultsProviderTemplate": {"type": "string"}
-                    }
-                },
-                "parameter": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "value": {"type": "string"},
-                        "key": {"type": "string"}
-                    }
-                },
-                "simplecommandlauncher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"cmd": {"type": "string"}}
-                },
-                "keyvalueenvvar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "value": {"type": "string"},
-                        "key": {"type": "string"}
-                    }
-                },
-                "slavetemplate": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "launchTimeoutStr": {"type": "string"},
-                        "subnetId": {"type": "string"},
-                        "instanceCapStr": {"type": "string"},
-                        "userData": {"type": "string"},
-                        "description": {"type": "string"},
-                        "connectBySSHProcess": {"type": "boolean"},
-                        "type": {
-                            "type": "string",
-                            "enum": [
-                                "t1.micro",
-                                "t2.nano",
-                                "t2.micro",
-                                "t2.small",
-                                "t2.medium",
-                                "t2.large",
-                                "t2.xlarge",
-                                "t2.2xlarge",
-                                "t3.nano",
-                                "t3.micro",
-                                "t3.small",
-                                "t3.medium",
-                                "t3.large",
-                                "t3.xlarge",
-                                "t3.2xlarge",
-                                "m1.small",
-                                "m1.medium",
-                                "m1.large",
-                                "m1.xlarge",
-                                "m3.medium",
-                                "m3.large",
-                                "m3.xlarge",
-                                "m3.2xlarge",
-                                "m4.large",
-                                "m4.xlarge",
-                                "m4.2xlarge",
-                                "m4.4xlarge",
-                                "m4.10xlarge",
-                                "m4.16xlarge",
-                                "m2.xlarge",
-                                "m2.2xlarge",
-                                "m2.4xlarge",
-                                "cr1.8xlarge",
-                                "r3.large",
-                                "r3.xlarge",
-                                "r3.2xlarge",
-                                "r3.4xlarge",
-                                "r3.8xlarge",
-                                "r4.large",
-                                "r4.xlarge",
-                                "r4.2xlarge",
-                                "r4.4xlarge",
-                                "r4.8xlarge",
-                                "r4.16xlarge",
-                                "r5.large",
-                                "r5.xlarge",
-                                "r5.2xlarge",
-                                "r5.4xlarge",
-                                "r5.8xlarge",
-                                "r5.12xlarge",
-                                "r5.16xlarge",
-                                "r5.24xlarge",
-                                "r5.metal",
-                                "r5a.large",
-                                "r5a.xlarge",
-                                "r5a.2xlarge",
-                                "r5a.4xlarge",
-                                "r5a.12xlarge",
-                                "r5a.24xlarge",
-                                "r5d.large",
-                                "r5d.xlarge",
-                                "r5d.2xlarge",
-                                "r5d.4xlarge",
-                                "r5d.8xlarge",
-                                "r5d.12xlarge",
-                                "r5d.16xlarge",
-                                "r5d.24xlarge",
-                                "r5d.metal",
-                                "x1.16xlarge",
-                                "x1.32xlarge",
-                                "x1e.xlarge",
-                                "x1e.2xlarge",
-                                "x1e.4xlarge",
-                                "x1e.8xlarge",
-                                "x1e.16xlarge",
-                                "x1e.32xlarge",
-                                "i2.xlarge",
-                                "i2.2xlarge",
-                                "i2.4xlarge",
-                                "i2.8xlarge",
-                                "i3.large",
-                                "i3.xlarge",
-                                "i3.2xlarge",
-                                "i3.4xlarge",
-                                "i3.8xlarge",
-                                "i3.16xlarge",
-                                "i3.metal",
-                                "hi1.4xlarge",
-                                "hs1.8xlarge",
-                                "c1.medium",
-                                "c1.xlarge",
-                                "c3.large",
-                                "c3.xlarge",
-                                "c3.2xlarge",
-                                "c3.4xlarge",
-                                "c3.8xlarge",
-                                "c4.large",
-                                "c4.xlarge",
-                                "c4.2xlarge",
-                                "c4.4xlarge",
-                                "c4.8xlarge",
-                                "c5.large",
-                                "c5.xlarge",
-                                "c5.2xlarge",
-                                "c5.4xlarge",
-                                "c5.9xlarge",
-                                "c5.18xlarge",
-                                "c5d.large",
-                                "c5d.xlarge",
-                                "c5d.2xlarge",
-                                "c5d.4xlarge",
-                                "c5d.9xlarge",
-                                "c5d.18xlarge",
-                                "c5n.large",
-                                "c5n.xlarge",
-                                "c5n.2xlarge",
-                                "c5n.4xlarge",
-                                "c5n.9xlarge",
-                                "c5n.18xlarge",
-                                "cc1.4xlarge",
-                                "cc2.8xlarge",
-                                "g2.2xlarge",
-                                "g2.8xlarge",
-                                "g3.4xlarge",
-                                "g3.8xlarge",
-                                "g3.16xlarge",
-                                "g3s.xlarge",
-                                "cg1.4xlarge",
-                                "p2.xlarge",
-                                "p2.8xlarge",
-                                "p2.16xlarge",
-                                "p3.2xlarge",
-                                "p3.8xlarge",
-                                "p3.16xlarge",
-                                "d2.xlarge",
-                                "d2.2xlarge",
-                                "d2.4xlarge",
-                                "d2.8xlarge",
-                                "f1.2xlarge",
-                                "f1.4xlarge",
-                                "f1.16xlarge",
-                                "m5.large",
-                                "m5.xlarge",
-                                "m5.2xlarge",
-                                "m5.4xlarge",
-                                "m5.12xlarge",
-                                "m5.24xlarge",
-                                "m5a.large",
-                                "m5a.xlarge",
-                                "m5a.2xlarge",
-                                "m5a.4xlarge",
-                                "m5a.12xlarge",
-                                "m5a.24xlarge",
-                                "m5d.large",
-                                "m5d.xlarge",
-                                "m5d.2xlarge",
-                                "m5d.4xlarge",
-                                "m5d.12xlarge",
-                                "m5d.24xlarge",
-                                "h1.2xlarge",
-                                "h1.4xlarge",
-                                "h1.8xlarge",
-                                "h1.16xlarge",
-                                "z1d.large",
-                                "z1d.xlarge",
-                                "z1d.2xlarge",
-                                "z1d.3xlarge",
-                                "z1d.6xlarge",
-                                "z1d.12xlarge",
-                                "u-6tb1.metal",
-                                "u-9tb1.metal",
-                                "u-12tb1.metal",
-                                "a1.medium",
-                                "a1.large",
-                                "a1.xlarge",
-                                "a1.2xlarge",
-                                "a1.4xlarge"
-                            ]
-                        },
-                        "customDeviceMapping": {"type": "string"},
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "tmpDir": {"type": "string"},
-                        "useEphemeralDevices": {"type": "boolean"},
-                        "numExecutors": {"type": "string"},
-                        "zone": {"type": "string"},
-                        "labelString": {"type": "string"},
-                        "connectionStrategy": {
-                            "type": "string",
-                            "enum": [
-                                "Public DNS",
-                                "Public IP",
-                                "Private DNS",
-                                "Private IP"
-                            ]
-                        },
-                        "deleteRootOnTermination": {"type": "boolean"},
-                        "idleTerminationMinutes": {"type": "string"},
-                        "ebsOptimized": {"type": "boolean"},
-                        "associatePublicIp": {"type": "boolean"},
-                        "jvmopts": {"type": "string"},
-                        "stopOnTerminate": {"type": "boolean"},
-                        "monitoring": {"type": "boolean"},
-                        "spotConfig": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.ec2.SpotConfiguration"
-                        },
-                        "useDedicatedTenancy": {"type": "boolean"},
-                        "iamInstanceProfile": {"type": "string"},
-                        "maxTotalUses": {"type": "integer"},
-                        "remoteAdmin": {"type": "string"},
-                        "tags": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.ec2.EC2Tag"
-                        },
-                        "t2Unlimited": {"type": "boolean"},
-                        "securityGroups": {"type": "string"},
-                        "amiType": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.plugins.ec2.AMITypeData"
-                        },
-                        "initScript": {"type": "string"},
-                        "ami": {"type": "string"},
-                        "remoteFS": {"type": "string"}
-                    }
-                },
-                "andjobrestriction": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "first": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                        },
-                        "second": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction"
-                        }
-                    }
-                },
-                "hostpathworkspacevolume": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"hostPath": {"type": "string"}}
-                },
-                "dumbslave": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "nodeName": {"type": "string"},
-                        "numExecutors": {"type": "integer"},
-                        "retentionStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
-                        },
-                        "labelString": {"type": "string"},
-                        "name": {"type": "string"},
-                        "nodeDescription": {"type": "string"},
-                        "remoteFS": {"type": "string"},
-                        "userId": {"type": "string"},
-                        "launcher": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
-                        },
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        }
-                    }
-                },
-                "activedirectoryinternalusersdatabase": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"jenkinsInternalUser": {"type": "string"}}
-                },
-                "containerinfo": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "customDockerCommandShell": {"type": "string"},
-                        "dockerImage": {"type": "string"},
-                        "useCustomDockerCommandShell": {"type": "boolean"},
-                        "dockerForcePullImage": {"type": "boolean"},
-                        "isDind": {"type": "boolean"},
-                        "dockerImageCustomizable": {"type": "boolean"},
-                        "volumes": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$Volume"
-                        },
-                        "networkInfos": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$NetworkInfo"
-                        },
-                        "networking": {"type": "string"},
-                        "type": {"type": "string"},
-                        "portMappings": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$PortMapping"
-                        },
-                        "parameters": {
-                            "type": "object",
-                            "$id": "#/definitions/org.jenkinsci.plugins.mesos.MesosSlaveInfo$Parameter"
-                        },
-                        "dockerPrivilegedMode": {"type": "boolean"}
-                    }
-                },
-                "dockercomputerjnlpconnector": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "jnlpLauncher": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.JNLPLauncher"
-                        },
-                        "user": {"type": "string"}
-                    }
-                },
-                "any": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "dockertemplate": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "retentionStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.nirima.jenkins.plugins.docker.strategy.DockerOnceRetentionStrategy"
-                        },
-                        "instanceCapStr": {"type": "string"},
-                        "connector": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/io.jenkins.docker.connector.DockerComputerConnector"
-                        },
-                        "labelString": {"type": "string"},
-                        "removeVolumes": {"type": "boolean"},
-                        "dockerTemplateBase": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.nirima.jenkins.plugins.docker.DockerTemplateBase"
-                        },
-                        "pullStrategy": {
-                            "type": "string",
-                            "enum": [
-                                "PULL_ALWAYS",
-                                "PULL_LATEST",
-                                "PULL_NEVER"
-                            ]
-                        },
-                        "remoteFs": {"type": "string"},
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        }
-                    }
-                },
-                "rawhtmlmarkupformatter": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"disableSyntaxHighlighting": {"type": "boolean"}}
-                },
-                "dockercomputerconnector": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jnlp": {"$id": "#/definitions/io.jenkins.docker.connector.DockerComputerJNLPConnector"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"ssh": {"$id": "#/definitions/io.jenkins.docker.connector.DockerComputerSSHConnector"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"attach": {"$id": "#/definitions/io.jenkins.docker.connector.DockerComputerAttachConnector"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "descriptioncolumn": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "updatesite": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "id": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "unixdata": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "sshPort": {"type": "string"},
-                        "slaveCommandSuffix": {"type": "string"},
-                        "rootCommandPrefix": {"type": "string"},
-                        "slaveCommandPrefix": {"type": "string"}
-                    }
-                }
-            }
-        },
-        "aws": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the aws classifier",
-            "properties": {
-                "s3": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStoreConfig"
-                },
-                "credentialsawsglobalconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "credentialsId": {"type": "string"},
-                        "region": {"type": "string"}
-                    }
-                },
-                "awsCredentials": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/io.jenkins.plugins.aws.global_configuration.CredentialsAwsGlobalConfiguration"
-                },
-                "s3blobstoreconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "container": {"type": "string"},
-                        "prefix": {"type": "string"}
-                    }
-                }
-            }
-        },
-        "tool": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the tool classifier",
-            "properties": {
-                "standard": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "gradleinstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "nodejsinstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "globalsettingsprovider": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultGlobalSettingsProvider"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mvn": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.job.MvnGlobalSettingsProvider"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathGlobalSettingsProvider"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "jgitapache": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.gitclient.JGitApacheTool$DescriptorImpl"
-                },
-                "filepathsettingsprovider": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"path": {"type": "string"}}
-                },
-                "gittool": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "customTool": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/com.cloudbees.jenkins.plugins.customtools.CustomTool$DescriptorImpl"
-                },
-                "settingsprovider": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultSettingsProvider"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mvn": {"$id": "#/definitions/org.jenkinsci.plugins.configfiles.maven.job.MvnSettingsProvider"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathSettingsProvider"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "batchcommandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                },
-                "mvnglobalsettingsprovider": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"settingsConfigId": {"type": "string"}}
-                },
-                "antinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "jgit": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.gitclient.JGitTool$DescriptorImpl"
-                },
-                "antinstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "toolversionconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"versionsListSource": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/com.cwctravel.hudson.plugins.extended_choice_parameter.ExtendedChoiceParameterDefinition"
-                    }}
-                },
-                "zipextractioninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "subdir": {"type": "string"},
-                        "label": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "maven": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.mvn.GlobalMavenConfig"
-                },
-                "maveninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "mercurialInstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.plugins.mercurial.MercurialInstallation$DescriptorImpl"
-                },
-                "dockerTool": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.plugins.docker.commons.tools.DockerTool$DescriptorImpl"
-                },
-                "filepathglobalsettingsprovider": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"path": {"type": "string"}}
-                },
-                "maveninstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "mvnsettingsprovider": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"settingsConfigId": {"type": "string"}}
-                },
-                "toolinstaller": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"nodeJSInstaller": {"$id": "#/definitions/jenkins.plugins.nodejs.tools.NodeJSInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gradleInstaller": {"$id": "#/definitions/hudson.plugins.gradle.GradleInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"antInstaller": {"$id": "#/definitions/hudson.tasks.Ant$AntInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"sbtInstaller": {"$id": "#/definitions/org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"sonarRunnerInstaller": {"$id": "#/definitions/hudson.plugins.sonar.SonarRunnerInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"msBuildSonarQubeRunnerInstaller": {"$id": "#/definitions/hudson.plugins.sonar.MsBuildSonarQubeRunnerInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"docker": {"$id": "#/definitions/org.jenkinsci.plugins.docker.commons.tools.DockerToolInstaller"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "extendedchoiceparameterdefinition": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "propertyKey": {"type": "string"},
-                        "defaultPropertyKey": {"type": "string"},
-                        "propertyFile": {"type": "string"},
-                        "defaultValue": {"type": "string"},
-                        "defaultPropertyFile": {"type": "string"},
-                        "name": {"type": "string"},
-                        "description": {"type": "string"},
-                        "type": {"type": "string"},
-                        "visibleItemCount": {"type": "integer"},
-                        "value": {"type": "string"},
-                        "quoteValue": {"type": "boolean"}
-                    }
-                },
-                "dockertool": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "nodejsinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "npmPackagesRefreshHours": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/long"
-                        },
-                        "id": {"type": "string"},
-                        "npmPackages": {"type": "string"},
-                        "force32Bit": {"type": "boolean"}
-                    }
-                },
-                "sonarRunnerInstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.plugins.sonar.SonarRunnerInstallation$DescriptorImpl"
-                },
-                "mercurialinstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "debug": {"type": "boolean"},
-                        "masterCacheRoot": {"type": "string"},
-                        "useCaches": {"type": "boolean"},
-                        "name": {"type": "string"},
-                        "useSharing": {"type": "boolean"},
-                        "config": {"type": "string"},
-                        "executable": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "toolproperty": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}}
-                    }],
-                    "type": "object"
-                },
-                "dockertoolinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "version": {"type": "string"}
-                    }
-                },
-                "sonarrunnerinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "antInstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.tasks.Ant$AntInstallation$DescriptorImpl"
-                },
-                "msbuildsqrunnerinstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "toolinstallation": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"antInstallation": {"$id": "#/definitions/hudson.tasks.Ant$AntInstallation"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstallation"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"msBuildSQRunnerInstallation": {"$id": "#/definitions/hudson.plugins.sonar.MsBuildSQRunnerInstallation"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"mercurialInstallation": {"$id": "#/definitions/hudson.plugins.mercurial.MercurialInstallation"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"nodejs": {"$id": "#/definitions/jenkins.plugins.nodejs.tools.NodeJSInstallation"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jgitapache": {"$id": "#/definitions/org.jenkinsci.plugins.gitclient.JGitApacheTool"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"dockerTool": {"$id": "#/definitions/org.jenkinsci.plugins.docker.commons.tools.DockerTool"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"gradleInstallation": {"$id": "#/definitions/hudson.plugins.gradle.GradleInstallation"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"customTool": {"$id": "#/definitions/com.cloudbees.jenkins.plugins.customtools.CustomTool"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jdk": {"$id": "#/definitions/hudson.model.JDK"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"sbtInstallation": {"$id": "#/definitions/org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstallation"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"git": {"$id": "#/definitions/hudson.plugins.git.GitTool"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jgit": {"$id": "#/definitions/org.jenkinsci.plugins.gitclient.JGitTool"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"sonarRunnerInstallation": {"$id": "#/definitions/hudson.plugins.sonar.SonarRunnerInstallation"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "nodejs": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.plugins.nodejs.tools.NodeJSInstallation$DescriptorImpl"
-                },
-                "globalmavenconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "settingsProvider": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.mvn.SettingsProvider"
-                        },
-                        "installations": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tasks.Maven$MavenInstallation"
-                        },
-                        "globalSettingsProvider": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.mvn.GlobalSettingsProvider"
-                        }
-                    }
-                },
-                "customtool": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "toolVersion": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.customtools.versions.ToolVersionConfig"
-                        },
-                        "labelSpecifics": {
-                            "type": "object",
-                            "$id": "#/definitions/com.synopsys.arc.jenkinsci.plugins.customtools.LabelSpecifics"
-                        },
-                        "exportedPaths": {"type": "string"},
-                        "name": {"type": "string"},
-                        "additionalVariables": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "sbtInstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstallation$DescriptorImpl"
-                },
-                "git": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.plugins.git.GitTool$DescriptorImpl"
-                },
-                "commandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                },
-                "labelspecifics": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "additionalVars": {"type": "string"},
-                        "exportedPaths": {"type": "string"},
-                        "label": {"type": "string"}
-                    }
-                },
-                "gradleinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "jdkinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "id": {"type": "string"},
-                        "acceptLicense": {"type": "boolean"}
-                    }
-                },
-                "msBuildSQRunnerInstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.plugins.sonar.MsBuildSQRunnerInstallation$DescriptorImpl"
-                },
-                "msbuildsonarquberunnerinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "gradleInstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.plugins.gradle.GradleInstallation$DescriptorImpl"
-                },
-                "sonarrunnerinstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "jdk": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.model.JDK$DescriptorImpl"
-                },
-                "sbtinstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "sbtArguments": {"type": "string"},
-                        "home": {"type": "string"}
-                    }
-                },
-                "sbtinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                }
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java
index d186e9c7a1..810b50ea78 100644
--- a/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java
+++ b/integrations/src/test/java/io/jenkins/plugins/casc/AzureKeyVaultTest.java
@@ -20,11 +20,4 @@ public void validJsonSchema() throws Exception {
             validateSchema(convertYamlFileToJson(this, "azureKeyVault.yml")),
             empty());
     }
-
-//    @Test
-//    public void writeSchema() throws Exception {
-//        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
-//        writer.write(writeJSONSchema());
-//        writer.close();
-//    }
 }
diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java
index 7cbb50c458..8610191c75 100644
--- a/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java
+++ b/integrations/src/test/java/io/jenkins/plugins/casc/SlackTest.java
@@ -40,12 +40,4 @@ public void validJsonSchema() throws Exception {
             validateSchema(convertYamlFileToJson(this, "slackSchema.yml")),
             empty());
     }
-
-//    @Test
-//    public void writeSchema() throws Exception {
-//        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
-//        writer.write(writeJSONSchema());
-//        writer.close();
-//    }
-
 }
diff --git a/plugin/schema.json b/plugin/schema.json
deleted file mode 100644
index dba957be70..0000000000
--- a/plugin/schema.json
+++ /dev/null
@@ -1,1151 +0,0 @@
-{
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "description": "Jenkins Configuration as Code",
-    "additionalProperties": false,
-    "type": "object",
-    "properties": {
-        "security": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the security classifier",
-            "properties": {
-                "downloadSettings": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.DownloadSettings"
-                },
-                "cli": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"enabled": {"type": "boolean"}}
-                },
-                "queueItemAuthenticator": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.QueueItemAuthenticatorConfiguration"
-                },
-                "updateSiteWarningsConfiguration": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.UpdateSiteWarningsConfiguration"
-                },
-                "queueitemauthenticator": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"mock": {"$id": "#/definitions/org.jvnet.hudson.test.MockQueueItemAuthenticator"}}
-                    }],
-                    "type": "object"
-                },
-                "masterKillSwitchConfiguration": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.s2m.MasterKillSwitchConfiguration"
-                },
-                "masterkillswitchconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "remotingCLI": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.CLI"
-                },
-                "sSHD": {
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.main.modules.sshd.SSHD"
-                },
-                "sshd": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"port": {"type": "integer"}}
-                },
-                "crumb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "downloadsettings": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"useBrowser": {"type": "boolean"}}
-                },
-                "updatesitewarningsconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                }
-            }
-        },
-        "unclassified": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the unclassified classifier",
-            "properties": {
-                "jenkinslocationconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "adminAddress": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "nodeProperties": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalNodePropertiesConfiguration"
-                },
-                "cloud": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "quietPeriod": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalQuietPeriodConfiguration"
-                },
-                "foobar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "bar": {"type": "string"},
-                        "foo": {"type": "string"}
-                    }
-                },
-                "viewstabbar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "usageStatistics": {
-                    "type": "object",
-                    "$id": "#/definitions/hudson.model.UsageStatistics"
-                },
-                "pollSCM": {
-                    "type": "object",
-                    "$id": "#/definitions/hudson.triggers.SCMTrigger$DescriptorImpl"
-                },
-                "scmretrycount": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "quietperiod": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "cascglobalconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"configurationPath": {"type": "string"}}
-                },
-                "usagestatistics": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "administrativeMonitorsConfiguration": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.management.AdministrativeMonitorsConfiguration"
-                },
-                "administrativemonitorsconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "masterBuild": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.MasterBuildConfiguration"
-                },
-                "projectNamingStrategy": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalProjectNamingStrategyConfiguration"
-                },
-                "descriptorimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"pollingThreadCount": {"type": "integer"}}
-                },
-                "defaultview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "myView": {
-                    "type": "object",
-                    "$id": "#/definitions/hudson.views.MyViewsTabBar$GlobalConfigurationImpl"
-                },
-                "fooBarGlobal": {
-                    "type": "object",
-                    "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBarGlobalConfiguration"
-                },
-                "foobarglobalconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"fooBar": {
-                        "type": "object",
-                        "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBar"
-                    }}
-                },
-                "scmRetryCount": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalSCMRetryCountConfiguration"
-                },
-                "casCGlobalConfig": {
-                    "type": "object",
-                    "$id": "#/definitions/io.jenkins.plugins.casc.CasCGlobalConfig"
-                },
-                "artifactManager": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.ArtifactManagerConfiguration"
-                },
-                "artifactmanagerfactory": {},
-                "fooBar": {
-                    "type": "object",
-                    "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DescriptorConfiguratorTest$FooBar"
-                },
-                "myview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "viewsTabBar": {
-                    "type": "object",
-                    "$id": "#/definitions/hudson.views.ViewsTabBar$GlobalConfigurationImpl"
-                },
-                "defaultView": {
-                    "type": "object",
-                    "$id": "#/definitions/hudson.views.GlobalDefaultViewConfiguration"
-                },
-                "plugin": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "shell": {
-                    "type": "object",
-                    "$id": "#/definitions/hudson.tasks.Shell$DescriptorImpl"
-                },
-                "foobarone": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "bar": {"type": "string"},
-                        "foo": {"type": "string"}
-                    }
-                },
-                "location": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.JenkinsLocationConfiguration"
-                },
-                "nodeproperties": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "projectnamingstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "masterbuild": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                }
-            }
-        },
-        "configuration-as-code": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the configuration-as-code classifier",
-            "properties": {
-                "restricted": {
-                    "type": "string",
-                    "enum": [
-                        "reject",
-                        "beta",
-                        "warn"
-                    ]
-                },
-                "deprecated": {
-                    "type": "string",
-                    "enum": [
-                        "reject",
-                        "warn"
-                    ]
-                },
-                "version": {
-                    "type": "string",
-                    "enum": ["1"]
-                },
-                "unknown": {
-                    "type": "string",
-                    "enum": [
-                        "reject",
-                        "warn"
-                    ]
-                }
-            }
-        },
-        "jenkins": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the jenkins classifier",
-            "properties": {
-                "standard": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "systemMessage": {"type": "string"},
-                "listview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "includeRegex": {"type": "string"},
-                        "columns": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.ListViewColumn"
-                        },
-                        "recurse": {"type": "boolean"},
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        },
-                        "jobFilters": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.ViewJobFilter"
-                        }
-                    }
-                },
-                "computerlauncher": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"simpleCommandLauncher": {"$id": "#/definitions/org.jvnet.hudson.test.SimpleCommandLauncher"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jnlp": {"$id": "#/definitions/hudson.slaves.JNLPLauncher"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"command": {"$id": "#/definitions/hudson.slaves.CommandLauncher"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "cloud": {},
-                "mode": {
-                    "type": "string",
-                    "enum": [
-                        "NORMAL",
-                        "EXCLUSIVE"
-                    ]
-                },
-                "numExecutors": {"type": "integer"},
-                "view": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"all": {"$id": "#/definitions/hudson.model.AllView"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"proxy": {"$id": "#/definitions/hudson.model.ProxyView"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"myView": {"$id": "#/definitions/hudson.model.MyView"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"list": {"$id": "#/definitions/hudson.model.ListView"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "quietPeriod": {"type": "integer"},
-                "batchcommandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                },
-                "markupformatter": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"plainText": {"$id": "#/definitions/hudson.markup.EscapedMarkupFormatter"}}
-                    }],
-                    "type": "object"
-                },
-                "jDKs": {
-                    "type": "object",
-                    "$id": "#/definitions/hudson.model.JDK"
-                },
-                "labelString": {"type": "string"},
-                "retentionstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"always": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Always"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"schedule": {"$id": "#/definitions/hudson.slaves.SimpleScheduledRetentionStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"demand": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Demand"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "weather": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "defaultcrumbissuer": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"excludeClientIPFromCrumb": {"type": "boolean"}}
-                },
-                "listviewcolumn": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jobName": {"$id": "#/definitions/hudson.views.JobColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastDuration": {"$id": "#/definitions/hudson.views.LastDurationColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"buildButton": {"$id": "#/definitions/hudson.views.BuildButtonColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastStable": {"$id": "#/definitions/hudson.views.LastStableColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"weather": {"$id": "#/definitions/hudson.views.WeatherColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastSuccess": {"$id": "#/definitions/hudson.views.LastSuccessColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastFailure": {"$id": "#/definitions/hudson.views.LastFailureColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"status": {"$id": "#/definitions/hudson.views.StatusColumn"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "scmCheckoutRetryCount": {"type": "integer"},
-                "authorizationstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacyAuthorizationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"loggedInUsersCanDoAnything": {"$id": "#/definitions/hudson.security.FullControlOnceLoggedInAuthorizationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"unsecured": {"$id": "#/definitions/hudson.security.AuthorizationStrategy$Unsecured"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "patternprojectnamingstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "namePattern": {"type": "string"},
-                        "description": {"type": "string"},
-                        "forceExistingJobs": {"type": "boolean"}
-                    }
-                },
-                "jobname": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "always": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "proxyview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "proxiedViewName": {"type": "string"},
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        }
-                    }
-                },
-                "zipextractioninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "subdir": {"type": "string"},
-                        "label": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "test": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "rawBuildsDir": {"type": "string"},
-                "adminwhitelistrule": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"enabled": {"type": "boolean"}}
-                },
-                "maveninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "slaveAgentPort": {"type": "integer"},
-                "captchasupport": {},
-                "nodeproperty": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"toolLocation": {"$id": "#/definitions/hudson.tools.ToolLocationNodeProperty"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"envVars": {"$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "updateCenter": {
-                    "type": "object",
-                    "$id": "#/definitions/hudson.model.UpdateCenter"
-                },
-                "demand": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "idleDelay": {
-                            "type": "object",
-                            "$id": "#/definitions/long"
-                        },
-                        "inDemandDelay": {
-                            "type": "object",
-                            "$id": "#/definitions/long"
-                        }
-                    }
-                },
-                "myview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        }
-                    }
-                },
-                "entry": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "value": {"type": "string"},
-                        "key": {"type": "string"}
-                    }
-                },
-                "proxy": {
-                    "type": "object",
-                    "$id": "#/definitions/hudson.ProxyConfiguration"
-                },
-                "node": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"pretendSlave": {"$id": "#/definitions/org.jvnet.hudson.test.PretendSlave"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jenkins": {"$id": "#/definitions/jenkins.model.Jenkins"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"dumb": {"$id": "#/definitions/hudson.slaves.DumbSlave"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cloud1PretendSlave": {"$id": "#/definitions/io.jenkins.plugins.casc.core.JenkinsConfiguratorCloudSupportTest$Cloud1PretendSlave"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "viewjobfilter": {},
-                "toolinstaller": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "jnlplauncher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "vmargs": {"type": "string"},
-                        "tunnel": {"type": "string"}
-                    }
-                },
-                "fullcontrolonceloggedinauthorizationstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"allowAnonymousRead": {"type": "boolean"}}
-                },
-                "status": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "userwithpassword": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "id": {"type": "string"}
-                    }
-                },
-                "nodeName": {"type": "string"},
-                "toolproperty": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}}
-                    }],
-                    "type": "object"
-                },
-                "legacy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "securityrealm": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacySecurityRealm"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"local": {"$id": "#/definitions/hudson.security.HudsonPrivateSecurityRealm"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "simplescheduledretentionstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "keepUpWhenActive": {"type": "boolean"},
-                        "startTimeSpec": {"type": "string"},
-                        "upTimeMins": {"type": "integer"}
-                    }
-                },
-                "agentProtocols": {"type": "string"},
-                "proxyconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "port": {"type": "integer"},
-                        "name": {"type": "string"},
-                        "testUrl": {"type": "string"},
-                        "userName": {"type": "string"},
-                        "noProxyHost": {"type": "string"}
-                    }
-                },
-                "crumbissuer": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/hudson.security.csrf.DefaultCrumbIssuer"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"test": {"$id": "#/definitions/org.jvnet.hudson.test.TestCrumbIssuer"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "viewstabbar": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultViewsTabBar"}}
-                    }],
-                    "type": "object"
-                },
-                "simplecommandlauncher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"cmd": {"type": "string"}}
-                },
-                "jenkins": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "authorizationStrategy": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.AuthorizationStrategy"
-                        },
-                        "nodeName": {"type": "string"},
-                        "systemMessage": {"type": "string"},
-                        "agentProtocols": {"type": "string"},
-                        "clouds": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.Cloud"
-                        },
-                        "primaryView": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.View"
-                        },
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        },
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "numExecutors": {"type": "integer"},
-                        "quietPeriod": {"type": "integer"},
-                        "labelString": {"type": "string"},
-                        "scmCheckoutRetryCount": {"type": "integer"},
-                        "projectNamingStrategy": {
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.model.ProjectNamingStrategy"
-                        },
-                        "views": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.View"
-                        },
-                        "crumbIssuer": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.csrf.CrumbIssuer"
-                        },
-                        "disableRememberMe": {"type": "boolean"},
-                        "markupFormatter": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.markup.MarkupFormatter"
-                        },
-                        "globalNodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        },
-                        "securityRealm": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.SecurityRealm"
-                        },
-                        "slaveAgentPort": {"type": "integer"},
-                        "myViewsTabBar": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.MyViewsTabBar"
-                        },
-                        "updateCenter": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.UpdateCenter"
-                        },
-                        "proxy": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.ProxyConfiguration"
-                        },
-                        "viewsTabBar": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.ViewsTabBar"
-                        },
-                        "nodes": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.Node"
-                        },
-                        "remotingSecurity": {
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule"
-                        }
-                    }
-                },
-                "commandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                },
-                "buildbutton": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "dumbslave": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "nodeName": {"type": "string"},
-                        "numExecutors": {"type": "integer"},
-                        "retentionStrategy": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
-                        },
-                        "labelString": {"type": "string"},
-                        "name": {"type": "string"},
-                        "nodeDescription": {"type": "string"},
-                        "remoteFS": {"type": "string"},
-                        "userId": {"type": "string"},
-                        "launcher": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
-                        },
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        }
-                    }
-                },
-                "laststable": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "disableRememberMe": {"type": "boolean"},
-                "toollocation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "key": {"type": "string"},
-                        "home": {"type": "string"}
-                    }
-                },
-                "hudsonprivatesecurityrealm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "captchaSupport": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
-                        },
-                        "allowsSignup": {"type": "boolean"},
-                        "enableCaptcha": {"type": "boolean"},
-                        "users": {
-                            "type": "object",
-                            "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword"
-                        }
-                    }
-                },
-                "lastfailure": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "jdkinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "id": {"type": "string"},
-                        "acceptLicense": {"type": "boolean"}
-                    }
-                },
-                "lastsuccess": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "commandlauncher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"command": {"type": "string"}}
-                },
-                "plaintext": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "unsecured": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "jdk": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "allview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        }
-                    }
-                },
-                "lastduration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "remotingSecurity": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule"
-                },
-                "myviewstabbar": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultMyViewsTabBar"}}
-                    }],
-                    "type": "object"
-                },
-                "updatesite": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "id": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "projectnamingstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"pattern": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$PatternProjectNamingStrategy"}}
-                        }
-                    ],
-                    "type": "object"
-                }
-            }
-        },
-        "tool": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the tool classifier",
-            "properties": {
-                "toolproperty": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}}
-                    }],
-                    "type": "object"
-                },
-                "standard": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "zipextractioninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "subdir": {"type": "string"},
-                        "label": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "jdkinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "id": {"type": "string"},
-                        "acceptLicense": {"type": "boolean"}
-                    }
-                },
-                "maven": {
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.mvn.GlobalMavenConfig"
-                },
-                "globalsettingsprovider": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultGlobalSettingsProvider"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathGlobalSettingsProvider"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "maveninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "globalmavenconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "settingsProvider": {
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.mvn.SettingsProvider"
-                        },
-                        "installations": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tasks.Maven$MavenInstallation"
-                        },
-                        "globalSettingsProvider": {
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.mvn.GlobalSettingsProvider"
-                        }
-                    }
-                },
-                "filepathsettingsprovider": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"path": {"type": "string"}}
-                },
-                "jdk": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "settingsprovider": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultSettingsProvider"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathSettingsProvider"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "filepathglobalsettingsprovider": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"path": {"type": "string"}}
-                },
-                "batchcommandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                },
-                "maveninstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "toolinstaller": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "commandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                }
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
index 9a98a343e2..bd586c1db9 100644
--- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
+++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
@@ -1,8 +1,11 @@
 package io.jenkins.plugins.casc;
 
+import hudson.model.Descriptor;
 import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry;
 import io.jenkins.plugins.casc.impl.attributes.DescribableAttribute;
+import io.jenkins.plugins.casc.impl.configurators.DescriptorConfigurator;
 import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator;
+import io.vavr.collection.Stream;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
@@ -64,9 +67,16 @@ public static JSONObject generateSchema() {
                                 } else {
                                     attributeSchema.put(attribute.getName(),
                                         generateNonEnumAttributeObject(attribute));
+                                    String key;
+                                    if (baseConfigurator instanceof DescriptorConfigurator) {
+                                        key = ((DescriptorConfigurator) configuratorObject)
+                                            .getName();
+                                    } else {
+                                        key = ((BaseConfigurator) configuratorObject).getTarget()
+                                            .getSimpleName().toLowerCase();
+                                    }
                                     schemaConfiguratorObjects
-                                        .put(((BaseConfigurator) configuratorObject).getTarget()
-                                                .getSimpleName().toLowerCase(),
+                                        .put(key,
                                             new JSONObject()
                                                 .put("additionalProperties", false)
                                                 .put("type", "object")
@@ -77,9 +87,20 @@ public static JSONObject generateSchema() {
                     }
                 } else if (configuratorObject instanceof HeteroDescribableConfigurator) {
                     HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject;
+                    Stream descriptors = heteroDescribableConfigurator.getDescriptors();
+                    String key;
+                    if (!descriptors.isEmpty()) {
+                        key = DescribableAttribute.getPreferredSymbol(
+                            (Descriptor) descriptors.get(0),
+                            heteroDescribableConfigurator.getTarget(),
+                            heteroDescribableConfigurator.getTarget());
+                    } else {
+                        key = heteroDescribableConfigurator.getTarget().getSimpleName()
+                            .toLowerCase();
+                    }
                     schemaConfiguratorObjects
                         .put(
-                            heteroDescribableConfigurator.getTarget().getSimpleName().toLowerCase(),
+                            key,
                             generateHeteroDescribableConfigObject(heteroDescribableConfigurator));
                 } else if (configuratorObject instanceof Attribute) {
                     Attribute attribute = (Attribute) configuratorObject;
diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java
index 4c3a5b94ca..c48fea0a9d 100644
--- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java
+++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java
@@ -144,7 +144,8 @@ private Configurator forceLookupConfigurator(ConfigurationContext context, De
      * Then we go through all the descriptors and find ones compliant with the target.
      * @return Stream of descriptors which match the target
      */
-    private Stream> getDescriptors() {
+    @Restricted(NoExternalUse.class)
+     public Stream> getDescriptors() {
         DescriptorExtensionList> descriptorList = Jenkins.getInstance().getDescriptorList(target);
         if (!descriptorList.isEmpty()) { // fast fetch for root objects
             return Stream.ofAll(descriptorList);
diff --git a/test-harness/schema.json b/test-harness/schema.json
deleted file mode 100644
index 49da03faba..0000000000
--- a/test-harness/schema.json
+++ /dev/null
@@ -1,1198 +0,0 @@
-{
-    "$schema": "http://json-schema.org/draft-07/schema#",
-    "description": "Jenkins Configuration as Code",
-    "additionalProperties": false,
-    "type": "object",
-    "properties": {
-        "security": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the security classifier",
-            "properties": {
-                "downloadSettings": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.DownloadSettings"
-                },
-                "cli": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"enabled": {"type": "boolean"}}
-                },
-                "queueItemAuthenticator": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.QueueItemAuthenticatorConfiguration"
-                },
-                "updateSiteWarningsConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.UpdateSiteWarningsConfiguration"
-                },
-                "queueitemauthenticator": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"mock": {"$id": "#/definitions/org.jvnet.hudson.test.MockQueueItemAuthenticator"}}
-                    }],
-                    "type": "object"
-                },
-                "masterKillSwitchConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.s2m.MasterKillSwitchConfiguration"
-                },
-                "masterkillswitchconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "remotingCLI": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.CLI"
-                },
-                "sSHD": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/org.jenkinsci.main.modules.sshd.SSHD"
-                },
-                "sshd": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"port": {"type": "integer"}}
-                },
-                "crumb": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "downloadsettings": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"useBrowser": {"type": "boolean"}}
-                },
-                "updatesitewarningsconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                }
-            }
-        },
-        "unclassified": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the unclassified classifier",
-            "properties": {
-                "jenkinslocationconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "adminAddress": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "nodeProperties": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalNodePropertiesConfiguration"
-                },
-                "cloud": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "quietPeriod": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalQuietPeriodConfiguration"
-                },
-                "foobar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "bar": {"type": "string"},
-                        "foo": {"type": "string"}
-                    }
-                },
-                "viewstabbar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "usageStatistics": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.model.UsageStatistics"
-                },
-                "pollSCM": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.triggers.SCMTrigger$DescriptorImpl"
-                },
-                "scmretrycount": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "quietperiod": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "cascglobalconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"configurationPath": {"type": "string"}}
-                },
-                "usagestatistics": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "administrativeMonitorsConfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.management.AdministrativeMonitorsConfiguration"
-                },
-                "administrativemonitorsconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "masterBuild": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.MasterBuildConfiguration"
-                },
-                "projectNamingStrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalProjectNamingStrategyConfiguration"
-                },
-                "descriptorimpl": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"pollingThreadCount": {"type": "integer"}}
-                },
-                "defaultview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "myView": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.views.MyViewsTabBar$GlobalConfigurationImpl"
-                },
-                "fooBarGlobal": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBarGlobalConfiguration"
-                },
-                "foobarglobalconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"fooBar": {
-                        "additionalProperties": false,
-                        "type": "object",
-                        "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DuplicateKeyDescribableConfiguratorTest$FooBar"
-                    }}
-                },
-                "scmRetryCount": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.GlobalSCMRetryCountConfiguration"
-                },
-                "casCGlobalConfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/io.jenkins.plugins.casc.CasCGlobalConfig"
-                },
-                "artifactManager": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.ArtifactManagerConfiguration"
-                },
-                "artifactmanagerfactory": {},
-                "fooBar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/io.jenkins.plugins.casc.impl.configurators.DescriptorConfiguratorTest$FooBar"
-                },
-                "myview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "viewsTabBar": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.views.ViewsTabBar$GlobalConfigurationImpl"
-                },
-                "defaultView": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.views.GlobalDefaultViewConfiguration"
-                },
-                "plugin": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "shell": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.tasks.Shell$DescriptorImpl"
-                },
-                "foobarone": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "bar": {"type": "string"},
-                        "foo": {"type": "string"}
-                    }
-                },
-                "location": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.model.JenkinsLocationConfiguration"
-                },
-                "nodeproperties": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "projectnamingstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "masterbuild": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                }
-            }
-        },
-        "configuration-as-code": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the configuration-as-code classifier",
-            "properties": {
-                "restricted": {
-                    "type": "string",
-                    "enum": [
-                        "reject",
-                        "beta",
-                        "warn"
-                    ]
-                },
-                "deprecated": {
-                    "type": "string",
-                    "enum": [
-                        "reject",
-                        "warn"
-                    ]
-                },
-                "version": {
-                    "type": "string",
-                    "enum": ["1"]
-                },
-                "unknown": {
-                    "type": "string",
-                    "enum": [
-                        "reject",
-                        "warn"
-                    ]
-                }
-            }
-        },
-        "jenkins": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the jenkins classifier",
-            "properties": {
-                "standard": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "systemMessage": {"type": "string"},
-                "listview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "includeRegex": {"type": "string"},
-                        "columns": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.ListViewColumn"
-                        },
-                        "recurse": {"type": "boolean"},
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        },
-                        "jobFilters": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.ViewJobFilter"
-                        }
-                    }
-                },
-                "computerlauncher": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"simpleCommandLauncher": {"$id": "#/definitions/org.jvnet.hudson.test.SimpleCommandLauncher"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jnlp": {"$id": "#/definitions/hudson.slaves.JNLPLauncher"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"command": {"$id": "#/definitions/hudson.slaves.CommandLauncher"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "cloud": {},
-                "mode": {
-                    "type": "string",
-                    "enum": [
-                        "NORMAL",
-                        "EXCLUSIVE"
-                    ]
-                },
-                "numExecutors": {"type": "integer"},
-                "view": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"all": {"$id": "#/definitions/hudson.model.AllView"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"proxy": {"$id": "#/definitions/hudson.model.ProxyView"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"myView": {"$id": "#/definitions/hudson.model.MyView"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"list": {"$id": "#/definitions/hudson.model.ListView"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "quietPeriod": {"type": "integer"},
-                "batchcommandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                },
-                "markupformatter": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"plainText": {"$id": "#/definitions/hudson.markup.EscapedMarkupFormatter"}}
-                    }],
-                    "type": "object"
-                },
-                "jDKs": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.model.JDK"
-                },
-                "labelString": {"type": "string"},
-                "retentionstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"always": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Always"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"schedule": {"$id": "#/definitions/hudson.slaves.SimpleScheduledRetentionStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"demand": {"$id": "#/definitions/hudson.slaves.RetentionStrategy$Demand"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "weather": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "defaultcrumbissuer": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"excludeClientIPFromCrumb": {"type": "boolean"}}
-                },
-                "listviewcolumn": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jobName": {"$id": "#/definitions/hudson.views.JobColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastDuration": {"$id": "#/definitions/hudson.views.LastDurationColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"buildButton": {"$id": "#/definitions/hudson.views.BuildButtonColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastStable": {"$id": "#/definitions/hudson.views.LastStableColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"weather": {"$id": "#/definitions/hudson.views.WeatherColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastSuccess": {"$id": "#/definitions/hudson.views.LastSuccessColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"lastFailure": {"$id": "#/definitions/hudson.views.LastFailureColumn"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"status": {"$id": "#/definitions/hudson.views.StatusColumn"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "scmCheckoutRetryCount": {"type": "integer"},
-                "authorizationstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacyAuthorizationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"loggedInUsersCanDoAnything": {"$id": "#/definitions/hudson.security.FullControlOnceLoggedInAuthorizationStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"unsecured": {"$id": "#/definitions/hudson.security.AuthorizationStrategy$Unsecured"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "patternprojectnamingstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "namePattern": {"type": "string"},
-                        "description": {"type": "string"},
-                        "forceExistingJobs": {"type": "boolean"}
-                    }
-                },
-                "jobname": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "always": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "proxyview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "proxiedViewName": {"type": "string"},
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        }
-                    }
-                },
-                "zipextractioninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "subdir": {"type": "string"},
-                        "label": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "test": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "rawBuildsDir": {"type": "string"},
-                "adminwhitelistrule": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"enabled": {"type": "boolean"}}
-                },
-                "maveninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "slaveAgentPort": {"type": "integer"},
-                "captchasupport": {},
-                "nodeproperty": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"toolLocation": {"$id": "#/definitions/hudson.tools.ToolLocationNodeProperty"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"envVars": {"$id": "#/definitions/hudson.slaves.EnvironmentVariablesNodeProperty"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "updateCenter": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.model.UpdateCenter"
-                },
-                "demand": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "idleDelay": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/long"
-                        },
-                        "inDemandDelay": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/long"
-                        }
-                    }
-                },
-                "myview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        }
-                    }
-                },
-                "entry": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "value": {"type": "string"},
-                        "key": {"type": "string"}
-                    }
-                },
-                "proxy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/hudson.ProxyConfiguration"
-                },
-                "node": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"pretendSlave": {"$id": "#/definitions/org.jvnet.hudson.test.PretendSlave"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jenkins": {"$id": "#/definitions/jenkins.model.Jenkins"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"dumb": {"$id": "#/definitions/hudson.slaves.DumbSlave"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"cloud1PretendSlave": {"$id": "#/definitions/io.jenkins.plugins.casc.core.JenkinsConfiguratorCloudSupportTest$Cloud1PretendSlave"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "viewjobfilter": {},
-                "toolinstaller": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "jnlplauncher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "vmargs": {"type": "string"},
-                        "tunnel": {"type": "string"}
-                    }
-                },
-                "fullcontrolonceloggedinauthorizationstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"allowAnonymousRead": {"type": "boolean"}}
-                },
-                "status": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "userwithpassword": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "id": {"type": "string"}
-                    }
-                },
-                "nodeName": {"type": "string"},
-                "toolproperty": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}}
-                    }],
-                    "type": "object"
-                },
-                "legacy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "securityrealm": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"legacy": {"$id": "#/definitions/hudson.security.LegacySecurityRealm"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"local": {"$id": "#/definitions/hudson.security.HudsonPrivateSecurityRealm"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "simplescheduledretentionstrategy": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "keepUpWhenActive": {"type": "boolean"},
-                        "startTimeSpec": {"type": "string"},
-                        "upTimeMins": {"type": "integer"}
-                    }
-                },
-                "agentProtocols": {"type": "string"},
-                "proxyconfiguration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "password": {"type": "string"},
-                        "port": {"type": "integer"},
-                        "name": {"type": "string"},
-                        "testUrl": {"type": "string"},
-                        "userName": {"type": "string"},
-                        "noProxyHost": {"type": "string"}
-                    }
-                },
-                "crumbissuer": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/hudson.security.csrf.DefaultCrumbIssuer"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"test": {"$id": "#/definitions/org.jvnet.hudson.test.TestCrumbIssuer"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "viewstabbar": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultViewsTabBar"}}
-                    }],
-                    "type": "object"
-                },
-                "simplecommandlauncher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"cmd": {"type": "string"}}
-                },
-                "jenkins": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "authorizationStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.AuthorizationStrategy"
-                        },
-                        "nodeName": {"type": "string"},
-                        "systemMessage": {"type": "string"},
-                        "agentProtocols": {"type": "string"},
-                        "clouds": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.Cloud"
-                        },
-                        "primaryView": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.View"
-                        },
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        },
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "numExecutors": {"type": "integer"},
-                        "quietPeriod": {"type": "integer"},
-                        "labelString": {"type": "string"},
-                        "scmCheckoutRetryCount": {"type": "integer"},
-                        "projectNamingStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.model.ProjectNamingStrategy"
-                        },
-                        "views": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.View"
-                        },
-                        "crumbIssuer": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.csrf.CrumbIssuer"
-                        },
-                        "disableRememberMe": {"type": "boolean"},
-                        "markupFormatter": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.markup.MarkupFormatter"
-                        },
-                        "globalNodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        },
-                        "securityRealm": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.SecurityRealm"
-                        },
-                        "slaveAgentPort": {"type": "integer"},
-                        "myViewsTabBar": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.MyViewsTabBar"
-                        },
-                        "updateCenter": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.UpdateCenter"
-                        },
-                        "proxy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.ProxyConfiguration"
-                        },
-                        "viewsTabBar": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.views.ViewsTabBar"
-                        },
-                        "nodes": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.Node"
-                        },
-                        "remotingSecurity": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule"
-                        }
-                    }
-                },
-                "commandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                },
-                "buildbutton": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "dumbslave": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "mode": {
-                            "type": "string",
-                            "enum": [
-                                "NORMAL",
-                                "EXCLUSIVE"
-                            ]
-                        },
-                        "nodeName": {"type": "string"},
-                        "numExecutors": {"type": "integer"},
-                        "retentionStrategy": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.RetentionStrategy"
-                        },
-                        "labelString": {"type": "string"},
-                        "name": {"type": "string"},
-                        "nodeDescription": {"type": "string"},
-                        "remoteFS": {"type": "string"},
-                        "userId": {"type": "string"},
-                        "launcher": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.ComputerLauncher"
-                        },
-                        "nodeProperties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.slaves.NodeProperty"
-                        }
-                    }
-                },
-                "laststable": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "disableRememberMe": {"type": "boolean"},
-                "toollocation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "key": {"type": "string"},
-                        "home": {"type": "string"}
-                    }
-                },
-                "hudsonprivatesecurityrealm": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "captchaSupport": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/hudson.security.captcha.CaptchaSupport"
-                        },
-                        "allowsSignup": {"type": "boolean"},
-                        "enableCaptcha": {"type": "boolean"},
-                        "users": {
-                            "type": "object",
-                            "$id": "#/definitions/io.jenkins.plugins.casc.core.HudsonPrivateSecurityRealmConfigurator$UserWithPassword"
-                        }
-                    }
-                },
-                "lastfailure": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "jdkinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "id": {"type": "string"},
-                        "acceptLicense": {"type": "boolean"}
-                    }
-                },
-                "lastsuccess": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "commandlauncher": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"command": {"type": "string"}}
-                },
-                "plaintext": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "unsecured": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "jdk": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "allview": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.model.ViewProperty"
-                        }
-                    }
-                },
-                "lastduration": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "remotingSecurity": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.security.s2m.AdminWhitelistRule"
-                },
-                "myviewstabbar": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"standard": {"$id": "#/definitions/hudson.views.DefaultMyViewsTabBar"}}
-                    }],
-                    "type": "object"
-                },
-                "updatesite": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "id": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "projectnamingstrategy": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"pattern": {"$id": "#/definitions/jenkins.model.ProjectNamingStrategy$PatternProjectNamingStrategy"}}
-                        }
-                    ],
-                    "type": "object"
-                }
-            }
-        },
-        "tool": {
-            "additionalProperties": false,
-            "type": "object",
-            "title": "Configuration base for the tool classifier",
-            "properties": {
-                "toolproperty": {
-                    "oneOf": [{
-                        "additionalProperties": false,
-                        "properties": {"installSource": {"$id": "#/definitions/hudson.tools.InstallSourceProperty"}}
-                    }],
-                    "type": "object"
-                },
-                "standard": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {}
-                },
-                "zipextractioninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "subdir": {"type": "string"},
-                        "label": {"type": "string"},
-                        "url": {"type": "string"}
-                    }
-                },
-                "jdkinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "id": {"type": "string"},
-                        "acceptLicense": {"type": "boolean"}
-                    }
-                },
-                "maven": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "$id": "#/definitions/jenkins.mvn.GlobalMavenConfig"
-                },
-                "globalsettingsprovider": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultGlobalSettingsProvider"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathGlobalSettingsProvider"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "maveninstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"id": {"type": "string"}}
-                },
-                "globalmavenconfig": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "settingsProvider": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.mvn.SettingsProvider"
-                        },
-                        "installations": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tasks.Maven$MavenInstallation"
-                        },
-                        "globalSettingsProvider": {
-                            "additionalProperties": false,
-                            "type": "object",
-                            "$id": "#/definitions/jenkins.mvn.GlobalSettingsProvider"
-                        }
-                    }
-                },
-                "filepathsettingsprovider": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"path": {"type": "string"}}
-                },
-                "jdk": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "settingsprovider": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"standard": {"$id": "#/definitions/jenkins.mvn.DefaultSettingsProvider"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"filePath": {"$id": "#/definitions/jenkins.mvn.FilePathSettingsProvider"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "filepathglobalsettingsprovider": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {"path": {"type": "string"}}
-                },
-                "batchcommandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                },
-                "maveninstallation": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "name": {"type": "string"},
-                        "properties": {
-                            "type": "object",
-                            "$id": "#/definitions/hudson.tools.ToolProperty"
-                        },
-                        "home": {"type": "string"}
-                    }
-                },
-                "toolinstaller": {
-                    "oneOf": [
-                        {
-                            "additionalProperties": false,
-                            "properties": {"zip": {"$id": "#/definitions/hudson.tools.ZipExtractionInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"batchFile": {"$id": "#/definitions/hudson.tools.BatchCommandInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"jdkInstaller": {"$id": "#/definitions/hudson.tools.JDKInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"maven": {"$id": "#/definitions/hudson.tasks.Maven$MavenInstaller"}}
-                        },
-                        {
-                            "additionalProperties": false,
-                            "properties": {"command": {"$id": "#/definitions/hudson.tools.CommandInstaller"}}
-                        }
-                    ],
-                    "type": "object"
-                },
-                "commandinstaller": {
-                    "additionalProperties": false,
-                    "type": "object",
-                    "properties": {
-                        "label": {"type": "string"},
-                        "toolHome": {"type": "string"},
-                        "command": {"type": "string"}
-                    }
-                }
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/test-harness/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml
index 9ecfbaa4ea..30c98095a0 100644
--- a/test-harness/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml
+++ b/test-harness/src/test/resources/io/jenkins/plugins/casc/invalidBaseConfig.yml
@@ -1,4 +1 @@
-security:
-  cli:
-    enabled: false
 invalidBaseConfigurator: "I do nothing"
diff --git a/test-harness/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml
index f9de4c5dfd..662413dd56 100644
--- a/test-harness/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml
+++ b/test-harness/src/test/resources/io/jenkins/plugins/casc/validSchemaConfig.yml
@@ -1,3 +1,2 @@
-security:
-  cli:
-    enabled: false
+jenkins:
+  systemMessage: "Configured by JCasC"
\ No newline at end of file

From 603a5777845206f1dd52dfbd055395ed89276450 Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Mon, 9 Dec 2019 07:38:24 +0000
Subject: [PATCH 74/93] Add for symbol support

---
 .../plugins/casc/SchemaGeneration.java        | 34 ++++---------------
 .../plugins/casc/SchemaGenerationTest.java    |  8 ++++-
 .../casc/validJenkinsBaseConfigWithSymbol.yml |  4 +++
 3 files changed, 17 insertions(+), 29 deletions(-)
 create mode 100644 test-harness/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfigWithSymbol.yml

diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
index bd586c1db9..c5f092631f 100644
--- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
+++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
@@ -3,6 +3,7 @@
 import hudson.model.Descriptor;
 import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry;
 import io.jenkins.plugins.casc.impl.attributes.DescribableAttribute;
+import io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator;
 import io.jenkins.plugins.casc.impl.configurators.DescriptorConfigurator;
 import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator;
 import io.vavr.collection.Stream;
@@ -26,15 +27,7 @@ public class SchemaGeneration {
 
 
     public static JSONObject generateSchema() {
-
-        /**
-         * The initial template for the JSON Schema
-         */
         JSONObject schemaObject = new JSONObject(schemaTemplateObject.toString());
-        /**
-         * This generates the schema for the base configurators
-         * Iterates over the base configurators and adds them to the schema.
-         */
         DefaultConfiguratorRegistry registry = new DefaultConfiguratorRegistry();
         final ConfigurationContext context = new ConfigurationContext(registry);
 
@@ -49,8 +42,9 @@ public static JSONObject generateSchema() {
                     List baseConfigAttributeList = baseConfigurator.getAttributes();
 
                     if (baseConfigAttributeList.size() == 0) {
+                        String key = baseConfigurator.getName();
                         schemaConfiguratorObjects
-                            .put(baseConfigurator.getName().toLowerCase(),
+                            .put(key,
                                 new JSONObject()
                                     .put("additionalProperties", false)
                                     .put("type", "object")
@@ -67,14 +61,8 @@ public static JSONObject generateSchema() {
                                 } else {
                                     attributeSchema.put(attribute.getName(),
                                         generateNonEnumAttributeObject(attribute));
-                                    String key;
-                                    if (baseConfigurator instanceof DescriptorConfigurator) {
-                                        key = ((DescriptorConfigurator) configuratorObject)
-                                            .getName();
-                                    } else {
-                                        key = ((BaseConfigurator) configuratorObject).getTarget()
-                                            .getSimpleName().toLowerCase();
-                                    }
+                                    String key = baseConfigurator.getName();
+
                                     schemaConfiguratorObjects
                                         .put(key,
                                             new JSONObject()
@@ -87,17 +75,7 @@ public static JSONObject generateSchema() {
                     }
                 } else if (configuratorObject instanceof HeteroDescribableConfigurator) {
                     HeteroDescribableConfigurator heteroDescribableConfigurator = (HeteroDescribableConfigurator) configuratorObject;
-                    Stream descriptors = heteroDescribableConfigurator.getDescriptors();
-                    String key;
-                    if (!descriptors.isEmpty()) {
-                        key = DescribableAttribute.getPreferredSymbol(
-                            (Descriptor) descriptors.get(0),
-                            heteroDescribableConfigurator.getTarget(),
-                            heteroDescribableConfigurator.getTarget());
-                    } else {
-                        key = heteroDescribableConfigurator.getTarget().getSimpleName()
-                            .toLowerCase();
-                    }
+                    String key = heteroDescribableConfigurator.getName();
                     schemaConfiguratorObjects
                         .put(
                             key,
diff --git a/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java
index 2bf070ffc6..b41163a1ee 100644
--- a/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java
+++ b/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationTest.java
@@ -38,6 +38,12 @@ public void validJenkinsBaseConfigurator() throws Exception {
             empty());
     }
 
+    @Test
+    public void symbolResolutionForJenkinsBaseConfigurator() throws Exception {
+        assertThat(validateSchema(convertYamlFileToJson(this, "validJenkinsBaseConfigWithSymbol.yml")),
+            empty());
+    }
+
     @Test
     public void validSelfConfigurator() throws Exception {
         assertThat(
@@ -52,7 +58,7 @@ public void attributesNotFlattenedToTopLevel() throws Exception {
             contains("#/tool: extraneous key [acceptLicense] is not permitted"));
     }
 
-    //    For testing purposes.To be removed
+//    For testing manually
 //    @Test
 //    public void writeSchema() throws Exception {
 //        BufferedWriter writer = new BufferedWriter(new FileWriter("schema.json"));
diff --git a/test-harness/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfigWithSymbol.yml b/test-harness/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfigWithSymbol.yml
new file mode 100644
index 0000000000..c0f09a6aad
--- /dev/null
+++ b/test-harness/src/test/resources/io/jenkins/plugins/casc/validJenkinsBaseConfigWithSymbol.yml
@@ -0,0 +1,4 @@
+jenkins:
+  crumbIssuer:
+    standard:
+      excludeClientIPFromCrumb: false
\ No newline at end of file

From d27113591b4bc7f63682c78bfd144bb8d2aeb795 Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Mon, 9 Dec 2019 07:51:48 +0000
Subject: [PATCH 75/93] Checkstyle

---
 .../main/java/io/jenkins/plugins/casc/SchemaGeneration.java   | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
index c5f092631f..ab135881a8 100644
--- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
+++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
@@ -1,12 +1,8 @@
 package io.jenkins.plugins.casc;
 
-import hudson.model.Descriptor;
 import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry;
 import io.jenkins.plugins.casc.impl.attributes.DescribableAttribute;
-import io.jenkins.plugins.casc.impl.configurators.DataBoundConfigurator;
-import io.jenkins.plugins.casc.impl.configurators.DescriptorConfigurator;
 import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator;
-import io.vavr.collection.Stream;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedHashSet;

From 896d2cb076d7527676bf58034dd0a2fac270128d Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Mon, 9 Dec 2019 20:33:15 +0000
Subject: [PATCH 76/93] Add long to case

---
 .../src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
index ab135881a8..e89814c6fe 100644
--- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
+++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
@@ -170,6 +170,7 @@ private static JSONObject generateNonEnumAttributeObject(Attribute attribute) {
 
             case "int":
             case "java.lang.Integer":
+            case "long":
             case "java.lang.Long":
                 attributeType.put("type", "integer");
                 break;

From ee1c9460fa14dd816a4db4c3df2f393d1e0a2c77 Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Mon, 9 Dec 2019 21:44:14 +0000
Subject: [PATCH 77/93] Add one level of array support

Needs support for recursively resolving types to get nested one, added
an Ignored integration test which demonstrates the failure
---
 .../jenkins/plugins/casc/SonarQubeTest.java   | 22 +++++++++++++
 .../io/jenkins/plugins/casc/sonarSchema.yml   |  8 +++++
 .../jenkins/plugins/casc/sonarSchemaFull.yml  | 15 +++++++++
 .../plugins/casc/SchemaGeneration.java        | 31 ++++++++++++++++---
 4 files changed, 71 insertions(+), 5 deletions(-)
 create mode 100644 integrations/src/test/resources/io/jenkins/plugins/casc/sonarSchema.yml
 create mode 100644 integrations/src/test/resources/io/jenkins/plugins/casc/sonarSchemaFull.yml

diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/SonarQubeTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/SonarQubeTest.java
index ee94ba35f6..bf09f6f1af 100644
--- a/integrations/src/test/java/io/jenkins/plugins/casc/SonarQubeTest.java
+++ b/integrations/src/test/java/io/jenkins/plugins/casc/SonarQubeTest.java
@@ -5,11 +5,19 @@
 import hudson.plugins.sonar.model.TriggersConfig;
 import io.jenkins.plugins.casc.misc.ConfiguredWithReadme;
 import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithReadmeRule;
+import java.io.BufferedWriter;
+import java.io.FileWriter;
 import jenkins.model.GlobalConfiguration;
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 
+import static io.jenkins.plugins.casc.SchemaGeneration.writeJSONSchema;
+import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson;
+import static io.jenkins.plugins.casc.misc.Util.validateSchema;
+import static org.hamcrest.Matchers.empty;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 /**
@@ -38,4 +46,18 @@ public void configure_sonar_globalconfig() throws Exception {
         assertEquals("envVar", triggers.getEnvVar());
     }
 
+    @Test
+    public void validJsonSchema() throws Exception {
+        assertThat(
+            validateSchema(convertYamlFileToJson(this, "sonarSchema.yml")),
+            empty());
+    }
+
+    @Test
+    @Ignore
+    public void validFullJsonSchema() throws Exception {
+        assertThat(
+            validateSchema(convertYamlFileToJson(this, "sonarSchemaFull.yml")),
+            empty());
+    }
 }
diff --git a/integrations/src/test/resources/io/jenkins/plugins/casc/sonarSchema.yml b/integrations/src/test/resources/io/jenkins/plugins/casc/sonarSchema.yml
new file mode 100644
index 0000000000..8cc5a24568
--- /dev/null
+++ b/integrations/src/test/resources/io/jenkins/plugins/casc/sonarSchema.yml
@@ -0,0 +1,8 @@
+unclassified:
+  sonarGlobalConfiguration:
+    buildWrapperEnabled: false
+    installations:
+      - additionalAnalysisProperties: sonar.organization=jenkinsci
+        name: SonarQube
+        serverAuthenticationToken: 'sonarcloud-api-token'
+        serverUrl: 'https://sonarcloud.io'
\ No newline at end of file
diff --git a/integrations/src/test/resources/io/jenkins/plugins/casc/sonarSchemaFull.yml b/integrations/src/test/resources/io/jenkins/plugins/casc/sonarSchemaFull.yml
new file mode 100644
index 0000000000..2602642e9b
--- /dev/null
+++ b/integrations/src/test/resources/io/jenkins/plugins/casc/sonarSchemaFull.yml
@@ -0,0 +1,15 @@
+unclassified:
+  sonarGlobalConfiguration:                  # mandatory
+    buildWrapperEnabled: true
+    installations:                           # mandatory
+      - name: "TEST"                         # id of the SonarQube configuration - to be used in jobs
+        serverUrl: "http://url:9000"
+        #credentialsId: token-sonarqube       # id of the credentials containing sonar auth token (since 2.9 version)
+        serverAuthenticationToken: "token"   # for retrocompatibility with versions < 2.9
+        mojoVersion: "mojoVersion"
+        additionalProperties: "blah=blah"
+        additionalAnalysisProperties: "additionalAnalysisProperties"
+        triggers:
+          skipScmCause: true
+          skipUpstreamCause: true
+          envVar: "envVar"
\ No newline at end of file
diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
index e89814c6fe..1de3bf0779 100644
--- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
+++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
@@ -50,7 +50,7 @@ public static JSONObject generateSchema() {
                         JSONObject attributeSchema = new JSONObject();
                         for (Attribute attribute : baseConfigAttributeList) {
                             if (attribute.multiple) {
-                                generateMultipleAttributeSchema(attributeSchema, attribute);
+                                generateMultipleAttributeSchema(attributeSchema, attribute, context);
                             } else {
                                 if (attribute.type.isEnum()) {
                                     generateEnumAttributeSchema(attributeSchema, attribute);
@@ -190,17 +190,38 @@ private static JSONObject generateNonEnumAttributeObject(Attribute attribute) {
         return attributeType;
     }
 
-    private static void generateMultipleAttributeSchema(JSONObject attributeSchema,
-        Attribute attribute) {
+    private static void generateMultipleAttributeSchema(
+        JSONObject attributeSchema,
+        Attribute attribute,
+        ConfigurationContext context
+    ) {
         if (attribute.type.getName().equals("java.lang.String")) {
             attributeSchema.put(attribute.getName(),
                 new JSONObject()
                     .put("type", "string"));
         } else {
+            JSONObject properties = new JSONObject();
+            Configurator lookup = context.lookup(attribute.getType());
+            if (lookup != null) {
+                lookup
+                    .getAttributes()
+                    .forEach(attr -> {
+                        properties
+                            .put(attr.getName(), generateNonEnumAttributeObject(attr));
+                    });
+            }
+
             attributeSchema.put(attribute.getName(),
                 new JSONObject()
-                    .put("type", "object")
-                    .put("$id", "#/definitions/" + attribute.type.getName()));
+                    .put("type", "array")
+                    .put("items", new JSONArray()
+                        .put(new JSONObject()
+                            .put("type", "object")
+                            .put("properties", properties)
+                            .put("additionalProperties", false)
+                        )
+                    )
+            );
         }
     }
 

From 6ab2a31ccc5cf84db0d1cabbe73ec52503654aee Mon Sep 17 00:00:00 2001
From: Joseph Petersen 
Date: Tue, 10 Dec 2019 02:45:36 +0100
Subject: [PATCH 78/93] remove unused imports

---
 .../src/test/java/io/jenkins/plugins/casc/SonarQubeTest.java   | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/integrations/src/test/java/io/jenkins/plugins/casc/SonarQubeTest.java b/integrations/src/test/java/io/jenkins/plugins/casc/SonarQubeTest.java
index bf09f6f1af..c7dc733ed1 100644
--- a/integrations/src/test/java/io/jenkins/plugins/casc/SonarQubeTest.java
+++ b/integrations/src/test/java/io/jenkins/plugins/casc/SonarQubeTest.java
@@ -5,14 +5,11 @@
 import hudson.plugins.sonar.model.TriggersConfig;
 import io.jenkins.plugins.casc.misc.ConfiguredWithReadme;
 import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithReadmeRule;
-import java.io.BufferedWriter;
-import java.io.FileWriter;
 import jenkins.model.GlobalConfiguration;
 import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 
-import static io.jenkins.plugins.casc.SchemaGeneration.writeJSONSchema;
 import static io.jenkins.plugins.casc.misc.Util.convertYamlFileToJson;
 import static io.jenkins.plugins.casc.misc.Util.validateSchema;
 import static org.hamcrest.Matchers.empty;

From 3be39264fe0b739e5eb5db9979af68b7c79a8e85 Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Tue, 10 Dec 2019 09:17:59 +0000
Subject: [PATCH 79/93] Revert unneeded change

---
 .../casc/impl/configurators/HeteroDescribableConfigurator.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java
index c48fea0a9d..2b6cc6b351 100644
--- a/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java
+++ b/plugin/src/main/java/io/jenkins/plugins/casc/impl/configurators/HeteroDescribableConfigurator.java
@@ -144,8 +144,7 @@ private Configurator forceLookupConfigurator(ConfigurationContext context, De
      * Then we go through all the descriptors and find ones compliant with the target.
      * @return Stream of descriptors which match the target
      */
-    @Restricted(NoExternalUse.class)
-     public Stream> getDescriptors() {
+     private Stream> getDescriptors() {
         DescriptorExtensionList> descriptorList = Jenkins.getInstance().getDescriptorList(target);
         if (!descriptorList.isEmpty()) { // fast fetch for root objects
             return Stream.ofAll(descriptorList);

From e7b2a8fe7b5ea914cdd8af1817aeb0d042052abd Mon Sep 17 00:00:00 2001
From: Tim Jacomb 
Date: Tue, 10 Dec 2019 09:43:11 +0000
Subject: [PATCH 80/93] Fix earlier merge, restore help file support

---
 .../plugins/casc/SchemaGeneration.java        | 99 ++++++++++++++-----
 .../SchemaGenerationSanitisationTest.java     | 32 ++++++
 2 files changed, 105 insertions(+), 26 deletions(-)
 create mode 100644 test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationSanitisationTest.java

diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
index 1de3bf0779..c64434f0da 100644
--- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
+++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java
@@ -3,18 +3,23 @@
 import io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry;
 import io.jenkins.plugins.casc.impl.attributes.DescribableAttribute;
 import io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Optional;
 import java.util.Set;
+import java.util.logging.Logger;
 import org.json.JSONArray;
 import org.json.JSONObject;
 
 public class SchemaGeneration {
 
+    private static final Logger LOGGER = Logger.getLogger(SchemaGeneration.class.getName());
+
     final static JSONObject schemaTemplateObject = new JSONObject()
         .put("$schema", "http://json-schema.org/draft-07/schema#")
         .put("description", "Jenkins Configuration as Code")
@@ -50,13 +55,13 @@ public static JSONObject generateSchema() {
                         JSONObject attributeSchema = new JSONObject();
                         for (Attribute attribute : baseConfigAttributeList) {
                             if (attribute.multiple) {
-                                generateMultipleAttributeSchema(attributeSchema, attribute, context);
+                                generateMultipleAttributeSchema(attributeSchema, attribute, context, baseConfigurator);
                             } else {
                                 if (attribute.type.isEnum()) {
-                                    generateEnumAttributeSchema(attributeSchema, attribute);
+                                    generateEnumAttributeSchema(attributeSchema, attribute, baseConfigurator);
                                 } else {
                                     attributeSchema.put(attribute.getName(),
-                                        generateNonEnumAttributeObject(attribute));
+                                        generateNonEnumAttributeObject(attribute, baseConfigurator));
                                     String key = baseConfigurator.getName();
 
                                     schemaConfiguratorObjects
@@ -79,10 +84,10 @@ public static JSONObject generateSchema() {
                 } else if (configuratorObject instanceof Attribute) {
                     Attribute attribute = (Attribute) configuratorObject;
                     if (attribute.type.isEnum()) {
-                        generateEnumAttributeSchema(schemaConfiguratorObjects, attribute);
+                        generateEnumAttributeSchema(schemaConfiguratorObjects, attribute, null);
                     } else {
                         schemaConfiguratorObjects
-                            .put(attribute.getName(), generateNonEnumAttributeObject(attribute));
+                            .put(attribute.getName(), generateNonEnumAttributeObject(attribute, null));
                     }
 
                 }
@@ -160,12 +165,14 @@ private static void listElements(Set elements, Set> attr
     }
 
 
-    private static JSONObject generateNonEnumAttributeObject(Attribute attribute) {
+    private static JSONObject generateNonEnumAttributeObject(Attribute attribute, BaseConfigurator baseConfigurator) {
         JSONObject attributeType = new JSONObject();
+        Optional description = getDescription(attribute, baseConfigurator);
         switch (attribute.type.getName()) {
             case "java.lang.String":
             case "hudson.Secret":
                 attributeType.put("type", "string");
+                description.ifPresent(desc -> attributeType.put("description", desc));
                 break;
 
             case "int":
@@ -173,15 +180,18 @@ private static JSONObject generateNonEnumAttributeObject(Attribute attribute) {
             case "long":
             case "java.lang.Long":
                 attributeType.put("type", "integer");
+                description.ifPresent(desc -> attributeType.put("description", desc));
                 break;
 
             case "boolean":
             case "java.lang.Boolean":
                 attributeType.put("type", "boolean");
+                description.ifPresent(desc -> attributeType.put("description", desc));
                 break;
 
             default:
                 attributeType.put("type", "object");
+                description.ifPresent(desc -> attributeType.put("description", desc));
                 attributeType.put("additionalProperties", false);
                 attributeType.put("$id",
                     "#/definitions/" + attribute.type.getName());
@@ -190,15 +200,30 @@ private static JSONObject generateNonEnumAttributeObject(Attribute attribute) {
         return attributeType;
     }
 
+    private static Optional getDescription(Attribute attribute, BaseConfigurator baseConfigurator) {
+        String description = null;
+        if (baseConfigurator != null) {
+            description = retrieveDocStringFromAttribute(baseConfigurator.getTarget(), attribute.name);
+        }
+        return Optional.ofNullable(description);
+    }
+
     private static void generateMultipleAttributeSchema(
         JSONObject attributeSchema,
         Attribute attribute,
-        ConfigurationContext context
+        ConfigurationContext context,
+        BaseConfigurator baseConfigurator
     ) {
+        Optional description = getDescription(attribute, baseConfigurator);
+
         if (attribute.type.getName().equals("java.lang.String")) {
+            JSONObject jsonObject = new JSONObject()
+                .put("type", "string");
+            description.ifPresent(desc -> jsonObject.put("description", desc));
             attributeSchema.put(attribute.getName(),
-                new JSONObject()
-                    .put("type", "string"));
+                jsonObject)
+            ;
+
         } else {
             JSONObject properties = new JSONObject();
             Configurator lookup = context.lookup(attribute.getType());
@@ -207,40 +232,62 @@ private static void generateMultipleAttributeSchema(
                     .getAttributes()
                     .forEach(attr -> {
                         properties
-                            .put(attr.getName(), generateNonEnumAttributeObject(attr));
+                            .put(attr.getName(), generateNonEnumAttributeObject(attr, baseConfigurator));
                     });
             }
 
-            attributeSchema.put(attribute.getName(),
-                new JSONObject()
-                    .put("type", "array")
-                    .put("items", new JSONArray()
-                        .put(new JSONObject()
-                            .put("type", "object")
-                            .put("properties", properties)
-                            .put("additionalProperties", false)
-                        )
+            JSONObject attributeObject = new JSONObject()
+                .put("type", "array")
+                .put("items", new JSONArray()
+                    .put(new JSONObject()
+                        .put("type", "object")
+                        .put("properties", properties)
+                        .put("additionalProperties", false)
                     )
+                );
+            description.ifPresent(desc -> attributeObject.put("description", desc));
+            attributeSchema.put(attribute.getName(),
+                attributeObject
             );
         }
     }
 
     private static void generateEnumAttributeSchema(JSONObject attributeSchemaTemplate,
-        Attribute attribute) {
+        Attribute attribute, BaseConfigurator baseConfigurator) {
+        Optional description = getDescription(attribute, baseConfigurator);
+
 
         if (attribute.type.getEnumConstants().length == 0) {
+            JSONObject jsonObject = new JSONObject()
+                .put("type", "string");
+            description.ifPresent(desc -> jsonObject.put("description", desc));
             attributeSchemaTemplate.put(attribute.getName(),
-                new JSONObject()
-                    .put("type", "string"));
+                jsonObject
+            );
         } else {
             ArrayList attributeList = new ArrayList<>();
             for (Object obj : attribute.type.getEnumConstants()) {
                 attributeList.add(obj.toString());
             }
-            attributeSchemaTemplate.put(attribute.getName(),
-                new JSONObject()
-                    .put("type", "string")
-                    .put("enum", new JSONArray(attributeList)));
+            JSONObject jsonObject = new JSONObject()
+                .put("type", "string")
+                .put("enum", new JSONArray(attributeList));
+            description.ifPresent(desc -> jsonObject.put("description", desc));
+            attributeSchemaTemplate.put(attribute.getName(), jsonObject);
+        }
+    }
+
+    public static String retrieveDocStringFromAttribute(Class baseConfigClass, String attributeName) {
+        try {
+            String htmlDocString = ConfigurationAsCode.get().getHtmlHelp(baseConfigClass, attributeName);
+            return removeHtmlTags(htmlDocString);
+        } catch (IOException e) {
+            LOGGER.warning("Error getting help document for attribute : " + e);
         }
+        return null;
+    }
+
+    public static String removeHtmlTags(String htmlDocString) {
+        return htmlDocString.replaceAll("<.*?>", "").trim();
     }
 }
diff --git a/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationSanitisationTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationSanitisationTest.java
new file mode 100644
index 0000000000..f47096cde0
--- /dev/null
+++ b/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationSanitisationTest.java
@@ -0,0 +1,32 @@
+package io.jenkins.plugins.casc;
+
+import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule;
+import org.junit.Rule;
+import org.junit.Test;
+import static io.jenkins.plugins.casc.SchemaGeneration.removeHtmlTags;
+import static io.jenkins.plugins.casc.SchemaGeneration.retrieveDocStringFromAttribute;
+
+import static org.junit.Assert.assertEquals;
+
+public class SchemaGenerationSanitisationTest {
+
+    @Rule
+    public JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule();
+
+    @Test
+    public void testRetrieveDocStringFromAttribute() {
+        String expectedDocString = "If checked, this will allow users who are not authenticated to access Jenkins in a read-only mode.";
+        String actualDocString = retrieveDocStringFromAttribute(
+            hudson.security.FullControlOnceLoggedInAuthorizationStrategy.class,
+            "allowAnonymousRead");
+        assertEquals(expectedDocString, actualDocString);
+    }
+
+    @Test
+    public void testRemoveHtmlTagRegex() {
+        String htmlTagString = "
If checked, this will allow users who are not authenticated to access Jenkins in a read-only mode.
"; + String expectedString = "If checked, this will allow users who are not authenticated to access Jenkins in a read-only mode."; + String actualString = removeHtmlTags(htmlTagString); + assertEquals(expectedString, actualString); + } +} From 314f1a78b7bac9b8467c145b97008d26624c4171 Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Tue, 10 Dec 2019 09:47:02 +0000 Subject: [PATCH 81/93] Fix checkstyle --- .../jenkins/plugins/casc/SchemaGenerationSanitisationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationSanitisationTest.java b/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationSanitisationTest.java index f47096cde0..6df336e890 100644 --- a/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationSanitisationTest.java +++ b/test-harness/src/test/java/io/jenkins/plugins/casc/SchemaGenerationSanitisationTest.java @@ -3,9 +3,9 @@ import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; import org.junit.Rule; import org.junit.Test; + import static io.jenkins.plugins.casc.SchemaGeneration.removeHtmlTags; import static io.jenkins.plugins.casc.SchemaGeneration.retrieveDocStringFromAttribute; - import static org.junit.Assert.assertEquals; public class SchemaGenerationSanitisationTest { From b646a04a3f7db1c4aad69e5e2bc419afa460c6c1 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 14 Dec 2019 21:02:00 +0530 Subject: [PATCH 82/93] Added system log and removed exception --- .../main/java/io/jenkins/plugins/casc/Attribute.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index 371a781f46..e9c2084581 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -256,6 +256,8 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi for (Object value : (Iterable) o) { seq.add(_describe(c, context, value, shouldBeMasked)); } + } else { + LOGGER.log(Level.FINE, o.getClass().toString() + "is not iterable"); } return seq; } @@ -271,9 +273,9 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi /** * This function is for the JSONSchemaGeneration - * @param instance - * @param context - * @return + * @param instance Owner Instance + * @param context Context to be passed + * @return CNode object describing the structure of the node */ public CNode describeStructure(Owner instance, ConfigurationContext context) { @@ -304,7 +306,7 @@ public CNode describeStructure(Owner instance, ConfigurationContext context) { return seq; } return _describe(c, context, o, shouldBeMasked); - } catch (Exception | /* Jenkins.getDescriptorOrDie */AssertionError e) { + } catch (Exception e) { // Don't fail the whole export, prefer logging this error LOGGER.log(Level.WARNING, "Failed to export", e); return new Scalar("FAILED TO EXPORT\n" + instance.getClass().getName() + "#" + name + ": " From 423ee6c58d0e96b5993b97f4537618814c968c18 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sat, 14 Dec 2019 21:38:24 +0530 Subject: [PATCH 83/93] Improved warning string --- plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index e9c2084581..8f1b1ab17d 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -257,7 +257,7 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi seq.add(_describe(c, context, value, shouldBeMasked)); } } else { - LOGGER.log(Level.FINE, o.getClass().toString() + "is not iterable"); + LOGGER.log(Level.FINE, o.getClass().toString() + " is not iterable"); } return seq; } From d5d10f44a73fed57833c244d40b34e8da35b7a96 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sun, 5 Jan 2020 12:43:56 +0530 Subject: [PATCH 84/93] Added describeForSchema Function --- .../io/jenkins/plugins/casc/Attribute.java | 24 ++++++++----------- .../io/jenkins/plugins/casc/Configurator.java | 2 +- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index 8f1b1ab17d..97ec750eb2 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -235,16 +235,9 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi } try { Object o; - if(isJsonSchema) { - o = getType(); - if (o == null) { - return null; - } - } else { - o = getValue(instance); - if (o == null) { - return null; - } + o = getValue(instance); + if (o == null) { + return null; } // In Export we sensitive only those values which do not get rendered as secrets @@ -270,14 +263,13 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi } } - /** * This function is for the JSONSchemaGeneration * @param instance Owner Instance * @param context Context to be passed * @return CNode object describing the structure of the node */ - public CNode describeStructure(Owner instance, ConfigurationContext context) { + public CNode describeForSchema(Owner instance, ConfigurationContext context) { final Configurator c = context.lookup(type); if (c == null) { @@ -291,6 +283,11 @@ public CNode describeStructure(Owner instance, ConfigurationContext context) { if (o == null) { return null; } + } else { + o = getValue(instance); + if (o == null) { + return null; + } } // In Export we sensitive only those values which do not get rendered as secrets @@ -313,8 +310,7 @@ public CNode describeStructure(Owner instance, ConfigurationContext context) { + printThrowable(e)); } } - - + /** * Describes a node. * @param c Configurator diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index ad1183b6a8..6c2261015b 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -176,7 +176,7 @@ default CNode describeStructure(T instance, ConfigurationContext context) if(context.getMode().equals("JSONSchema")) { attribute.setJsonSchema(true); } - CNode value = attribute.describeStructure(instance, context); + CNode value = attribute.describeForSchema(instance, context); if (value != null) { mapping.put(attribute.getName(), attribute.getType().getSimpleName()); } From 1cdd88199e01ae502d8a52fb1e90298da91e36c8 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Sun, 5 Jan 2020 13:25:04 +0530 Subject: [PATCH 85/93] Fixed Checkstyle --- plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index 97ec750eb2..0237e85e9d 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -310,7 +310,7 @@ public CNode describeForSchema(Owner instance, ConfigurationContext context) { + printThrowable(e)); } } - + /** * Describes a node. * @param c Configurator From 1040a6a616ff860087fd79724cf5bb5d1b1e6055 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Tue, 7 Jan 2020 20:03:28 +0530 Subject: [PATCH 86/93] Removed boolean --- .../java/io/jenkins/plugins/casc/Attribute.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index 0237e85e9d..00d6abd3e5 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -277,17 +277,10 @@ public CNode describeForSchema(Owner instance, ConfigurationContext context) { ": No configurator found for type " + type); } try { - Object o = new Object(); - if(isJsonSchema) { - o = getType(); - if (o == null) { - return null; - } - } else { - o = getValue(instance); - if (o == null) { - return null; - } + Object o; + o = getType(); + if (o == null) { + return null; } // In Export we sensitive only those values which do not get rendered as secrets From a242048a2e2a745a290c35f3de420c97ddf6c05d Mon Sep 17 00:00:00 2001 From: Sladyn Date: Tue, 7 Jan 2020 20:40:12 +0530 Subject: [PATCH 87/93] Fixed ClassCast Exception --- plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index 00d6abd3e5..34b72b6bce 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -269,7 +269,7 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi * @param context Context to be passed * @return CNode object describing the structure of the node */ - public CNode describeForSchema(Owner instance, ConfigurationContext context) { + public CNode describeForSchema (Owner instance, ConfigurationContext context) { final Configurator c = context.lookup(type); if (c == null) { @@ -287,7 +287,7 @@ public CNode describeForSchema(Owner instance, ConfigurationContext context) { boolean shouldBeMasked = isSecret(instance); if (multiple) { Sequence seq = new Sequence(); - if (o.getClass().isArray()) o = Arrays.asList((Object[]) o); + if (o.getClass().isArray()) o = Arrays.asList(o); if(o instanceof Iterable) { for (Object value : (Iterable) o) { seq.add(_describe(c, context, value, shouldBeMasked)); From 0cfde4ac2093584fe56cdd2b6133102c26297c87 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Wed, 8 Jan 2020 19:48:17 +0530 Subject: [PATCH 88/93] Combined declaration and assignment --- .../src/main/java/io/jenkins/plugins/casc/Attribute.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index 34b72b6bce..b4aed306c4 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -234,8 +234,7 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi ": No configurator found for type " + type); } try { - Object o; - o = getValue(instance); + Object o = getValue(instance); if (o == null) { return null; } @@ -270,15 +269,13 @@ public CNode describe(Owner instance, ConfigurationContext context) throws Confi * @return CNode object describing the structure of the node */ public CNode describeForSchema (Owner instance, ConfigurationContext context) { - final Configurator c = context.lookup(type); if (c == null) { return new Scalar("FAILED TO EXPORT\n" + instance.getClass().getName()+"#"+name + ": No configurator found for type " + type); } try { - Object o; - o = getType(); + Object o = getType(); if (o == null) { return null; } From 1aa84b1654f193d82ee008418b790293395935f7 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 10 Jan 2020 01:32:24 +0530 Subject: [PATCH 89/93] Added javadoc and beta class --- .../src/main/java/io/jenkins/plugins/casc/Configurator.java | 6 ++++++ .../main/java/io/jenkins/plugins/casc/SchemaGeneration.java | 3 +++ 2 files changed, 9 insertions(+) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index 6c2261015b..b5fccb19ea 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -168,6 +168,12 @@ default CNode describe(T instance, ConfigurationContext context) throws Exceptio return mapping; } + /** + * Describe Structure of the attributes, as required by the schema. + * @param instance + * @param context + * @return CNode describing the attributes. + */ @CheckForNull default CNode describeStructure(T instance, ConfigurationContext context) throws Exception { diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java index c64434f0da..35c17bb8c9 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java @@ -15,7 +15,10 @@ import java.util.logging.Logger; import org.json.JSONArray; import org.json.JSONObject; +import org.kohsuke.accmod.Restricted; +import org.kohsuke.accmod.restrictions.Beta; +@Restricted(Beta.class) public class SchemaGeneration { private static final Logger LOGGER = Logger.getLogger(SchemaGeneration.class.getName()); From 1ff2aafb483ad4f6ba08746b1f7bc27aee4a3ea4 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 10 Jan 2020 20:20:31 +0530 Subject: [PATCH 90/93] Update plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java Co-Authored-By: Tim Jacomb --- plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index b5fccb19ea..baba1ffcc4 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -172,6 +172,7 @@ default CNode describe(T instance, ConfigurationContext context) throws Exceptio * Describe Structure of the attributes, as required by the schema. * @param instance * @param context + * @since 1.35 * @return CNode describing the attributes. */ @CheckForNull From 15a7500d23bec8cc1a83326fec3af650e9553bd0 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 10 Jan 2020 20:21:02 +0530 Subject: [PATCH 91/93] Update plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java Co-Authored-By: Joseph Petersen --- plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index b4aed306c4..488edf5303 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -285,7 +285,7 @@ public CNode describeForSchema (Owner instance, ConfigurationContext context) { if (multiple) { Sequence seq = new Sequence(); if (o.getClass().isArray()) o = Arrays.asList(o); - if(o instanceof Iterable) { + if (o instanceof Iterable) { for (Object value : (Iterable) o) { seq.add(_describe(c, context, value, shouldBeMasked)); } From b468ee9f0cccb3b66eb22cefe08d0ea96aa1fa27 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 10 Jan 2020 20:21:14 +0530 Subject: [PATCH 92/93] Update plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java Co-Authored-By: Joseph Petersen --- plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java index baba1ffcc4..4d67472d1a 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Configurator.java @@ -180,7 +180,7 @@ default CNode describeStructure(T instance, ConfigurationContext context) throws Exception { Mapping mapping = new Mapping(); for (Attribute attribute : getAttributes()) { - if(context.getMode().equals("JSONSchema")) { + if (context.getMode().equals("JSONSchema")) { attribute.setJsonSchema(true); } CNode value = attribute.describeForSchema(instance, context); From 772445ac72affd4f83dfb47c15410008c9a004c3 Mon Sep 17 00:00:00 2001 From: Sladyn Date: Fri, 10 Jan 2020 20:21:23 +0530 Subject: [PATCH 93/93] Update plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java Co-Authored-By: Joseph Petersen --- plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java index 488edf5303..28d6c490b1 100644 --- a/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java +++ b/plugin/src/main/java/io/jenkins/plugins/casc/Attribute.java @@ -314,7 +314,7 @@ public CNode describeForSchema (Owner instance, ConfigurationContext context) { private CNode _describe(Configurator c, ConfigurationContext context, Object value, boolean shouldBeMasked) throws Exception { CNode node; - if(isJsonSchema) { + if (isJsonSchema) { node = c.describeStructure(value, context); } else { node = c.describe(value, context);