Skip to content

Commit

Permalink
replaceAll {apiVersion} v2 #TASK-5914
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfeSanahuja committed Jan 14, 2025
1 parent 725b1f3 commit 8eb5d6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ private List<Parameter> extractParameters(java.lang.reflect.Method method, Strin
}

// Añadir encabezado Authorization con el token preconfigurado
Parameter authorizationHeader = new Parameter();
/* Parameter authorizationHeader = new Parameter();
authorizationHeader.setName("Authorization");
authorizationHeader.setIn("header");
authorizationHeader.setDescription("Bearer token for authorization");
authorizationHeader.setRequired(true);
authorizationHeader.setType("string");
authorizationHeader.setDefaultValue("Bearer " + token);
parameters.add(authorizationHeader);
parameters.add(authorizationHeader);*/

return parameters;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public String openApi(@ApiParam(value = "List of categories to get API from") @Q
String swaggerJson ="ERROR: Swagger could not be generated";
ObjectMapper mapper = new ObjectMapper();
try {
swaggerJson = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(swagger);
swaggerJson = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(swagger).replaceAll("{apiVersion}", "v2");
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 8eb5d6b

Please sign in to comment.