use of io.swagger.v3.core.resolving.resources.Ticket2862Model in project swagger-core by swagger-api.
the class Ticket2862SubtypeTest method testSubType.
@Test
public void testSubType() throws Exception {
final ModelResolver modelResolver = new ModelResolver(mapper());
final ModelConverterContextImpl context = new ModelConverterContextImpl(modelResolver);
final Schema model = context.resolve(new AnnotatedType(Ticket2862Model.class));
SerializationMatchers.assertEqualsToYaml(context.getDefinedModels(), "Ticket2862Model:\n" + " type: object\n" + " properties:\n" + " Ticket2862Model:\n" + " type: object\n" + "Ticket2862ModelImpl:\n" + " type: string\n" + " allOf:\n" + " - $ref: '#/components/schemas/Ticket2862Model'\n" + " enum:\n" + " - VALUE1\n" + " - VALUE2\n");
}
Aggregations