CREATE TABLE [dbo].[jsonschema](
	[id] [bigint] IDENTITY(1,1) NOT NULL,
	[name] [varchar](128) NULL,
	[description] [varchar](256) NULL,
	[xmlschemaid] [varchar](256) NULL,
	[json] [text] NULL,
	[creationdate] [datetime] NULL,
 CONSTRAINT [PK_jsonschema] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]


CREATE TABLE [dbo].[apidoc](
	[id] [bigint] IDENTITY(1,1) NOT NULL,
	[wsproviderid] [varchar](100) NULL,
	[docjson] [text] NULL,
	[creationdate] [datetime] NULL,
	[lastmodifieddate] [datetime] NULL,
 CONSTRAINT [PK_apidoc] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]



INSERT INTO [dbo].[jsonschema]
           ([name]
           ,[description]
           ,[xmlschemaid]
           ,[json]
           ,[creationdate])
     VALUES
           ('Swagger','Schema for Swagger v1.2','192168038111144683821089700307','{
   "info": {
     "description": "string",
     "title": "string",
   },
   "basePath": "string",
   "resourcePath":"string",
   "swaggerVersion": "string",
   "apis": [
     {
       "path": "string",
       "operations": [
         {
           "summary": "string",
           "notes": "string",
           "method": "string",
           "parameters": [
             {
               "description": "string",
               "name": "string",
               "required": string,
               "type": "string",
               "paramType": "string"
             }
           ],
           "responseMessages":[
 		  {
 		  "code":"string",
 		  "message":"string",
 		  }
           ]
         }
       ]
     }
   ]
 }
 ','2015-11-18 00:44:44.000')
 
 INSERT INTO [dbo].[jsonschema]
            ([name]
            ,[description]
            ,[xmlschemaid]
            ,[json]
            ,[creationdate])
      VALUES
            ('APIKeySubject','Subject for API Key','192168001007144743637026700147','{
    "subject": {
      "companyid": "string",
      "username": "string"
    }
 }','2015-11-18 00:45:26.000')