From 36197ab179fe5818223ff3b4f9a6a99128a0e644 Mon Sep 17 00:00:00 2001 From: souvik Date: Wed, 29 May 2024 09:08:38 +0530 Subject: [PATCH] fix: udpate additional property json tag --- modelina-cli/package-lock.json | 5 +++-- src/generators/go/presets/CommonPreset.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modelina-cli/package-lock.json b/modelina-cli/package-lock.json index 6a7b677f8d..36f2747e28 100644 --- a/modelina-cli/package-lock.json +++ b/modelina-cli/package-lock.json @@ -185,9 +185,10 @@ } }, "node_modules/@asyncapi/modelina": { - "version": "4.0.0-next.43", + "version": "4.0.0-next.44", "resolved": "file:scripts/modelina-package/asyncapi-modelina.tgz", - "integrity": "sha512-RbmOESkG0tnqiL7a+eL2NSCztzPEvSaxYYjsKOuAuIyT4+HrPKQTk6/jtXVh5eiElGuwQ3dYk8OBhQU0ETrUpg==", + "integrity": "sha512-1zCOYyu5+5+LvEbRk9eHL3KCw+e4IrTQLce1X/gGQ8s6QBBPj2A60KICkS4G4lcPjNFNTWpHhy6B64Fy9Laz0Q==", + "license": "Apache-2.0", "dependencies": { "@apidevtools/json-schema-ref-parser": "^11.1.0", "@apidevtools/swagger-parser": "^10.1.0", diff --git a/src/generators/go/presets/CommonPreset.ts b/src/generators/go/presets/CommonPreset.ts index 628b1b5d38..74f0805204 100644 --- a/src/generators/go/presets/CommonPreset.ts +++ b/src/generators/go/presets/CommonPreset.ts @@ -19,7 +19,7 @@ function renderJSONTag({ field.property instanceof ConstrainedDictionaryModel && field.property.serializationType === 'unwrap' ) { - return `json:"-",omitempty`; + return `json:"-,omitempty"`; } return `json:"${field.unconstrainedPropertyName},omitempty"`; }