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

Unexpected types #642

Open
oSumAtrIX opened this issue Oct 4, 2024 · 6 comments
Open

Unexpected types #642

oSumAtrIX opened this issue Oct 4, 2024 · 6 comments

Comments

@oSumAtrIX
Copy link

My model:

image

Usage in Kompendium:

image

Result:

image

The type in question is kotlinx.datetime.LocalDateTime. The question is, why is createdAt an object?

@brizzbuzz
Copy link
Contributor

brizzbuzz commented Oct 5, 2024

@oSumAtrIX
Copy link
Author

I am aware of custom types, my question is about the default behavior

@brizzbuzz
Copy link
Contributor

the doc explains exactly why this is the case

@brizzbuzz
Copy link
Contributor

object representations of scalars

LocalDateTime is an object representation of a scalar value. so kompendium see that it is an object, and tries to serialize it as such.

@oSumAtrIX
Copy link
Author

But so is a nullable of that, and yet it is serialized as a string

@brizzbuzz
Copy link
Contributor

oh interesting... worth looking into! It probably would have been more clear what you were saying if you had written that out instead of just screenshots lol

but thanks for explaining

@brizzbuzz brizzbuzz reopened this Oct 5, 2024
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