Skip to content

Commit

Permalink
Change error message suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
lnash94 committed Jul 24, 2024
1 parent 0696208 commit ebe31a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public enum DiagnosticMessages {
"generated yaml does not contain example for `%s` ", DiagnosticSeverity.WARNING),
OAS_CONVERTOR_129("OAS_CONVERTOR_129", "Given example path `%s` should be JSON file for" +
" example `%s`", DiagnosticSeverity.WARNING),
OAS_CONVERTOR_130("OAS_CONVERTOR_130", "The given JSON value for example contains parsing " +
"issues, therefore generated yaml does not contain example details", DiagnosticSeverity.WARNING),
OAS_CONVERTOR_130("OAS_CONVERTOR_130", "Generated OpenAPI definition does not contain the example" +
" details since the JSON value provided for the example has parser errors", DiagnosticSeverity.WARNING),
OAS_CONVERTOR_131("OAS_CONVERTOR_131", "`%s` example can not have a blank path",
DiagnosticSeverity.WARNING);
private final String code;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public void generateOAS3DefinitionsAllService(Path servicePath, Path outPath, St
.anyMatch(d -> DiagnosticSeverity.ERROR.equals(d.getDiagnosticSeverity()));
this.diagnostics.addAll(definition.getDiagnostics());
if (hasErrors) {
outStream.println("openapi contract generation is skipped because of the following error(s) " +
"occurred during the code generation:");
outStream.println("openapi contract generation skipped due to the following code generation " +
"error(s):");
return;
}
if (definition.getOpenAPI().isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public void testForExamplesHasCompilerErrorse() throws IOException, InterruptedE
"during the code generation:\n" +
"WARNING [main.bal:(12:25,25:14)] Given example path `examples01.json` " +
"is not exist, therefore generated yaml does not contain example for `responseExample01` \n" +
"WARNING [main.bal:(12:25,25:14)] The given JSON value for example contains parsing issues, " +
"therefore generated yaml does not contain example details" +
"WARNING [main.bal:(12:25,25:14)] Generated OpenAPI definition does not contain the example " +
"details since the JSON value provided for the example has parser errors " +
"WARNING [main.bal:(11:19,36:10)] Following issue occurred parsing given example: " +
"Unexpected character (r (code 114)): was expecting double-quote to start field name";
//Thread for wait out put generate
Expand Down

0 comments on commit ebe31a0

Please sign in to comment.