Skip to content
Snippets Groups Projects
Commit 62860973 authored by Neelesh Thakur's avatar Neelesh Thakur
Browse files

Merge branch 'swagger' into 'master'

fix swagger

See merge request !175
parents e5167b0a 8bf72c0a
No related branches found
No related tags found
2 merge requests!183Locking down maven central,!175fix swagger
Pipeline #55942 failed
......@@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.annotation.RequestScope;
import springfox.documentation.annotations.ApiIgnore;
@Log
@RestController
......@@ -51,6 +52,7 @@ public class CleanupIndiciesApi {
@Autowired
private AuditLogger auditLogger;
@ApiIgnore
@PostMapping(path = "/index-cleanup", consumes = "application/json")
@PreAuthorize("@authorizationFilter.hasPermission('" + SearchServiceRole.ADMIN + "')")
public ResponseEntity cleanupIndices(@NotNull(message = SwaggerDoc.REQUEST_VALIDATION_NOT_NULL_BODY)
......
......@@ -31,21 +31,13 @@ public class SwaggerDocumentationConfig {
ParameterBuilder builder = new ParameterBuilder();
List<Parameter> parameters = new ArrayList<>();
builder.name(DpsHeaders.DATA_PARTITION_ID)
.description("tenant")
.description("data partition id")
.defaultValue("common")
.modelRef(new ModelRef("string"))
.parameterType("header")
.required(true)
.build();
parameters.add(builder.build());
builder.name("slb-frame-of-reference")
.description("reference")
.defaultValue("none")
.modelRef(new ModelRef("string"))
.parameterType("header")
.required(true)
.build();
parameters.add(builder.build());
return new Docket(DocumentationType.SWAGGER_2)
.globalOperationParameters(parameters)
.select()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment