Skip to content
Snippets Groups Projects
Commit b5520bac authored by Rostislav Dublin (EPAM)'s avatar Rostislav Dublin (EPAM)
Browse files

Merge branch 'GCP-fix-swagger' into 'master'

GCP fix swagger (GONRG-1022)

See merge request !46
parents 5195740a b4cebedf
No related branches found
No related tags found
1 merge request!46GCP fix swagger (GONRG-1022)
Pipeline #13301 passed
package org.opengroup.osdu.indexer.swagger; package org.opengroup.osdu.indexer.swagger;
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ParameterBuilder; import springfox.documentation.builders.ParameterBuilder;
...@@ -29,7 +30,7 @@ public class SwaggerDocumentationConfig { ...@@ -29,7 +30,7 @@ public class SwaggerDocumentationConfig {
public Docket api() { public Docket api() {
ParameterBuilder builder = new ParameterBuilder(); ParameterBuilder builder = new ParameterBuilder();
List<Parameter> parameters = new ArrayList<>(); List<Parameter> parameters = new ArrayList<>();
builder.name("slb-data-partition-id") builder.name(DpsHeaders.DATA_PARTITION_ID)
.description("tenant") .description("tenant")
.defaultValue("common") .defaultValue("common")
.modelRef(new ModelRef("string")) .modelRef(new ModelRef("string"))
...@@ -48,7 +49,7 @@ public class SwaggerDocumentationConfig { ...@@ -48,7 +49,7 @@ public class SwaggerDocumentationConfig {
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
.globalOperationParameters(parameters) .globalOperationParameters(parameters)
.select() .select()
.apis(RequestHandlerSelectors.basePackage("com.slb.storage.api")) .apis(RequestHandlerSelectors.basePackage("org.opengroup.osdu.indexer.api"))
.build() .build()
.securityContexts(Collections.singletonList(securityContext())) .securityContexts(Collections.singletonList(securityContext()))
.securitySchemes(Collections.singletonList(apiKey())); .securitySchemes(Collections.singletonList(apiKey()));
......
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