diff --git a/packages/concerto-core/api.txt b/packages/concerto-core/api.txt index 172f69a6e..139c8c287 100644 --- a/packages/concerto-core/api.txt +++ b/packages/concerto-core/api.txt @@ -344,7 +344,7 @@ class Serializer { + void constructor(Factory,ModelManager,object?) + void setDefaultOptions(Object) + Object toJSON(Resource,Object?,boolean?,boolean?,boolean?,boolean?,boolean?,number?) throws Error - + Resource fromJSON(Object,Object?,boolean,boolean,number?) + + Resource fromJSON(Object,Object?,boolean,boolean,number?,boolean?) } class TypeNotFoundException extends BaseException { + void constructor(string,string|,string,string) diff --git a/packages/concerto-core/changelog.txt b/packages/concerto-core/changelog.txt index 2bc1c735b..d5e1b93ff 100644 --- a/packages/concerto-core/changelog.txt +++ b/packages/concerto-core/changelog.txt @@ -24,13 +24,17 @@ # Note that the latest public API is documented using JSDocs and is available in api.txt. # + +Version 3.16.7 {8f455df1e788c4994f423d6e236bee21} 2024-05-01 +- Added missing `strictQualifiedDateTimes` option to Serializer.fromJSON + Version 3.13.4 {56df3674b9e8d094cec0ae690c07ea1f} 2024-04-20 - Mark accept methods in introspect classes as public - Generate changes in TypeScript definitions Version 3.13.3 {8f59b43e6071c4d3ae42e94476142f7a} 2023-11-07 - Added DCS and vocabulary extraction support for decoratorManager -- Added errortype to BaseException and used that to define error types in introspect +- Added errortype to BaseException and used that to define error types in introspect Version 3.13.2 {dccc690753912cf87e7ceec56d949058} 2023-10-18 - Add getNamespace method to key type and value type of maps diff --git a/packages/concerto-core/lib/serializer.js b/packages/concerto-core/lib/serializer.js index 817ba5d6e..4caa13a87 100644 --- a/packages/concerto-core/lib/serializer.js +++ b/packages/concerto-core/lib/serializer.js @@ -147,6 +147,7 @@ class Serializer { * @param {boolean} options.validate - validate the structure of the Resource * with its model prior to serialization (default to true) * @param {number} [options.utcOffset] - UTC Offset for DateTime values. + * @param {boolean} [options.strictQualifiedDateTimes] - Only allow fully-qualified date-times with offsets. * @return {Resource} The new populated resource */ fromJSON(jsonObject, options) { diff --git a/packages/concerto-core/types/lib/serializer.d.ts b/packages/concerto-core/types/lib/serializer.d.ts index 0b9a2f9ab..e10a3b451 100644 --- a/packages/concerto-core/types/lib/serializer.d.ts +++ b/packages/concerto-core/types/lib/serializer.d.ts @@ -67,12 +67,14 @@ declare class Serializer { * @param {boolean} options.validate - validate the structure of the Resource * with its model prior to serialization (default to true) * @param {number} [options.utcOffset] - UTC Offset for DateTime values. + * @param {boolean} [options.strictQualifiedDateTimes] - Only allow fully-qualified date-times with offsets. * @return {Resource} The new populated resource */ fromJSON(jsonObject: any, options?: { acceptResourcesForRelationships: boolean; validate: boolean; utcOffset?: number; + strictQualifiedDateTimes?: boolean; }): Resource; } import Factory = require("./factory");