Skip to content

Commit

Permalink
Merge pull request #157 from DomiRusz24/oas-version-fix
Browse files Browse the repository at this point in the history
Added the required API version to the OpenAPI info configuration. (#156)
  • Loading branch information
kashike authored Jul 20, 2023
2 parents 608c66a + d8c7123 commit 87c5c7e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
public class AppConfiguration {
private URL apiBaseUrl;
private String apiTitle;
private String apiVersion;
private @NotNull Path storagePath;

@SuppressWarnings("checkstyle:MethodName")
Expand All @@ -56,6 +57,16 @@ public void setApiTitle(final String apiTitle) {
this.apiTitle = apiTitle;
}

@SuppressWarnings("checkstyle:MethodName")
public String getApiVersion() {
return this.apiVersion;
}

@SuppressWarnings("checkstyle:MethodName")
public void setApiVersion(final String apiVersion) {
this.apiVersion = apiVersion;
}

@SuppressWarnings("checkstyle:MethodName")
public Path getStoragePath() {
return this.storagePath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ OpenAPI openAPI(final AppConfiguration configuration) {
api.info(
new Info()
.title(configuration.getApiTitle())
.version(configuration.getApiVersion())
);
final URL apiBaseUrl = configuration.getApiBaseUrl();
if (apiBaseUrl != null) {
Expand Down

0 comments on commit 87c5c7e

Please sign in to comment.