Skip to content

Commit

Permalink
#665 - Make sure Alps API stays compatible.
Browse files Browse the repository at this point in the history
Tweaked the changes made to Alps and Descriptor builders so that they only affect the representation rendered by Jackson, not the actual API.
  • Loading branch information
odrotbohm committed Jun 20, 2018
1 parent 6c0197c commit 1618103
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/springframework/hateoas/alps/Alps.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.springframework.hateoas.alps.Doc.DocBuilder;
import org.springframework.hateoas.alps.Ext.ExtBuilder;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
Expand All @@ -37,12 +38,12 @@
*/
@Value
@Builder(builderMethodName = "alps")
@JsonPropertyOrder({"version", "doc", "descriptor"})
@JsonPropertyOrder({ "version", "doc", "descriptor" })
public class Alps {

private final String version = "1.0";
private final Doc doc;
private final List<Descriptor> descriptor;
private final @JsonProperty("descriptor") List<Descriptor> descriptors;

/**
* Returns a new {@link DescriptorBuilder}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
Expand All @@ -32,13 +33,13 @@
*/
@Value
@Builder
@JsonPropertyOrder({"id", "href", "name", "type", "doc", "descriptor", "ext"})
@JsonPropertyOrder({ "id", "href", "name", "type", "doc", "descriptor", "ext" })
public class Descriptor {

private final String id, href, name;
private final Doc doc;
private final Type type;
private final Ext ext;
private final String rt;
private final List<Descriptor> descriptor;
private final @JsonProperty("descriptor") List<Descriptor> descriptors;
}

0 comments on commit 1618103

Please sign in to comment.