Skip to content

Require object values in serialization schemas - #3134

Open
OskarEichler wants to merge 2 commits into
ruby:masterfrom
OskarEichler:codex/schema-object-types
Open

Require object values in serialization schemas#3134
OskarEichler wants to merge 2 commits into
ruby:masterfrom
OskarEichler:codex/schema-object-types

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

  • declare the function serialization payload as a JSON object
  • declare include, extend, prepend, attribute, and alias members as JSON objects
  • reject scalar, array, and null values that currently bypass properties and required

Reproduction

Draft-04 validation ignores properties and required for non-object instances unless an object type is declared. As a result, the six affected definitions currently accept values such as null, 1, "value", and [] even though their serialized forms are objects.

Verification

  • existing schema suite: 11/11 passing
  • external negative model: invalid primitive values are rejected and representative serialized objects remain accepted
  • current primary plus stdlib suites: 4,140 tests / 66,231 assertions / 0 failures / 0 errors
  • native build and complete signature validation
  • all nine generated template outputs remain byte-identical
  • Rust parser: 47 tests, formatting, and Clippy with warnings denied

No runtime or generated API behavior changes for valid serialized objects.

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.

1 participant