@Test public void testConjureFieldDeprecation() { ConjureSourceFile conjure = ConjureParser.parse(new File("src/test/resources/example-deprecation.yml")); ObjectTypeDefinition object = conjure.types() .definitions() .objects() .get(TypeName.of("BeanWithDeprecatedField")) .visit(new TypeDefinitionVisitor<ObjectTypeDefinition>() { @Override public ObjectTypeDefinition visit(AliasTypeDefinition _def) { throw new SafeIllegalArgumentException("Expected ObjectTypeDefinition"); } @Override public ObjectTypeDefinition visit(EnumTypeDefinition _def) { throw new SafeIllegalArgumentException("Expected ObjectTypeDefinition"); } @Override public ObjectTypeDefinition visit(ObjectTypeDefinition def) { return def; } @Override public ObjectTypeDefinition visit(UnionTypeDefinition _def) { throw new SafeIllegalArgumentException("Expected ObjectTypeDefinition"); } }); assertThat(object.fields().get(FieldName.of("old")).deprecated()).hasValue("Test deprecated."); }
public static ConjureSourceFile parse(File file) { RecursiveParser parser = new RecursiveParser(); return parser.parse(file); }
ConjureParser { public static ConjureSourceFile parse(File file) { RecursiveParser parser = new RecursiveParser(); return parser.parse(file); } }
ConjureParser { public static ConjureSourceFile parse(File file) { RecursiveParser parser = new RecursiveParser(); return parser.parse(file); } private  ConjureParser(); }
ConjureParser { public static ConjureSourceFile parse(File file) { RecursiveParser parser = new RecursiveParser(); return parser.parse(file); } private  ConjureParser(); static ConjureSourceFile parse(File file); static AnnotatedConjureSourceFile parseAnnotated(File file); static List<AnnotatedConjureSourceFile> parseAnnotated(Collection<File> files); }
ConjureParser { public static ConjureSourceFile parse(File file) { RecursiveParser parser = new RecursiveParser(); return parser.parse(file); } private  ConjureParser(); static ConjureSourceFile parse(File file); static AnnotatedConjureSourceFile parseAnnotated(File file); static List<AnnotatedConjureSourceFile> parseAnnotated(Collection<File> files);  }