@Test public void testProcessSchema() throws Exception { Schema property1 = new Schema(); Schema property2 = new Schema(); SchemaProcessor propertyProcessor = new SchemaProcessor(cache,openAPI); Schema model = new Schema(); model.addProperties("foo", property1); model.addProperties("bar", property2); propertyProcessor.processSchema(property1); propertyProcessor.processSchema(property2); new SchemaProcessor(cache, openAPI).processSchema(model); assertEquals(model.getProperties().get("foo"), property1); assertEquals(model.getProperties().get("bar"), property2); }
public void processSchema(Schema schema) { if (schema == null) { return; } if (schema.get$ref() != null) { processReferenceSchema(schema); } else { processSchemaType(schema); } }
SchemaProcessor { public void processSchema(Schema schema) { if (schema == null) { return; } if (schema.get$ref() != null) { processReferenceSchema(schema); } else { processSchemaType(schema); } } }
SchemaProcessor { public void processSchema(Schema schema) { if (schema == null) { return; } if (schema.get$ref() != null) { processReferenceSchema(schema); } else { processSchemaType(schema); } } SchemaProcessor(ResolverCache cache, OpenAPI openAPI); }
SchemaProcessor { public void processSchema(Schema schema) { if (schema == null) { return; } if (schema.get$ref() != null) { processReferenceSchema(schema); } else { processSchemaType(schema); } } SchemaProcessor(ResolverCache cache, OpenAPI openAPI); void processSchema(Schema schema); void processSchemaType(Schema schema); void processPropertySchema(Schema schema); void processComposedSchema(ComposedSchema composedSchema); void processArraySchema(ArraySchema arraySchema); }
SchemaProcessor { public void processSchema(Schema schema) { if (schema == null) { return; } if (schema.get$ref() != null) { processReferenceSchema(schema); } else { processSchemaType(schema); } } SchemaProcessor(ResolverCache cache, OpenAPI openAPI); void processSchema(Schema schema); void processSchemaType(Schema schema); void processPropertySchema(Schema schema); void processComposedSchema(ComposedSchema composedSchema); void processArraySchema(ArraySchema arraySchema);  }