-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace SpringFox with SpringDoc + update dependencies + clean-up owa…
…sp-suppress.xml
- Loading branch information
Showing
7 changed files
with
78 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/java/eu/europeana/iiif/config/SpringDocConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package eu.europeana.iiif.config; | ||
|
||
import io.swagger.v3.oas.models.ExternalDocumentation; | ||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.info.Contact; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import io.swagger.v3.oas.models.info.License; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class SpringDocConfig { | ||
|
||
private final BuildInfo buildInfo; | ||
|
||
/** | ||
* Initialize SpringDoc with API build information | ||
* @param buildInfo object for retrieving build information | ||
*/ | ||
public SpringDocConfig(BuildInfo buildInfo) { | ||
this.buildInfo = buildInfo; | ||
} | ||
|
||
@Bean | ||
public OpenAPI userServiceOpenAPI() { | ||
return new OpenAPI().info(new Info().title(buildInfo.getAppName()) | ||
.description(buildInfo.getAppDescription()) | ||
.version(buildInfo.getAppVersion() + " (build " + buildInfo.getBuildNumber() + ")") | ||
.contact(new Contact().name("API team").url("https://api.europeana.eu").email("[email protected]")) | ||
.termsOfService("https://www.europeana.eu/en/rights/api-terms-of-use") | ||
.license(new License().name("EUPL 1.2").url("https://www.eupl.eu"))) | ||
.externalDocs(new ExternalDocumentation() | ||
.description("Documentation") | ||
.url("https://pro.europeana.eu/page/intro#general")); | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.