Skip to content

Commit

Permalink
[120] Clarification of JSON-B vs MP annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
andymc12 committed Dec 2, 2019
1 parent bc9fc93 commit 42499da
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion spec/src/main/asciidoc/jsonb.asciidoc
Expand Up @@ -146,4 +146,12 @@ A query that requests a Widget's construction date would get a result like this:
The date format string specified in the `@JsonbDateFormat` annotation will be used as the field's description in the
schema, if no `@Description` annotation is provided for that field. If the same field (or property) contains both
`@JsonbDateFormat` and `@Description` annotations, it should be considered a best practice to document the date format
in the description text so that the format is communicated to clients in the schema.
in the description text so that the format is communicated to clients in the schema.

=== JSON-B Annotations vs MP GraphQL Annotations

The `@JsonbProperty` annotation can be used interchangeably with `@Name`. If both annotations are used on the same
member, the `@Name` annotation will take precendence when determining the field name in the schema and the JSON property
in the response.

Likewise, `@JsonbTransient` can be used interchangeably with `@Ignore`.

0 comments on commit 42499da

Please sign in to comment.