Skip to content

Commit

Permalink
fix(core): missing serializer option in typedef (#846)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
mttrbrts authored May 1, 2024
1 parent dfbf14c commit 81fa0ea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/concerto-core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion packages/concerto-core/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/concerto-core/lib/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions packages/concerto-core/types/lib/serializer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 81fa0ea

Please sign in to comment.