Skip to content

feat(jsonschema): describe PHPDoc array shapes as objects - #8767

Open
afraca wants to merge 1 commit into
api-platform:mainfrom
afraca:feat/json-schema-array-shape
Open

afraca wants to merge 1 commit into
api-platform:mainfrom
afraca:feat/json-schema-array-shape

Conversation

@afraca

@afraca afraca commented Oct 26, 2026

Copy link
Copy Markdown

Keyed array shapes such as array{total: int, failed?: int} now generate an object schema with their properties and required keys, instead of a generic map with a union value type. Sealed shapes get additionalProperties: false, unsealed shapes with a value type get it as additionalProperties. List shapes stay arrays.

Closes #8766

I did nothing with CHANGELOG.md , who's responsibility is that?

@afraca
afraca force-pushed the feat/json-schema-array-shape branch from 786e436 to 15c2117 Compare October 26, 2026 14:06
Keyed array shapes such as array{total: int, failed?: int} now generate
an object schema with their properties and required keys, instead of a
generic map with a union value type. Sealed shapes get
additionalProperties: false, unsealed shapes with a value type get it as
additionalProperties. List shapes stay arrays.

Closes api-platform#8766
@afraca
afraca force-pushed the feat/json-schema-array-shape branch from 15c2117 to 809f22b Compare October 26, 2026 15:02
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.

API Platform ignores array shapes in the JSON Schema

2 participants