diff --git a/schemas/datasource.json b/schemas/datasource.json index 038bb38..567602b 100644 --- a/schemas/datasource.json +++ b/schemas/datasource.json @@ -37,6 +37,10 @@ { "const": "elasticgraph", "description": "Ealasticgraph as datasource" + }, + { + "type": "string", + "description": "Custom datasource type." } ] } diff --git a/schemas/events.json b/schemas/events.json index 89e66d9..bd75174 100644 --- a/schemas/events.json +++ b/schemas/events.json @@ -168,7 +168,7 @@ "required": ["application/json"] } }, - "required": ["content"] + "required": [] }, "authn": { "type": "boolean", @@ -213,10 +213,10 @@ "required": ["application/json"] } }, - "required": ["content"] + "required": [] } }, - "required": ["200"] + "required": [] } } } diff --git a/snippets/snippets.json b/snippets/snippets.json index a2e2fe5..18c3e66 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -225,5 +225,42 @@ "\t\t\tmessage: <% inputs.body.message %>" ] + }, + "prisma schema sample": { + "prefix": ["prisma schema sample"], + "body": [ + "datasource db {", + "\tprovider = 'mongodb'", + "\turl = env('DATABASE_URL')", + "}", + "generator client {", + "\tprovider = 'prisma-client-js'", + "}", + "", + "model Post {", + "\tid String @id @default(auto()) @map(_id') @db.ObjectId", + "\tslug String @unique", + "\ttitle String", + "\tbody String", + "\tauthor User @relation(fields: [authorId], references: [id])", + "\tauthorId String @db.ObjectId", + "comments Comment[]", + "}", + "", + "model User", + "\tid String @id @default(auto()) @map('_id') @db.ObjectId", + "\temail String @unique", + "\tname String?", + "\taddress Address?", + "\tposts Post[]", + "}", + "", + "model Comment {", + "\tid String @id @default(auto()) @map('_id') @db.ObjectId", + "\tcomment String", + "\tpost Post @relation(fields: [postId], references: [id])", + "\tpostId String @db.ObjectId", + "}" + ] } }