Fix/loader conformance - #129
Merged
Merged
Conversation
go1.27 enables encoding/json v2 by default, which makes RawMessage an alias of encoding/json/jsontext.Value. Unaliasing a field written as json.RawMessage now lands on jsontext.Value, and two rules keyed on the old spelling stopped firing: - resolvers.IsStdJSONRawMessage read only (encoding/json, RawMessage), so the type fell through to its []byte underlying and rendered as an array of uint8 instead of the empty "any JSON" schema. It answers to both names. - namedWrittenRHS, the responses builder's redirect onto the layer a declaration was written over, demanded a *types.Named there. `type DefinedRaw json.RawMessage` writes an alias, so the redirect declined and the response carried the same array. It unaliases before testing for a declared type, and hands the alias itself on so the declaration's alias policy still applies. The response-specials fixture gains the spelling that reaches the second one without go1.27 — `type ViaAliasStamp Stamped` over a local alias of time.Time, which came out with no schema at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
The go1.27 uuid suite still asserted that an embedded uuid.UUID is dropped
with an unsupported-type warning. embedPromotes changed that: an embed over
an array promotes no member, so it becomes an ordinary property named after
the type, and Embedder now carries UUID: {string, uuid} beside name. The
sub-test, the fixture prose and go127_uuid_spec.json say so, as does the
paragraph in schema/README.md that still described the drop.
The expectation went unchecked for as long as it did because the suite is
behind //go:build go1.27 and does not compile before it.
Nothing here moves the decision on a promoted MarshalText: a struct
embedding one still emits an object.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change type
Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update
Short description
Fixes
Full description
Checklist