Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add app_version field to get and patch api contracts #665

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class ApplicationListItem {
private String id;
private String name;
private String description;
private String applicationVersion;
private String image;
private String accessUrl;
private String clientId;
Expand Down Expand Up @@ -137,6 +138,24 @@ public void setDescription(String description) {
this.description = description;
}

/**
**/
public ApplicationListItem applicationVersion(String applicationVersion) {

this.applicationVersion = applicationVersion;
return this;
}

@ApiModelProperty(example = "This is the application version.", value = "")
@JsonProperty("applicationVersion")
@Valid
public String getApplicationVersion() {
return applicationVersion;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing new line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto generated code.

public void setApplicationVersion(String applicationVersion) {
this.applicationVersion = applicationVersion;
}

/**
**/
public ApplicationListItem image(String image) {
Expand Down Expand Up @@ -369,6 +388,7 @@ public boolean equals(java.lang.Object o) {
return Objects.equals(this.id, applicationListItem.id) &&
Objects.equals(this.name, applicationListItem.name) &&
Objects.equals(this.description, applicationListItem.description) &&
Objects.equals(this.applicationVersion, applicationListItem.applicationVersion) &&
Objects.equals(this.image, applicationListItem.image) &&
Objects.equals(this.accessUrl, applicationListItem.accessUrl) &&
Objects.equals(this.clientId, applicationListItem.clientId) &&
Expand All @@ -385,7 +405,7 @@ public boolean equals(java.lang.Object o) {

@Override
public int hashCode() {
return Objects.hash(id, name, description, image, accessUrl, clientId, issuer, realm, access, self, advancedConfigurations, templateId, templateVersion, associatedRoles, applicationEnabled);
return Objects.hash(id, name, description, applicationVersion, image, accessUrl, clientId, issuer, realm, access, self, advancedConfigurations, templateId, templateVersion, associatedRoles, applicationEnabled);
}

@Override
Expand All @@ -397,6 +417,7 @@ public String toString() {
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" applicationVersion: ").append(toIndentedString(applicationVersion)).append("\n");
sb.append(" image: ").append(toIndentedString(image)).append("\n");
sb.append(" accessUrl: ").append(toIndentedString(accessUrl)).append("\n");
sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class ApplicationPatchModel {

private String name;
private String description;
private String applicationVersion;
private String imageUrl;
private String accessUrl;
private String logoutReturnUrl;
Expand Down Expand Up @@ -87,6 +88,24 @@ public void setDescription(String description) {
this.description = description;
}

/**
**/
public ApplicationPatchModel applicationVersion(String applicationVersion) {

this.applicationVersion = applicationVersion;
return this;
}

@ApiModelProperty(example = "This is the application version.", value = "")
@JsonProperty("applicationVersion")
@Valid
public String getApplicationVersion() {
return applicationVersion;
}
public void setApplicationVersion(String applicationVersion) {
this.applicationVersion = applicationVersion;
}

/**
**/
public ApplicationPatchModel imageUrl(String imageUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class ApplicationResponseModel {
private String id;
private String name;
private String description;
private String applicationVersion;
private String imageUrl;
private String accessUrl;
private String logoutReturnUrl;
Expand Down Expand Up @@ -152,6 +153,24 @@ public void setDescription(String description) {
this.description = description;
}

/**
**/
public ApplicationResponseModel applicationVersion(String applicationVersion) {

this.applicationVersion = applicationVersion;
return this;
}

@ApiModelProperty(example = "This is the application version.", value = "")
@JsonProperty("applicationVersion")
@Valid
public String getApplicationVersion() {
return applicationVersion;
}
public void setApplicationVersion(String applicationVersion) {
this.applicationVersion = applicationVersion;
}

/**
**/
public ApplicationResponseModel imageUrl(String imageUrl) {
Expand Down Expand Up @@ -503,6 +522,7 @@ public boolean equals(java.lang.Object o) {
return Objects.equals(this.id, applicationResponseModel.id) &&
Objects.equals(this.name, applicationResponseModel.name) &&
Objects.equals(this.description, applicationResponseModel.description) &&
Objects.equals(this.applicationVersion, applicationResponseModel.applicationVersion) &&
Objects.equals(this.imageUrl, applicationResponseModel.imageUrl) &&
Objects.equals(this.accessUrl, applicationResponseModel.accessUrl) &&
Objects.equals(this.logoutReturnUrl, applicationResponseModel.logoutReturnUrl) &&
Expand All @@ -525,7 +545,7 @@ public boolean equals(java.lang.Object o) {

@Override
public int hashCode() {
return Objects.hash(id, name, description, imageUrl, accessUrl, logoutReturnUrl, clientId, issuer, realm, templateId, templateVersion, isManagementApp, isB2BSelfServiceApp, applicationEnabled, associatedRoles, claimConfiguration, inboundProtocols, authenticationSequence, advancedConfigurations, provisioningConfigurations, access);
return Objects.hash(id, name, description, applicationVersion, imageUrl, accessUrl, logoutReturnUrl, clientId, issuer, realm, templateId, templateVersion, isManagementApp, isB2BSelfServiceApp, applicationEnabled, associatedRoles, claimConfiguration, inboundProtocols, authenticationSequence, advancedConfigurations, provisioningConfigurations, access);
}

@Override
Expand All @@ -537,6 +557,7 @@ public String toString() {
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" applicationVersion: ").append(toIndentedString(applicationVersion)).append("\n");
sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n");
sb.append(" accessUrl: ").append(toIndentedString(accessUrl)).append("\n");
sb.append(" logoutReturnUrl: ").append(toIndentedString(logoutReturnUrl)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public ApplicationListItem apply(ApplicationBasicInfo applicationBasicInfo) {
.id(applicationBasicInfo.getApplicationResourceId())
.name(applicationBasicInfo.getApplicationName())
.description(applicationBasicInfo.getDescription())
.applicationVersion(applicationBasicInfo.getApplicationVersion())
.image(applicationBasicInfo.getImageUrl())
.accessUrl(applicationBasicInfo.getAccessUrl())
.clientId(applicationBasicInfo.getClientId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public ApplicationListItem apply(ApplicationResponseModel applicationResponseMod
.id(applicationResponseModel.getId())
.name(applicationResponseModel.getName())
.description(applicationResponseModel.getDescription())
.applicationVersion(applicationResponseModel.getApplicationVersion())
.image(applicationResponseModel.getImageUrl())
.accessUrl(applicationResponseModel.getAccessUrl())
.access(getAccessForApplicationListItems(applicationResponseModel.getName()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,15 @@ public ApplicationResponseModel apply(ServiceProvider application) {
.id(application.getApplicationResourceId())
.name(application.getApplicationName())
.description(application.getDescription())
.applicationVersion(application.getApplicationVersion())
.provisioningConfigurations(buildProvisioningConfiguration(application))
.access(ApplicationResponseModel.AccessEnum.READ);
} else {
return new ApplicationResponseModel()
.id(application.getApplicationResourceId())
.name(application.getApplicationName())
.description(application.getDescription())
.applicationVersion(application.getApplicationVersion())
.imageUrl(application.getImageUrl())
.accessUrl(application.getAccessUrl())
.logoutReturnUrl(getLogoutReturnUrl(application))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public void apply(ServiceProvider serviceProvider, ApplicationPatchModel applica

setIfNotNull(applicationPatchModel.getName(), serviceProvider::setApplicationName);
setIfNotNull(applicationPatchModel.getDescription(), serviceProvider::setDescription);
setIfNotNull(applicationPatchModel.getApplicationVersion(), serviceProvider::setApplicationVersion);
setIfNotNull(applicationPatchModel.getImageUrl(), serviceProvider::setImageUrl);
setIfNotNull(applicationPatchModel.getAccessUrl(), serviceProvider::setAccessUrl);
setIfNotNull(applicationPatchModel.getTemplateId(), serviceProvider::setTemplateId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2801,6 +2801,9 @@ components:
description:
type: string
example: Application representing user portal
applicationVersion:
type: string
example: "v1.0.0"
image:
type: string
example: 'https://example.com/logo/my-logo.png'
Expand Down Expand Up @@ -2913,6 +2916,9 @@ components:
description:
type: string
example: This is the configuration for Pickup application.
applicationVersion:
type: string
example: "v1.0.0"
imageUrl:
type: string
example: 'https://example.com/logo/my-logo.png'
Expand Down Expand Up @@ -2978,6 +2984,9 @@ components:
description:
type: string
example: This is the configuration for Pickup application.
applicationVersion:
type: string
example: "v1.0.0"
imageUrl:
type: string
example: 'https://example.com/logo/my-logo.png'
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -803,12 +803,12 @@
<maven.buildnumber.plugin.version>1.4</maven.buildnumber.plugin.version>
<org.apache.felix.annotations.version>1.2.4</org.apache.felix.annotations.version>
<identity.governance.version>1.10.6</identity.governance.version>
<carbon.identity.framework.version>7.5.0</carbon.identity.framework.version>
<carbon.identity.framework.version>7.5.46</carbon.identity.framework.version>
<maven.findbugsplugin.version>3.0.5</maven.findbugsplugin.version>
<findsecbugs-plugin.version>1.12.0</findsecbugs-plugin.version>
<maven.checkstyleplugin.excludes>**/gen/**/*</maven.checkstyleplugin.excludes>
<identity.event.handler.version>1.8.19</identity.event.handler.version>
<identity.inbound.oauth2.version>7.0.154</identity.inbound.oauth2.version>
<identity.inbound.oauth2.version>7.0.162</identity.inbound.oauth2.version>
<identity.inbound.saml2.version>5.11.41</identity.inbound.saml2.version>
<commons.beanutils.version>1.9.4</commons.beanutils.version>
<mavan.findbugsplugin.exclude.file>findbugs-exclude-filter.xml</mavan.findbugsplugin.exclude.file>
Expand Down
Loading