This project has moved. For the latest updates, please go here.

Schema generation with enums

Nov 16, 2012 at 12:59 PM
Edited Nov 19, 2012 at 7:46 AM


I generate schemes for my .Net classes (with enum properties) that get imported into java by the jsonschema2pojo library.

Unfortunately the generation of enum schemes seems to be limited to type integer:

"MyEnum": {
          "type": "integer",
          "enum": [
          "options": [
              "value": 0,
              "label": "ValueX"
              "value": 1,
              "label": "ValueY"
            }, ...

Additionally the "options"-array is not used by jsonschema2pojo what results in java enums with numbers-values that are not really useable.

public static enum MyEnum {

Is it possible to genereate the enums like defined in the docs of jsonschema2pojo? Or is there another/better POJO-Generator?

Thanks in advance