From 7b8250bd535c3c5ec7429a65139335ad43616ae0 Mon Sep 17 00:00:00 2001 From: CJ R Date: Mon, 30 Jan 2023 22:36:38 -0700 Subject: [PATCH] fix(generators): Generated app does not start when choosing JSON schema (#3034) --- packages/generators/src/app/templates/configuration.tpl.ts | 1 + .../generators/src/authentication/templates/schema.json.tpl.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/generators/src/app/templates/configuration.tpl.ts b/packages/generators/src/app/templates/configuration.tpl.ts index 5f9173bd14..a19f826dae 100644 --- a/packages/generators/src/app/templates/configuration.tpl.ts +++ b/packages/generators/src/app/templates/configuration.tpl.ts @@ -32,6 +32,7 @@ import type { FromSchema } from '@feathersjs/schema' import { dataValidator } from './validators' export const configurationSchema = { + $id: 'configuration', type: 'object', additionalProperties: false, required: [ 'host', 'port', 'public' ], diff --git a/packages/generators/src/authentication/templates/schema.json.tpl.ts b/packages/generators/src/authentication/templates/schema.json.tpl.ts index 076cfda2a5..420ff3e236 100644 --- a/packages/generators/src/authentication/templates/schema.json.tpl.ts +++ b/packages/generators/src/authentication/templates/schema.json.tpl.ts @@ -69,7 +69,7 @@ export const ${camelName}DataResolver = resolve<${upperName}Data, HookContext>({ }) // Schema for updating existing users -export const ${camelName}DataSchema = { +export const ${camelName}PatchSchema = { $id: '${upperName}Patch', type: 'object', additionalProperties: false,