Skip to content

Commit a1dad19

Browse files
authored
Ensure correct Input json property order (#93)
Default order is JDK-dependent, see https://www.tedblob.com/jackson-serialization-order/
1 parent 760b6f3 commit a1dad19

File tree

1 file changed

+2
-0
lines changed
  • belgif-rest-problem/src/main/java/io/github/belgif/rest/problem/api

1 file changed

+2
-0
lines changed

belgif-rest-problem/src/main/java/io/github/belgif/rest/problem/api/Input.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.util.Objects;
44

55
import com.fasterxml.jackson.annotation.JsonInclude;
6+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
67

78
/**
89
* Input model for {@link InputValidationIssue#getInputs()}.
@@ -19,6 +20,7 @@
1920
*
2021
* @param <V> the input value type
2122
*/
23+
@JsonPropertyOrder({ "in", "name", "value" })
2224
public class Input<V> {
2325

2426
private InEnum in;

0 commit comments

Comments
 (0)