Skip to content

Commit a6f7f2a

Browse files
authored
Merge pull request #628 from OpenConext/feature/swagger_description_rolerequest
Add descriptions to RoleRequest for swagger ui
2 parents db927fe + 9cb350b commit a6f7f2a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

server/src/main/java/invite/model/RoleRequest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.fasterxml.jackson.annotation.JsonIgnore;
44
import invite.provision.scim.GroupURN;
5+
import io.swagger.v3.oas.annotations.media.Schema;
56
import jakarta.persistence.*;
67
import jakarta.validation.constraints.NotBlank;
78
import jakarta.validation.constraints.NotNull;
@@ -24,22 +25,31 @@ public class RoleRequest implements Serializable{
2425

2526
@NotNull
2627
@NotBlank
28+
@Schema(description = "Unique name of the role", example = "Guest for my application", required = true)
2729
private String name;
2830

31+
@Schema(description = "Brief explanation of this role's purpose", example = "Full access to all modules")
2932
private String description;
3033

34+
@Schema(description = "Number of days until the memberschip automaticly expires. Use either defaultExpiryDays or defaultExpiryDate", example = "365")
3135
private Integer defaultExpiryDays;
3236

37+
@Schema(description = "Specific timestamp end date for this role membership. Use either defaultExpiryDays or defaultExpiryDate", example = "2026-12-31T23:59:59Z")
3338
private Instant defaultExpiryDate;
3439

40+
@Schema(description = "If true, the user's email must match the invitation email", defaultValue = "false")
3541
private boolean enforceEmailEquality;
3642

43+
@Schema(description = "The invite can only be accepted by an eduID account", defaultValue = "false")
3744
private boolean eduIDOnly;
3845

46+
@Schema(description = "Allow changing the settings when sending an invite.", defaultValue = "false")
3947
private boolean overrideSettingsAllowed;
4048

49+
@Schema(description = "The unique identifier of the associated organization, only to be used bu SUPER-admins and internal API's", example = "550e8400-e29b-41d4-a716-446655440000")
4150
private String organizationGUID;
4251

52+
@Schema(description = "The email address used", example = "550e8400-e29b-41d4-a716-446655440000")
4353
private String inviterDisplayName;
4454

4555
private Set<ApplicationUsage> applicationUsages = new HashSet<>();

0 commit comments

Comments
 (0)