public SalesforceMetadataRetrievalTest() { final Map<String, JsonSchema> objectProperties = new HashMap<>(); objectProperties.put("simpleProperty", new StringSchema()); objectProperties.put("anotherProperty", new NumberSchema()); final StringSchema uniqueProperty1 = new StringSchema(); uniqueProperty1.setDescription("idLookup,autoNumber"); uniqueProperty1.setTitle("Unique property 1"); final StringSchema uniqueProperty2 = new StringSchema(); uniqueProperty2.setDescription("calculated,idLookup"); uniqueProperty2.setTitle("Unique property 2"); objectProperties.put("uniqueProperty1", uniqueProperty1); objectProperties.put("uniqueProperty2", uniqueProperty2); final ObjectSchema objectSchema = new ObjectSchema(); objectSchema.setId("urn:jsonschema:org:apache:camel:component:salesforce:dto:SimpleObject"); objectSchema.setProperties(objectProperties); payload = new ObjectSchema(); payload.setOneOf(Collections.singleton(objectSchema)); }
sendAddressProperty.setDescription("Addresses which the bound application will have permission to send to"); sendAddressProperty.setRequired(false); sendAddressProperty.setPattern(addressRegexp); receiveAddressProperty.setDescription("Addresses which the bound application will have permission to receive from"); receiveAddressProperty.setRequired(false); receiveAddressProperty.setPattern(addressRegexp); ObjectSchema serviceCreateParameters = new ObjectSchema(); StringSchema instanceNameProperty = new StringSchema(); instanceNameProperty.setDescription("The name of the address space to create"); instanceNameProperty.setRequired(true); instanceNameProperty.setMinLength(1);