Skip to content

[Backport #2003 to 5.x] Map array<K, V> to type: object + additionalProperties#2006

Closed
github-actions[bot] wants to merge 1 commit into
5.xfrom
backport-2003-to-5.x
Closed

[Backport #2003 to 5.x] Map array<K, V> to type: object + additionalProperties#2006
github-actions[bot] wants to merge 1 commit into
5.xfrom
backport-2003-to-5.x

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automated backport of #2003 to branch 5.x.

Do not modify this pull request.

Closes #2001

Summary

  • TypeInfoTypeResolver now maps array<K, V> (with explicit key type) to type: object + additionalProperties instead of type: array + items
  • array<T>, T[], list<T> (default int|string key) keep existing type: array + items behaviour
  • ArrayShapeType (e.g. array{foo:bool}) also correctly resolves to type: object + additionalProperties
  • LegacyTypeResolver is not affected — it continues to produce type: array + items for all array types

Test plan

  • TypeResolverTest — 152 tests pass (both 3.0.0 and 3.1.0, both legacy and type-info resolvers)
  • AugmentPropertiesTest — map assertion merged into testTypedProperties
  • Nested array<int, T> in union types correctly produces object + additionalProperties

@github-actions

Copy link
Copy Markdown
Contributor Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-2003-to-5.x
git worktree add --checkout .worktree/backport-2003-to-5.x backport-2003-to-5.x
cd .worktree/backport-2003-to-5.x
git reset --hard HEAD^
git cherry-pick -x f66289ab9c9c3a1cf70222e0bebbe7c6c7109f2f

@DerManoMann DerManoMann deleted the backport-2003-to-5.x branch April 28, 2026 04:48
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.

2 participants