Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@JsonRootName is ignored in playground #214

Open
osigge opened this issue Dec 16, 2016 · 0 comments
Open

@JsonRootName is ignored in playground #214

osigge opened this issue Dec 16, 2016 · 0 comments

Comments

@osigge
Copy link
Contributor

osigge commented Dec 16, 2016

I use @JsonRootName throughout my application. Jsondoc does not consider the annotation in playground. So the displayed payload is wrong.
Example:

@Data
@EqualsAndHashCode(of = {"id"}, callSuper = false)
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonRootName("data")
@ApiObject(group = Groups.OFFER)
public class Offer extends JsonApi {

    @Id
    @ApiObjectField(required = true, description = "The offer identifier.")
    private String id;

}

I expect the payload to be something like this:

{
  "data" : {
    "id" : "my-id"
  }
}

when it actually is:

{
  "id" : "my-id"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant