Skip to content

Allow derived enum keys - #8

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/allow-derived-enum-keys
Aug 20, 2026
Merged

Allow derived enum keys#8
ChiragAgg5k merged 1 commit into
mainfrom
fix/allow-derived-enum-keys

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

Summary

  • preserve the existing empty x-enum-keys convention for derived identifiers
  • continue rejecting partial non-empty mappings

Tests

  • composer check

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR allows an explicitly empty x-enum-keys list to retain the existing derived-identifier convention while continuing to reject partial non-empty mappings.

  • Exempts empty enum-key lists from enum-length validation.
  • Adds focused coverage for explicit empty lists and derived names.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness or security issues identified.

The parser consistently represents absent and explicitly empty enum-key mappings as an empty list, while the unchanged non-empty cardinality validation continues to reject partial mappings.

Important Files Changed

Filename Overview
src/Parser/Schema/Reader.php The enum-key validation now accepts an empty list while preserving cardinality checks for non-empty mappings; no actionable defect was identified.
tests/Schema/ReaderTest.php Adds focused regression coverage confirming that an explicit empty mapping remains represented as derived enum keys.

Reviews (1): Last reviewed commit: "fix: allow derived enum keys" | Re-trigger Greptile

@ChiragAgg5k
ChiragAgg5k merged commit 0d95889 into main Aug 20, 2026
5 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/allow-derived-enum-keys branch August 20, 2026 16:03
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