How to create schema with custom type

64 views
Skip to first unread message

arunkumar nambukannan

unread,
Apr 16, 2019, 9:24:53 AM4/16/19
to JSON Schema

Hi Team,


I want to create a schema with custom type. Please help me to do it.


eg  :    {
               "properties": 
               {
                   "employee": 
                   {
                       "type": "User"
                   }
               }
        }



Thanks,
Arun

Ben Hutton

unread,
Apr 16, 2019, 9:32:33 AM4/16/19
to arunkumar nambukannan, JSON Schema

Hi Arun,

 

Sorry, you can’t do this.

What you can do instead is use definitions, and then reference those.

 

Take a look at http://json-schema.org/understanding-json-schema/structuring.html

 

 

Cheers

Ben

-- The Wellcome Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
Reply all
Reply to author
Forward
0 new messages