bmchild / JsonSchemaGen

A simple project to demonstrate generating Json Schema from a Pojo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is an example of how to create a JSON Schema from a POJO.

This example will generate this schema:

{
  "type" : "object",
  "id" : "urn:jsonschema:com:bmchild:model:SimplePojo",
  "properties" : {
    "children" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "id" : "urn:jsonschema:com:bmchild:model:SimplePojoChild",
        "properties" : {
          "cName" : {
            "type" : "string"
          },
          "id" : {
            "type" : "integer"
          },
          "cDescription" : {
            "type" : "string"
          }
        }
      }
    },
    "name" : {
      "type" : "string"
    },
    "description" : {
      "type" : "string"
    },
    "id" : {
      "type" : "integer"
    }
  }
}

About

A simple project to demonstrate generating Json Schema from a Pojo.


Languages

Language:Java 100.0%