use of io.swagger.v3.core.resolving.resources.MyThing in project swagger-core by swagger-api.
the class Ticket2740CyclicTest method testCyclicBean.
@Test
public void testCyclicBean() throws Exception {
final ModelResolver modelResolver = new ModelResolver(mapper());
final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);
final Schema model = context.resolve(new AnnotatedType(MyThing.class));
SerializationMatchers.assertEqualsToYaml(model, "type: object\n" + "properties:\n" + " otherThings:\n" + " uniqueItems: true\n" + " type: array\n" + " description: Other related things\n" + " items:\n" + " $ref: '#/components/schemas/MyThing'\n" + "description: Thing");
}
Aggregations