Skip to content

Commit

Permalink
Added changes to use example values in path parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
aktoboy committed Apr 5, 2024
1 parent 065ca3b commit fee1e0c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ private static String replacePathParameterUtil(String path, Parameter parameter)
String type = schema.getType();
String format = schema.getFormat();

if ("integer".equalsIgnoreCase(type)) {
String example = schema.getExample() != null ? String.valueOf(schema.getExample()) : null;
if(example != null) {
replacement = example;
}
else if ("integer".equalsIgnoreCase(type)) {
replacement = "INTEGER";
} else if ("string".equalsIgnoreCase(type)) {
if ("uuid".equalsIgnoreCase(format)) {
Expand Down

0 comments on commit fee1e0c

Please sign in to comment.