Skip to content

fix: Correct inverted required field logic in schema generator#1711

Merged
openminddev merged 4 commits intoOpenMind:mainfrom
nan1888:nan1888-patch-1
Feb 15, 2026
Merged

fix: Correct inverted required field logic in schema generator#1711
openminddev merged 4 commits intoOpenMind:mainfrom
nan1888:nan1888-patch-1

Conversation

@nan1888
Copy link
Copy Markdown
Contributor

@nan1888 nan1888 commented Jan 19, 2026

Fixes #1610

Problem:

  • Schema generator had inverted logic for 'required' field
  • Fields WITH defaults were marked as required
  • Fields WITHOUT defaults were not marked as required

Solution:

  • Changed required: has_default to required: not has_default

Impact:

  • Config schema will now correctly identify required fields

@nan1888 nan1888 requested a review from a team as a code owner January 19, 2026 11:19
@github-actions github-actions Bot added the python Python code label Jan 19, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@Wanbogang Wanbogang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug confirmed: Inverted logic in required field detection.

Fix verified:

  • Before: required = has_default (fields with defaults marked required)
  • After: required = not has_default (correct logic)

Logic validated:

  • Field without default → required = True
  • Field with default → required = False

@openminddev openminddev merged commit 20c8519 into OpenMind:main Feb 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Critical bug: Inverted 'required' field logic in schema generator

3 participants