0

I want to generate Java POJO class with @JsonUnwrapped by using jsonschema2pojo-maven-plugin,

I tried with below jsonSchema but its not generating @JsonUnwrapped annotation

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "profile": {
      "javaJsonUnwrapped" : true,
      "$ref": "Profile"
    }
  "title": "Inbound"
}

{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": [
        {
          "type": "string"
        }
      ]
    },
  "title": "Profile"
}

Any help is appreciated.

Digital
  • 549
  • 1
  • 7
  • 26
  • You can use custom annotator See [enter link description here](https://stackoverflow.com/questions/48404800/json-to-pojo-with-custom-annotations) https://stackoverflow.com/questions/48404800/json-to-pojo-with-custom-annotations [enter link description here](https://stackoverflow.com/questions/57351685/jsonschema2pojo-generating-objects-of-custom-annotators-as-well) – Andrei Marchanka Feb 16 '23 at 15:33

0 Answers0