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

fix: array schema definitions with of keyword #14447

Merged
merged 1 commit into from
Mar 20, 2024
Merged

Conversation

IslandRhythms
Copy link
Collaborator

closes #14416

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

LGTM. Merging into 8.3 as a new feature since I thought we already supported type: Array, of: Number

@vkarpov15 vkarpov15 added this to the 8.3 milestone Mar 20, 2024
@vkarpov15 vkarpov15 changed the base branch from master to 8.3 March 20, 2024 19:40
@vkarpov15 vkarpov15 merged commit 1f53635 into 8.3 Mar 20, 2024
38 checks passed
Comment on lines +3211 to +3213
assert.equal(schema.path('nums.$').caster.instance, 'Number'); // actually Mixed
assert.equal(schema.path('tags.$').caster.instance, 'String'); // actually Mixed
assert.equal(schema.path('subdocs.$').casterConstructor.schema.path('name').instance, 'String'); // actually Mixed
Copy link
Contributor

Choose a reason for hiding this comment

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

Could remove these comments now.

Suggested change
assert.equal(schema.path('nums.$').caster.instance, 'Number'); // actually Mixed
assert.equal(schema.path('tags.$').caster.instance, 'String'); // actually Mixed
assert.equal(schema.path('subdocs.$').casterConstructor.schema.path('name').instance, 'String'); // actually Mixed
assert.equal(schema.path('nums.$').caster.instance, 'Number');
assert.equal(schema.path('tags.$').caster.instance, 'String');
assert.equal(schema.path('subdocs.$').casterConstructor.schema.path('name').instance, 'String');

@hasezoey hasezoey deleted the IslandRhythms/gh-14416 branch November 1, 2024 15:10
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.

Nested arrays using of result in the incorrect schema type
3 participants