This project has moved and is read-only. For the latest updates, please go here.

Schema generation with enums

Nov 16, 2012 at 1:59 PM
Edited Nov 19, 2012 at 8: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