Skip to content

aereal/playground-generate-json-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run as:

carton install
carton exec -- perl scripts/generate_schema.pl eg/*.json

Result:

{
   "$schema" : "http://json-schema.org/draft-04/schema#",
   "description" : "TODO",
   "properties" : {
      "id" : {
         "example" : 1,
         "type" : "number"
      },
      "name" : {
         "example" : "yuno",
         "type" : "string"
      },
      "school" : {
         "properties" : {
            "location" : {
               "properties" : {
                  "lat" : {
                     "example" : 14,
                     "type" : "number"
                  },
                  "lon" : {
                     "example" : 15,
                     "type" : "number"
                  }
               },
               "type" : "object"
            },
            "name" : {
               "example" : "yamabuki",
               "type" : [
                  "string",
                  "null"
               ]
            }
         },
         "type" : "object"
      }
   },
   "title" : "TODO",
   "type" : "object"
}

About

Generate JSON schema

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages