### Question:
SyntaxChecker { public static List<String> check(String oasSpecContent) { ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(false); parseOptions.setResolveFully(false); parseOptions.setResolveCombinators(false); parseOptions.setFlatten(false); OpenAPIV3Parser parser = new OpenAPIV3Parser(); SwaggerParseResult result = parser.readContents(oasSpecContent, null, parseOptions); return result.getMessages() == null ? emptyList() : result.getMessages(); } private  SyntaxChecker(); static List<String> check(String oasSpecContent);  }### Answer:
@Test public void checkGood() { String yaml = loadRelative("syntax-good.yaml"); List<String> errors = SyntaxChecker.check(yaml); assertThat(errors).isEmpty(); }
@Test public void checkBad() { String yaml = loadRelative("syntax-bad.yaml"); List<String> errors = SyntaxChecker.check(yaml); assertThat(errors).containsExactly("attribute paths.'/pets'(post).summary2 is unexpected"); }