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

Infinity and -Infinity not supported for maximum and minimum #676

Open
iamveritas opened this issue Apr 19, 2018 · 6 comments
Open

Infinity and -Infinity not supported for maximum and minimum #676

iamveritas opened this issue Apr 19, 2018 · 6 comments

Comments

@iamveritas
Copy link

I get this error using a valid schema which is making use of Infinity and -Infinity

Could not convert string to decimal: -Infinity. Path 'minimum', line 4, position 24.

known issues?

thank you

@RicoSuter
Copy link
Owner

Please provide some code samples and a full stacktrace.

@iamveritas
Copy link
Author

well, before I go into that, let me as a more straightforward question
does NJsonSchema support -Infinity and/or Infinity?

@RicoSuter
Copy link
Owner

The problem is, that internally we can only use one data type for min/max, and that is decimal ATM. I think decimal does not support Infinity but supports more numbers... I don't know if there is really a clean solution to this.

@iamveritas
Copy link
Author

ok, so, it is not supported. got it.
any idea when v6 or v7 draft will be supported?

@RicoSuter
Copy link
Owner

I'm open to suggestions and PRs (this one is not that important to me, so probably won't fix it soon).

v6 or v7 draft: #574
My main problem with that are the breaking changes...

@iamveritas
Copy link
Author

it's ok, no PRs needed, we got around it by using a very big number, the biggest in our domain space.
thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants