Skip to content

Commit

Permalink
Update api for consistency with docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
malithie committed Jan 16, 2025
1 parent d73362b commit dcea2df
Show file tree
Hide file tree
Showing 17 changed files with 372 additions and 207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
import javax.validation.constraints.*;

/**
* Expressions combined with AND condition.
* A sub-rule that combines expressions with AND condition.
**/

import io.swagger.annotations.*;
import java.util.Objects;
import javax.validation.Valid;
import javax.xml.bind.annotation.*;
@ApiModel(description = "Expressions combined with AND condition.")
@ApiModel(description = "A sub-rule that combines expressions with AND condition.")
public class ANDRule {


Expand Down Expand Up @@ -76,14 +76,15 @@ public static ConditionEnum fromValue(String value) {


/**
* The logical condition for combining the expressions. For ANDRule, the value must always be \"AND\".
**/
public ANDRule condition(ConditionEnum condition) {

this.condition = condition;
return this;
}

@ApiModelProperty(required = true, value = "")
@ApiModelProperty(required = true, value = "The logical condition for combining the expressions. For ANDRule, the value must always be \"AND\".")
@JsonProperty("condition")
@Valid
@NotNull(message = "Property condition cannot be null.")
Expand All @@ -96,18 +97,19 @@ public void setCondition(ConditionEnum condition) {
}

/**
* A list of expressions that are combined using the AND condition. All expressions must evaluate to true for the ANDRule to pass.
**/
public ANDRule expressions(List<Expression> expressions) {

this.expressions = expressions;
return this;
}

@ApiModelProperty(required = true, value = "")
@ApiModelProperty(required = true, value = "A list of expressions that are combined using the AND condition. All expressions must evaluate to true for the ANDRule to pass.")
@JsonProperty("expressions")
@Valid
@NotNull(message = "Property expressions cannot be null.")
@Size(min=1)
@Size(min=1)
public List<Expression> getExpressions() {
return expressions;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
import javax.validation.constraints.*;

/**
* Expressions combined with AND condition.
* Represents a rule configuration that combines multiple expressions with an AND condition. All expressions in the ANDRule must evaluate to true for the rule to be satisfied.
**/

import io.swagger.annotations.*;
import java.util.Objects;
import javax.validation.Valid;
import javax.xml.bind.annotation.*;
@ApiModel(description = "Expressions combined with AND condition.")
@ApiModel(description = "Represents a rule configuration that combines multiple expressions with an AND condition. All expressions in the ANDRule must evaluate to true for the rule to be satisfied.")
public class ANDRuleResponse {


Expand Down Expand Up @@ -76,14 +76,15 @@ public static ConditionEnum fromValue(String value) {


/**
* The logical condition for combining the expressions. For ANDRule, the value must always be \&quot;AND\&quot;.
**/
public ANDRuleResponse condition(ConditionEnum condition) {

this.condition = condition;
return this;
}

@ApiModelProperty(value = "")
@ApiModelProperty(value = "The logical condition for combining the expressions. For ANDRule, the value must always be \"AND\".")
@JsonProperty("condition")
@Valid
public ConditionEnum getCondition() {
Expand All @@ -94,14 +95,15 @@ public void setCondition(ConditionEnum condition) {
}

/**
* A list of expressions that are combined using the AND condition. All expressions must evaluate to true for the ANDRule to pass.
**/
public ANDRuleResponse expressions(List<ExpressionResponse> expressions) {

this.expressions = expressions;
return this;
}

@ApiModelProperty(value = "")
@ApiModelProperty(value = "A list of expressions that are combined using the AND condition. All expressions must evaluate to true for the ANDRule to pass.")
@JsonProperty("expressions")
@Valid @Size(min=1)
public List<ExpressionResponse> getExpressions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,15 @@ public static StatusEnum fromValue(String value) {


/**
* Unique identifier of the action.
**/
public ActionBasicResponse id(String id) {

this.id = id;
return this;
}

@ApiModelProperty(example = "24f64d17-9824-4e28-8413-de45728d8e84", value = "")
@ApiModelProperty(example = "24f64d17-9824-4e28-8413-de45728d8e84", value = "Unique identifier of the action.")
@JsonProperty("id")
@Valid
public String getId() {
Expand Down Expand Up @@ -114,14 +115,15 @@ public void setType(ActionType type) {
}

/**
* Name of the action.
**/
public ActionBasicResponse name(String name) {

this.name = name;
return this;
}

@ApiModelProperty(example = "Access Token Pre Issue", value = "")
@ApiModelProperty(example = "Access Token Pre Issue", value = "Name of the action.")
@JsonProperty("name")
@Valid @Size(min=1,max=255)
public String getName() {
Expand All @@ -132,14 +134,15 @@ public void setName(String name) {
}

/**
* Description of the action.
**/
public ActionBasicResponse description(String description) {

this.description = description;
return this;
}

@ApiModelProperty(example = "This is the configuration of pre-action for issuing access token.", value = "")
@ApiModelProperty(example = "This action invokes before issuing an access token.", value = "Description of the action.")
@JsonProperty("description")
@Valid @Size(max=255)
public String getDescription() {
Expand All @@ -150,14 +153,15 @@ public void setDescription(String description) {
}

/**
* Status of the action.
**/
public ActionBasicResponse status(StatusEnum status) {

this.status = status;
return this;
}

@ApiModelProperty(value = "")
@ApiModelProperty(value = "Status of the action.")
@JsonProperty("status")
@Valid
public StatusEnum getStatus() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ public class ActionModel {
private ORRule rule;

/**
* Name of the action.
**/
public ActionModel name(String name) {

this.name = name;
return this;
}

@ApiModelProperty(example = "Access Token Pre Issue", required = true, value = "")
@ApiModelProperty(example = "Pre Issue Access Token Action", required = true, value = "Name of the action.")
@JsonProperty("name")
@Valid
@NotNull(message = "Property name cannot be null.")
Expand All @@ -60,14 +61,15 @@ public void setName(String name) {
}

/**
* Description of the action.
**/
public ActionModel description(String description) {

this.description = description;
return this;
}

@ApiModelProperty(example = "This is the configuration of pre-action for issuing access token.", value = "")
@ApiModelProperty(example = "This action invokes before issuing an access token.", value = "Description of the action.")
@JsonProperty("description")
@Valid @Size(max=255)
public String getDescription() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@ public static StatusEnum fromValue(String value) {
private ORRuleResponse rule;

/**
* Unique identifier of the action.
**/
public ActionResponse id(String id) {

this.id = id;
return this;
}

@ApiModelProperty(example = "24f64d17-9824-4e28-8413-de45728d8e84", value = "")
@ApiModelProperty(example = "24f64d17-9824-4e28-8413-de45728d8e84", value = "Unique identifier of the action.")
@JsonProperty("id")
@Valid
public String getId() {
Expand Down Expand Up @@ -113,14 +114,15 @@ public void setType(ActionType type) {
}

/**
* Name of the action.
**/
public ActionResponse name(String name) {

this.name = name;
return this;
}

@ApiModelProperty(example = "Access Token Pre Issue", value = "")
@ApiModelProperty(example = "Access Token Pre Issue", value = "Name of the action.")
@JsonProperty("name")
@Valid @Size(min=1,max=255)
public String getName() {
Expand All @@ -131,14 +133,15 @@ public void setName(String name) {
}

/**
* Description of the action.
**/
public ActionResponse description(String description) {

this.description = description;
return this;
}

@ApiModelProperty(example = "This is the configuration of pre-action for issuing access token.", value = "")
@ApiModelProperty(example = "This action invokes before issuing an access token.", value = "Description of the action.")
@JsonProperty("description")
@Valid @Size(max=255)
public String getDescription() {
Expand All @@ -149,14 +152,15 @@ public void setDescription(String description) {
}

/**
* Status of the action.
**/
public ActionResponse status(StatusEnum status) {

this.status = status;
return this;
}

@ApiModelProperty(value = "")
@ApiModelProperty(example = "ACTIVE", value = "Status of the action.")
@JsonProperty("status")
@Valid
public StatusEnum getStatus() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ public void setType(ActionType type) {
}

/**
* Display name of the action type.
**/
public ActionTypesResponseItem displayName(String displayName) {

this.displayName = displayName;
return this;
}

@ApiModelProperty(example = "Pre Issue Access Token.", value = "")
@ApiModelProperty(example = "Pre Issue Access Token.", value = "Display name of the action type.")
@JsonProperty("displayName")
@Valid
public String getDisplayName() {
Expand All @@ -76,14 +77,15 @@ public void setDisplayName(String displayName) {
}

/**
* Description of the action type.
**/
public ActionTypesResponseItem description(String description) {

this.description = description;
return this;
}

@ApiModelProperty(example = "Extension point configuration for Pre Issue Access Token.", value = "")
@ApiModelProperty(example = "Extension point configuration for Pre Issue Access Token.", value = "Description of the action type.")
@JsonProperty("description")
@Valid
public String getDescription() {
Expand All @@ -94,14 +96,15 @@ public void setDescription(String description) {
}

/**
* Number of actions configured under the action type.
**/
public ActionTypesResponseItem count(Integer count) {

this.count = count;
return this;
}

@ApiModelProperty(example = "2", value = "")
@ApiModelProperty(example = "1", value = "Number of actions configured under the action type.")
@JsonProperty("count")
@Valid
public Integer getCount() {
Expand All @@ -112,14 +115,15 @@ public void setCount(Integer count) {
}

/**
* API endpoint referring to the location of the given action type.
**/
public ActionTypesResponseItem self(String self) {

this.self = self;
return this;
}

@ApiModelProperty(example = "/t/wso2.com/api/server/v1/actions/preIssueAccessToken", value = "")
@ApiModelProperty(example = "/t/wso2.com/api/server/v1/actions/preIssueAccessToken", value = "API endpoint referring to the location of the given action type.")
@JsonProperty("self")
@Valid
public String getSelf() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ public class ActionUpdateModel {
private ORRule rule;

/**
* Updating name of the action.
**/
public ActionUpdateModel name(String name) {

this.name = name;
return this;
}

@ApiModelProperty(example = "Access Token Pre Issue", value = "")
@ApiModelProperty(example = "Pre Issue Access Token Action", value = "Updating name of the action.")
@JsonProperty("name")
@Valid @Size(min=1,max=255)
public String getName() {
Expand All @@ -58,14 +59,15 @@ public void setName(String name) {
}

/**
* Updating description of the action.
**/
public ActionUpdateModel description(String description) {

this.description = description;
return this;
}

@ApiModelProperty(example = "This is the configuration of pre-action for issuing access token.", value = "")
@ApiModelProperty(example = "This action invokes before issuing an access token.", value = "Updating description of the action.")
@JsonProperty("description")
@Valid @Size(max=255)
public String getDescription() {
Expand Down
Loading

0 comments on commit dcea2df

Please sign in to comment.