Commit e09566039169bd1d9e70052fd2e6e609abb630e0
1 parent
f85d84b0
Raml with java.util.Date
Showing
6 changed files
with
148 additions
and
24 deletions
Show diff stats
api.raml
@@ -115,8 +115,9 @@ version: v1 | @@ -115,8 +115,9 @@ version: v1 | ||
115 | "maxLength": 14 | 115 | "maxLength": 14 |
116 | }, | 116 | }, |
117 | "naissance": { | 117 | "naissance": { |
118 | - "type": "date", | ||
119 | - "required": false | 118 | + "type": "string", |
119 | + "required": false, | ||
120 | + "format": "date" | ||
120 | }, | 121 | }, |
121 | "login": { | 122 | "login": { |
122 | "type": "string", | 123 | "type": "string", |
@@ -158,8 +159,9 @@ version: v1 | @@ -158,8 +159,9 @@ version: v1 | ||
158 | "maxLength": 14 | 159 | "maxLength": 14 |
159 | }, | 160 | }, |
160 | "naissance": { | 161 | "naissance": { |
161 | - "type": "date", | ||
162 | - "required": false | 162 | + "type": "string", |
163 | + "required": false, | ||
164 | + "format": "date" | ||
163 | }, | 165 | }, |
164 | "login": { | 166 | "login": { |
165 | "type": "string", | 167 | "type": "string", |
@@ -335,8 +337,9 @@ version: v1 | @@ -335,8 +337,9 @@ version: v1 | ||
335 | "required": true | 337 | "required": true |
336 | }, | 338 | }, |
337 | "date": { | 339 | "date": { |
338 | - "type": "date", | ||
339 | - "required": true | 340 | + "type": "string", |
341 | + "required": true, | ||
342 | + "format": "date" | ||
340 | } | 343 | } |
341 | } | 344 | } |
342 | } | 345 | } |
@@ -370,8 +373,9 @@ version: v1 | @@ -370,8 +373,9 @@ version: v1 | ||
370 | "required": false | 373 | "required": false |
371 | }, | 374 | }, |
372 | "date": { | 375 | "date": { |
373 | - "type": "date", | ||
374 | - "required": false | 376 | + "type": "string", |
377 | + "required": false, | ||
378 | + "format": "date" | ||
375 | } | 379 | } |
376 | } | 380 | } |
377 | } | 381 | } |
src/main/java/etunicorn/generated/TransactionController.java
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | package etunicorn.generated; | 2 | package etunicorn.generated; |
3 | 3 | ||
4 | import etunicorn.generated.model.UpdateConsommationRequest; | 4 | import etunicorn.generated.model.UpdateConsommationRequest; |
5 | -import etunicorn.generated.model.UpdateEvenementCreditRequest; | 5 | +import etunicorn.generated.model.UpdateCreditRequest; |
6 | import etunicorn.generated.model.UpdateEvenementRequest; | 6 | import etunicorn.generated.model.UpdateEvenementRequest; |
7 | import org.springframework.http.ResponseEntity; | 7 | import org.springframework.http.ResponseEntity; |
8 | import org.springframework.web.bind.annotation.PathVariable; | 8 | import org.springframework.web.bind.annotation.PathVariable; |
@@ -52,11 +52,11 @@ public interface TransactionController { | @@ -52,11 +52,11 @@ public interface TransactionController { | ||
52 | * Permet de recharger ou debiter un compte | 52 | * Permet de recharger ou debiter un compte |
53 | * | 53 | * |
54 | */ | 54 | */ |
55 | - @RequestMapping(value = "/evenement/credit", method = RequestMethod.POST) | ||
56 | - public ResponseEntity<?> updateEvenementCredit( | 55 | + @RequestMapping(value = "/credit", method = RequestMethod.POST) |
56 | + public ResponseEntity<?> updateCredit( | ||
57 | @javax.validation.Valid | 57 | @javax.validation.Valid |
58 | @org.springframework.web.bind.annotation.RequestBody | 58 | @org.springframework.web.bind.annotation.RequestBody |
59 | - UpdateEvenementCreditRequest updateEvenementCreditRequest); | 59 | + UpdateCreditRequest updateCreditRequest); |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Permet de recuperer la liste des transaction d'une personne | 62 | * Permet de recuperer la liste des transaction d'une personne |
src/main/java/etunicorn/generated/model/UpdateCreditRequest.java
0 → 100644
@@ -0,0 +1,120 @@ | @@ -0,0 +1,120 @@ | ||
1 | + | ||
2 | +package etunicorn.generated.model; | ||
3 | + | ||
4 | +import java.util.HashMap; | ||
5 | +import java.util.Map; | ||
6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
8 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
9 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
10 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
11 | +import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
12 | +import org.apache.commons.lang.builder.EqualsBuilder; | ||
13 | +import org.apache.commons.lang.builder.HashCodeBuilder; | ||
14 | +import org.apache.commons.lang.builder.ToStringBuilder; | ||
15 | + | ||
16 | +@JsonInclude(JsonInclude.Include.NON_NULL) | ||
17 | +@JsonPropertyOrder({ | ||
18 | + "participant", | ||
19 | + "prix" | ||
20 | +}) | ||
21 | +public class UpdateCreditRequest { | ||
22 | + | ||
23 | + /** | ||
24 | + * | ||
25 | + * (Required) | ||
26 | + * | ||
27 | + */ | ||
28 | + @JsonProperty("participant") | ||
29 | + private Object participant; | ||
30 | + /** | ||
31 | + * | ||
32 | + * (Required) | ||
33 | + * | ||
34 | + */ | ||
35 | + @JsonProperty("prix") | ||
36 | + private Float prix; | ||
37 | + @JsonIgnore | ||
38 | + private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | ||
39 | + | ||
40 | + /** | ||
41 | + * | ||
42 | + * (Required) | ||
43 | + * | ||
44 | + * @return | ||
45 | + * The participant | ||
46 | + */ | ||
47 | + @JsonProperty("participant") | ||
48 | + public Object getParticipant() { | ||
49 | + return participant; | ||
50 | + } | ||
51 | + | ||
52 | + /** | ||
53 | + * | ||
54 | + * (Required) | ||
55 | + * | ||
56 | + * @param participant | ||
57 | + * The participant | ||
58 | + */ | ||
59 | + @JsonProperty("participant") | ||
60 | + public void setParticipant(Object participant) { | ||
61 | + this.participant = participant; | ||
62 | + } | ||
63 | + | ||
64 | + /** | ||
65 | + * | ||
66 | + * (Required) | ||
67 | + * | ||
68 | + * @return | ||
69 | + * The prix | ||
70 | + */ | ||
71 | + @JsonProperty("prix") | ||
72 | + public Float getPrix() { | ||
73 | + return prix; | ||
74 | + } | ||
75 | + | ||
76 | + /** | ||
77 | + * | ||
78 | + * (Required) | ||
79 | + * | ||
80 | + * @param prix | ||
81 | + * The prix | ||
82 | + */ | ||
83 | + @JsonProperty("prix") | ||
84 | + public void setPrix(Float prix) { | ||
85 | + this.prix = prix; | ||
86 | + } | ||
87 | + | ||
88 | + @Override | ||
89 | + public String toString() { | ||
90 | + return ToStringBuilder.reflectionToString(this); | ||
91 | + } | ||
92 | + | ||
93 | + @JsonAnyGetter | ||
94 | + public Map<String, Object> getAdditionalProperties() { | ||
95 | + return this.additionalProperties; | ||
96 | + } | ||
97 | + | ||
98 | + @JsonAnySetter | ||
99 | + public void setAdditionalProperty(String name, Object value) { | ||
100 | + this.additionalProperties.put(name, value); | ||
101 | + } | ||
102 | + | ||
103 | + @Override | ||
104 | + public int hashCode() { | ||
105 | + return new HashCodeBuilder().append(participant).append(prix).append(additionalProperties).toHashCode(); | ||
106 | + } | ||
107 | + | ||
108 | + @Override | ||
109 | + public boolean equals(Object other) { | ||
110 | + if (other == this) { | ||
111 | + return true; | ||
112 | + } | ||
113 | + if ((other instanceof UpdateCreditRequest) == false) { | ||
114 | + return false; | ||
115 | + } | ||
116 | + UpdateCreditRequest rhs = ((UpdateCreditRequest) other); | ||
117 | + return new EqualsBuilder().append(participant, rhs.participant).append(prix, rhs.prix).append(additionalProperties, rhs.additionalProperties).isEquals(); | ||
118 | + } | ||
119 | + | ||
120 | +} |
src/main/java/etunicorn/generated/model/UpdateEvenementByIdRequest.java
@@ -35,7 +35,7 @@ public class UpdateEvenementByIdRequest { | @@ -35,7 +35,7 @@ public class UpdateEvenementByIdRequest { | ||
35 | * | 35 | * |
36 | */ | 36 | */ |
37 | @JsonProperty("date") | 37 | @JsonProperty("date") |
38 | - private Object date; | 38 | + private String date; |
39 | @JsonIgnore | 39 | @JsonIgnore |
40 | private Map<String, Object> additionalProperties = new HashMap<String, Object>(); | 40 | private Map<String, Object> additionalProperties = new HashMap<String, Object>(); |
41 | 41 | ||
@@ -85,7 +85,7 @@ public class UpdateEvenementByIdRequest { | @@ -85,7 +85,7 @@ public class UpdateEvenementByIdRequest { | ||
85 | * The date | 85 | * The date |
86 | */ | 86 | */ |
87 | @JsonProperty("date") | 87 | @JsonProperty("date") |
88 | - public Object getDate() { | 88 | + public String getDate() { |
89 | return date; | 89 | return date; |
90 | } | 90 | } |
91 | 91 | ||
@@ -95,7 +95,7 @@ public class UpdateEvenementByIdRequest { | @@ -95,7 +95,7 @@ public class UpdateEvenementByIdRequest { | ||
95 | * The date | 95 | * The date |
96 | */ | 96 | */ |
97 | @JsonProperty("date") | 97 | @JsonProperty("date") |
98 | - public void setDate(Object date) { | 98 | + public void setDate(String date) { |
99 | this.date = date; | 99 | this.date = date; |
100 | } | 100 | } |
101 | 101 |
src/main/java/etunicorn/generated/model/UpdatePersonneByIdRequest.java
@@ -31,7 +31,7 @@ public class UpdatePersonneByIdRequest { | @@ -31,7 +31,7 @@ public class UpdatePersonneByIdRequest { | ||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | @JsonProperty("naissance") | 33 | @JsonProperty("naissance") |
34 | - private Object naissance; | 34 | + private String naissance; |
35 | /** | 35 | /** |
36 | * | 36 | * |
37 | */ | 37 | */ |
@@ -71,7 +71,7 @@ public class UpdatePersonneByIdRequest { | @@ -71,7 +71,7 @@ public class UpdatePersonneByIdRequest { | ||
71 | * The naissance | 71 | * The naissance |
72 | */ | 72 | */ |
73 | @JsonProperty("naissance") | 73 | @JsonProperty("naissance") |
74 | - public Object getNaissance() { | 74 | + public String getNaissance() { |
75 | return naissance; | 75 | return naissance; |
76 | } | 76 | } |
77 | 77 | ||
@@ -81,7 +81,7 @@ public class UpdatePersonneByIdRequest { | @@ -81,7 +81,7 @@ public class UpdatePersonneByIdRequest { | ||
81 | * The naissance | 81 | * The naissance |
82 | */ | 82 | */ |
83 | @JsonProperty("naissance") | 83 | @JsonProperty("naissance") |
84 | - public void setNaissance(Object naissance) { | 84 | + public void setNaissance(String naissance) { |
85 | this.naissance = naissance; | 85 | this.naissance = naissance; |
86 | } | 86 | } |
87 | 87 |
src/main/java/etunicorn/generated/model/UpdatePersonneRequest.java
@@ -31,12 +31,12 @@ public class UpdatePersonneRequest { | @@ -31,12 +31,12 @@ public class UpdatePersonneRequest { | ||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | @JsonProperty("naissance") | 33 | @JsonProperty("naissance") |
34 | - private Object naissance; | 34 | + private String naissance; |
35 | /** | 35 | /** |
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | @JsonProperty("login") | 38 | @JsonProperty("login") |
39 | - private Object login; | 39 | + private String login; |
40 | /** | 40 | /** |
41 | * | 41 | * |
42 | */ | 42 | */ |
@@ -71,7 +71,7 @@ public class UpdatePersonneRequest { | @@ -71,7 +71,7 @@ public class UpdatePersonneRequest { | ||
71 | * The naissance | 71 | * The naissance |
72 | */ | 72 | */ |
73 | @JsonProperty("naissance") | 73 | @JsonProperty("naissance") |
74 | - public Object getNaissance() { | 74 | + public String getNaissance() { |
75 | return naissance; | 75 | return naissance; |
76 | } | 76 | } |
77 | 77 | ||
@@ -81,7 +81,7 @@ public class UpdatePersonneRequest { | @@ -81,7 +81,7 @@ public class UpdatePersonneRequest { | ||
81 | * The naissance | 81 | * The naissance |
82 | */ | 82 | */ |
83 | @JsonProperty("naissance") | 83 | @JsonProperty("naissance") |
84 | - public void setNaissance(Object naissance) { | 84 | + public void setNaissance(String naissance) { |
85 | this.naissance = naissance; | 85 | this.naissance = naissance; |
86 | } | 86 | } |
87 | 87 | ||
@@ -91,7 +91,7 @@ public class UpdatePersonneRequest { | @@ -91,7 +91,7 @@ public class UpdatePersonneRequest { | ||
91 | * The login | 91 | * The login |
92 | */ | 92 | */ |
93 | @JsonProperty("login") | 93 | @JsonProperty("login") |
94 | - public Object getLogin() { | 94 | + public String getLogin() { |
95 | return login; | 95 | return login; |
96 | } | 96 | } |
97 | 97 | ||
@@ -101,7 +101,7 @@ public class UpdatePersonneRequest { | @@ -101,7 +101,7 @@ public class UpdatePersonneRequest { | ||
101 | * The login | 101 | * The login |
102 | */ | 102 | */ |
103 | @JsonProperty("login") | 103 | @JsonProperty("login") |
104 | - public void setLogin(Object login) { | 104 | + public void setLogin(String login) { |
105 | this.login = login; | 105 | this.login = login; |
106 | } | 106 | } |
107 | 107 |