Skip to content

fix(Type): a class that is no component is not a nested schema's type - #2303

Merged
DerManoMann merged 1 commit into
zircote:masterfrom
DerManoMann:fix/classic-items
Oct 22, 2026
Merged

DerManoMann merged 1 commit into
zircote:masterfrom
DerManoMann:fix/classic-items

Conversation

@DerManoMann

Copy link
Copy Markdown
Collaborator

Overview

In classic mode, an array, map, array shape or union whose element is a class that is not a component writes the class name as the element's type, for example items: { type: 'App\Thing' }. That is not a JSON Schema type, so the document is invalid. A property typed with the class directly already comes out as {}, and the nested cases now do the same.

Changes

  • Array items, map values, array shape members and union members typed with a plain class are left untyped, as a property typed with that class is
  • The legacy type resolver does the same for array items
  • Classic output for these cases now matches hybrid

`TypeInfoTypeResolver` runs the top level's type check on every nested schema
it builds (items, `additionalProperties`, shape properties, `oneOf` and `allOf`
members), so a type that maps to nothing is dropped. `LegacyTypeResolver` does
the same for items. The `ClassRef` scratch fixture gains a list, a map and a
shape of a plain class.
@DerManoMann
DerManoMann merged commit fa85f2a into zircote:master Oct 22, 2026
19 checks passed
@DerManoMann
DerManoMann deleted the fix/classic-items branch October 22, 2026 04:05
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