question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support JSON-B @JsonbProperty in generated documentation

See original GitHub issue
Q A
Bug or feature request? feature request
Which Swagger-Core version? 2.0.0
Which Java version? Java 8
Which JAX-RS framework & version? 2.0

The JSON-B annotation javax.json.bind.annotation.JsonbProperty can be used to set a different property name for a JSON property much like the jackson annotation com.fasterxml.jackson.annotation.JsonProperty can.

@javax.json.bind.annotation.JsonbProperty(value = "_name1")
private String name1;

@com.fasterxml.jackson.annotation.JsonProperty (value = "_name2")
private String name2;

When using the jackson annotation the name is automatically used in the generated swagger documentation.

The generated documentation should also reflect the property name set with the JSON-B annotation.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

1reaction
rallampallicommented, May 12, 2021

I am using swagger plugin to generate classes from api spec (yaml) file. The generated model classes contains Jackson annotations. I would like to have JSON-B annotations instead of Jackson annotations. How this can be achieved?

0reactions
l-raycommented, Aug 29, 2021

+1 for Swagger to read @JsonbProperty

Read more comments on GitHub >

github_iconTop Results From Across the Web

Json Binding 1.0 Users Guide - Java EE
JSON -B supports collections and generic collections handling. ... The same JSON document will be produced if @JsonbProperty annotation is ...
Read more >
Custom binding with JSON-B - IBM Developer
Learn how to use and combine annotations and runtime configuration to control the binding and appearance of properties, fields, ...
Read more >
Jakarta JSON Binding
Support binding (serialization and deserialization) for all RFC 7159-compatible JSON documents. Relationships to JSON Related specifications
Read more >
JSON-P and JSON-B :: Open Liberty Docs
JSON supports two standard data structures: objects and arrays. ... They are relatively expensive to create private static final Jsonb jsonb ...
Read more >
9.5: JSON Functions and Operators - PostgreSQL
This documentation is for an unsupported version of PostgreSQL. ... operators that accept integer JSON array subscripts all support negative subscripting ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found