From 02775e079bc6c76209491bdb0bdec5c20db264f7 Mon Sep 17 00:00:00 2001 From: Jon Wire Date: Wed, 25 Sep 2024 12:33:13 -0500 Subject: [PATCH 1/3] fix empty schema on getting started manual installation page --- package.json | 3 ++- src/pages/[platform]/start/manual-installation/index.mdx | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e59246539de..46d3ce64f4f 100644 --- a/package.json +++ b/package.json @@ -118,5 +118,6 @@ "analyze": "ANALYZE=true yarn next-build", "prebuild": "node src/directory/generateDirectory.mjs && node src/directory/generateFlatDirectory.mjs", "lint": "next lint" - } + }, + "packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447" } diff --git a/src/pages/[platform]/start/manual-installation/index.mdx b/src/pages/[platform]/start/manual-installation/index.mdx index f287bdf0dd2..d3ea4238e3d 100644 --- a/src/pages/[platform]/start/manual-installation/index.mdx +++ b/src/pages/[platform]/start/manual-installation/index.mdx @@ -118,7 +118,14 @@ Or define your data resource: ```ts title="amplify/data/resource.ts" import { a, defineData, type ClientSchema } from '@aws-amplify/backend'; -const schema = a.schema({}); +// The schema cannot be empty. +const schema = a.schema({ + Todo: a.model({ + content: a.string(), + isDone: a.boolean() + }) + .authorization(allow => [allow.publicApiKey()]) +}); export type Schema = ClientSchema; export const data = defineData({ From f83d21513746f84aee6763521159ef959c531f2a Mon Sep 17 00:00:00 2001 From: Jon Wire Date: Wed, 25 Sep 2024 12:36:21 -0500 Subject: [PATCH 2/3] removed accidental yarn edit commit to package.json --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 46d3ce64f4f..e59246539de 100644 --- a/package.json +++ b/package.json @@ -118,6 +118,5 @@ "analyze": "ANALYZE=true yarn next-build", "prebuild": "node src/directory/generateDirectory.mjs && node src/directory/generateFlatDirectory.mjs", "lint": "next lint" - }, - "packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447" + } } From 50cd7c375fc2422efd6a27566cc4c4706b2bdd55 Mon Sep 17 00:00:00 2001 From: Jon Wire Date: Wed, 25 Sep 2024 14:12:21 -0500 Subject: [PATCH 3/3] removed comment noting schemas cannot be empty --- src/pages/[platform]/start/manual-installation/index.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/[platform]/start/manual-installation/index.mdx b/src/pages/[platform]/start/manual-installation/index.mdx index d3ea4238e3d..49373ce94f2 100644 --- a/src/pages/[platform]/start/manual-installation/index.mdx +++ b/src/pages/[platform]/start/manual-installation/index.mdx @@ -118,7 +118,6 @@ Or define your data resource: ```ts title="amplify/data/resource.ts" import { a, defineData, type ClientSchema } from '@aws-amplify/backend'; -// The schema cannot be empty. const schema = a.schema({ Todo: a.model({ content: a.string(),