Skip to content

Commit

Permalink
Merge pull request #1001 from akto-api-security/fix/swagger_path_para…
Browse files Browse the repository at this point in the history
…m_fix

Added changes to extract example from parameter
  • Loading branch information
aktoboy authored Apr 12, 2024
2 parents 67867a6 + e7a5295 commit 6efbeb0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private static String replacePathParameterUtil(String path, Parameter parameter)
String type = schema.getType();
String format = schema.getFormat();

String example = schema.getExample() != null ? String.valueOf(schema.getExample()) : null;
String example = schema.getExample() != null ? String.valueOf(schema.getExample()) : parameter.getExample() != null ? String.valueOf(parameter.getExample()): null;
if(example != null) {
replacement = example;
}
Expand Down

0 comments on commit 6efbeb0

Please sign in to comment.