Skip to content

Commit

Permalink
Use schema int for date consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Oct 9, 2024
1 parent b5a98a7 commit 05301bc
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package myconext.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
Expand All @@ -20,6 +21,7 @@ public class ChangeEmailHash implements Serializable {

private String hash;

@Schema(type = "integer", format = "int64", example = "1634813554997")
private Date expiresIn;

private String userId;
Expand Down
3 changes: 2 additions & 1 deletion myconext-server/src/main/java/myconext/model/EmailsSend.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package myconext.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
Expand All @@ -19,6 +19,7 @@ public class EmailsSend implements Serializable {

private String email;

@Schema(type = "integer", format = "int64", example = "1634813554997")
private Date sendAt;

public EmailsSend(String email) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package myconext.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
Expand All @@ -9,7 +10,6 @@
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.Map;

@NoArgsConstructor
@Getter
Expand All @@ -23,6 +23,7 @@ public class MobileLinkAccountRequest implements Serializable {

private String userId;

@Schema(type = "integer", format = "int64", example = "1634813554997")
private Date expiresIn;

public MobileLinkAccountRequest(String hash, String userId) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package myconext.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
Expand All @@ -21,6 +22,7 @@ public class PasswordResetHash implements Serializable {

private String hash;

@Schema(type = "integer", format = "int64", example = "1634813554997")
private Date expiresIn;

private String userId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package myconext.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
Expand All @@ -25,6 +26,7 @@ public class RequestInstitutionEduID implements Serializable {
@Setter
private String emailHash;

@Schema(type = "integer", format = "int64", example = "1634813554997")
private Date expiresIn;

private Map<String, Object> userInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package myconext.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
Expand Down Expand Up @@ -35,6 +36,7 @@ public class SamlAuthenticationRequest implements Serializable {
@Indexed
private String hash;

@Schema(type = "integer", format = "int64", example = "1634813554997")
private Date expiresIn;

private String userId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package myconext.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import myconext.manage.Manage;
import myconext.tiqr.SURFSecureID;
Expand All @@ -20,6 +21,7 @@ public class UserResponse implements Serializable {
private final String chosenName;
private final String familyName;
private final String givenName;
@Schema(type = "integer", format = "int64", example = "1634813554997")
private final Date dateOfBirth;
private final boolean givenNameVerified;
private final String displayName;
Expand Down

0 comments on commit 05301bc

Please sign in to comment.