Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date mentions are not correctly serialized #413

Open
matkoch opened this issue Jun 13, 2024 · 1 comment
Open

Date mentions are not correctly serialized #413

matkoch opened this issue Jun 13, 2024 · 1 comment
Milestone

Comments

@matkoch
Copy link

matkoch commented Jun 13, 2024

The original Mention object allows to set ta date as follows:

mention.Mention.Date.Date = new Date { Start = ... }

This results in a serialized JSON that has 1 additional date property in the middle. Notion validation returns the following:

.mention.date.start should be defined, instead was `undefined`

I introduced a hotfix that skips the additional Date property:

public class MentionPatch : Mention
{
    [JsonProperty("date")]
    public Date Date1 { get; set; }
}
@KoditkarVedant KoditkarVedant added this to the 4.3.0 milestone Oct 29, 2024
@KoditkarVedant
Copy link
Contributor

@matkoch I am unable to see issue, could you please add a failing test to prove this?

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

No branches or pull requests

2 participants