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

Use correct boolean type for JSON Schema creation #4220

Closed
crisaltmann opened this issue Oct 26, 2022 · 0 comments
Closed

Use correct boolean type for JSON Schema creation #4220

crisaltmann opened this issue Oct 26, 2022 · 0 comments
Assignees
Labels
type: regression A regression from a previous release

Comments

@crisaltmann
Copy link

crisaltmann commented Oct 26, 2022

Hello,

After this PR which modifies the boolean type on JsonSchemaObject, I started to receive the error below when trying to add a schema validator on a collection.

log: {"ok": 0.0, "errmsg": "Unknown type name alias: bool", "code": 2, "codeName": "BadValue"}

My mongo version is 5.0. The BSON type is bool but the Json type remains boolean

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 26, 2022
@mp911de mp911de added type: regression A regression from a previous release and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 27, 2022
@mp911de mp911de self-assigned this Oct 27, 2022
@mp911de mp911de changed the title Error creating schema validator with JsonSchemaObject Use correct boolean type for JSON Schema creation Oct 27, 2022
mp911de added a commit that referenced this issue Oct 27, 2022
We now use the correct JSON type boolean again when creating schemas. Furthermore, we use the bool type for MongoDB $type queries.

Closes #4220
mp911de added a commit that referenced this issue Oct 27, 2022
We now use the correct JSON type boolean again when creating schemas. Furthermore, we use the bool type for MongoDB $type queries.

Closes #4220
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

3 participants