Skip to content

Commit 81fa0ea

Browse files
authored
fix(core): missing serializer option in typedef (#846)
* fix(core): missing serializer option in typedef Signed-off-by: Matt Roberts <[email protected]> * chore(core): update api.txt Signed-off-by: Matt Roberts <[email protected]> --------- Signed-off-by: Matt Roberts <[email protected]>
1 parent dfbf14c commit 81fa0ea

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

packages/concerto-core/api.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ class Serializer {
344344
+ void constructor(Factory,ModelManager,object?)
345345
+ void setDefaultOptions(Object)
346346
+ Object toJSON(Resource,Object?,boolean?,boolean?,boolean?,boolean?,boolean?,number?) throws Error
347-
+ Resource fromJSON(Object,Object?,boolean,boolean,number?)
347+
+ Resource fromJSON(Object,Object?,boolean,boolean,number?,boolean?)
348348
}
349349
class TypeNotFoundException extends BaseException {
350350
+ void constructor(string,string|,string,string)

packages/concerto-core/changelog.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,17 @@
2424
# Note that the latest public API is documented using JSDocs and is available in api.txt.
2525
#
2626

27+
28+
Version 3.16.7 {8f455df1e788c4994f423d6e236bee21} 2024-05-01
29+
- Added missing `strictQualifiedDateTimes` option to Serializer.fromJSON
30+
2731
Version 3.13.4 {56df3674b9e8d094cec0ae690c07ea1f} 2024-04-20
2832
- Mark accept methods in introspect classes as public
2933
- Generate changes in TypeScript definitions
3034

3135
Version 3.13.3 {8f59b43e6071c4d3ae42e94476142f7a} 2023-11-07
3236
- Added DCS and vocabulary extraction support for decoratorManager
33-
- Added errortype to BaseException and used that to define error types in introspect
37+
- Added errortype to BaseException and used that to define error types in introspect
3438

3539
Version 3.13.2 {dccc690753912cf87e7ceec56d949058} 2023-10-18
3640
- Add getNamespace method to key type and value type of maps

packages/concerto-core/lib/serializer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ class Serializer {
147147
* @param {boolean} options.validate - validate the structure of the Resource
148148
* with its model prior to serialization (default to true)
149149
* @param {number} [options.utcOffset] - UTC Offset for DateTime values.
150+
* @param {boolean} [options.strictQualifiedDateTimes] - Only allow fully-qualified date-times with offsets.
150151
* @return {Resource} The new populated resource
151152
*/
152153
fromJSON(jsonObject, options) {

packages/concerto-core/types/lib/serializer.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ declare class Serializer {
6767
* @param {boolean} options.validate - validate the structure of the Resource
6868
* with its model prior to serialization (default to true)
6969
* @param {number} [options.utcOffset] - UTC Offset for DateTime values.
70+
* @param {boolean} [options.strictQualifiedDateTimes] - Only allow fully-qualified date-times with offsets.
7071
* @return {Resource} The new populated resource
7172
*/
7273
fromJSON(jsonObject: any, options?: {
7374
acceptResourcesForRelationships: boolean;
7475
validate: boolean;
7576
utcOffset?: number;
77+
strictQualifiedDateTimes?: boolean;
7678
}): Resource;
7779
}
7880
import Factory = require("./factory");

0 commit comments

Comments
 (0)