public NumberSchema numberSchema() { return new NumberSchema(); }
public NumberSchema numberSchema() { return new NumberSchema(); }
NumberSchema numberSchema = new NumberSchema(); numberSchema.setTitle(name); if (property.getMin() != null) {
NumberSchema numberSchema = new NumberSchema(); numberSchema.setTitle(name); if (property.getMin() != null) {
NumberSchema numberSchema = new NumberSchema(); numberSchema.setTitle(name); if (property.getMin() != null) {
NumberSchema numberSchema = new NumberSchema(); numberSchema.setTitle(name); if (property.getMin() != null) {
NumberSchema numberSchema = new NumberSchema(); numberSchema.setTitle(name); if (property.getMin() != null) {
/** * Create a schema which verifies only that an object is of the given format. * @param format the format to expect * @return the schema verifying the given format */ public static JsonSchema minimalForFormat(JsonFormatTypes format) { if (format != null) { switch (format) { case ARRAY: return new ArraySchema(); case OBJECT: return new ObjectSchema(); case BOOLEAN: return new BooleanSchema(); case INTEGER: return new IntegerSchema(); case NUMBER: return new NumberSchema(); case STRING: return new StringSchema(); case NULL: return new NullSchema(); case ANY: default: } } return new AnySchema(); }
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)); }
/** * Create a schema which verifies only that an object is of the given format. * @param format the format to expect * @return the schema verifying the given format */ public static JsonSchema minimalForFormat(JsonFormatTypes format) { if (format != null) { switch (format) { case ARRAY: return new ArraySchema(); case OBJECT: return new ObjectSchema(); case BOOLEAN: return new BooleanSchema(); case INTEGER: return new IntegerSchema(); case NUMBER: return new NumberSchema(); case STRING: return new StringSchema(); case NULL: return new NullSchema(); case ANY: default: } } return new AnySchema(); }