From ea7cc39dda532ee9b2d6b80109f2a900a746bcd6 Mon Sep 17 00:00:00 2001 From: Nick Evans <2616208+nickevansuk@users.noreply.github.com> Date: Tue, 25 Feb 2025 11:22:05 +0000 Subject: [PATCH] fix: Allow beta class names in TypeScript --- src/generators/typescript/model.ts.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generators/typescript/model.ts.mustache b/src/generators/typescript/model.ts.mustache index 5a2255d..8aa5f71 100644 --- a/src/generators/typescript/model.ts.mustache +++ b/src/generators/typescript/model.ts.mustache @@ -12,7 +12,7 @@ import * as schema from '../schema'; {{/classDoc}} */ export type {{{ className }}} = { - '@type': '{{{ modelTypePropName }}}'; + '@type': '{{{ modelType }}}'; '@context'?: string | string[]; {{#fieldList}} {{#if description }} @@ -58,7 +58,7 @@ export type {{{ className }}}OrSubClass = {{/classDoc}} */ export const {{{ className }}}JoiSchema = Joi.object({ - '@type': Joi.string().valid('{{{ modelTypePropName }}}').required(), + '@type': Joi.string().valid('{{{ modelType }}}').required(), '@context': Joi.alternatives().try([Joi.string(), Joi.array().items(Joi.string())]), {{#fieldList}} {{{ renderMemberName }}}: {{{ propertyJoiType }}},