Skip to content

Conversation

@Leptopoda
Copy link
Member

This is going to be needed for cookbook support.
I had this on a branch from march and thought it's time :)

I also plan to implement the base64 byte format and an option for custom formats.
I plan to add a config option to dynamites build-yaml config (or a separate file) that can specify:

  • string with the import directive
  • name of the custom serializer
  • serialization method
  • deserialization method

This would enable us to have custom formats like unix-time or iso 8601 duration support (the later also being needed by cookbook).

I do not plan to implement it without tests though as I can see those features not being used all to frequesntly

@Leptopoda Leptopoda force-pushed the feat/dynamite/date_serialization branch from cd4f91b to 796c0c7 Compare October 23, 2023 14:48
@Leptopoda Leptopoda marked this pull request as ready for review October 23, 2023 14:49
@Leptopoda
Copy link
Member Author

now that we have the dynamite e2e tests we can confidently merge this one.

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title is wrong

Comment on lines +89 to +91
const _dartTypes = [
'DateTime',
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_dartKeywords already contains other dart types, so I would just add it there

);

final json = {
'date': '2023-10-22T22:00:00.000Z',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'date': '2023-10-22T22:00:00.000Z',
'date': '2023-10-22',

According to https://swagger.io/docs/specification/data-models/data-types/

@Leptopoda Leptopoda marked this pull request as draft October 28, 2023 15:51
@Leptopoda
Copy link
Member Author

I'll close this for now and tackle this after we have the first releases.
I already have implemented a custom date class with custom serialization locally.

@Leptopoda Leptopoda closed this Nov 8, 2023
@Leptopoda Leptopoda deleted the feat/dynamite/date_serialization branch November 8, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants