Skip to content

fix: make license_author nullable in schema and types#2

Merged
Juxsta merged 1 commit into
masterfrom
fix/nullable-license-author
Dec 31, 2025
Merged

fix: make license_author nullable in schema and types#2
Juxsta merged 1 commit into
masterfrom
fix/nullable-license-author

Conversation

@Juxsta

@Juxsta Juxsta commented Dec 31, 2025

Copy link
Copy Markdown
Owner

Summary

  • Fixed schema validation errors when searching exercises with muscle/equipment filters
  • The wger API returns null for license_author on some exercises and translations
  • Updated both Zod schemas and TypeScript interfaces to allow null values

Changes

  • src/schemas/api.ts: Changed license_author from z.string() to z.string().nullable() (2 occurrences)
  • src/types/wger.ts: Changed license_author from string to string | null (2 occurrences)

Test plan

  • Build passes (npm run build)
  • Tested search_exercises with muscle/equipment filters - now works correctly
  • Tested get_exercise_details - still works

🤖 Generated with Claude Code

The wger API can return null for license_author field on exercises
and exercise translations. This was causing schema validation errors
when searching exercises with muscle/equipment filters.

Changes:
- src/schemas/api.ts: Changed license_author from z.string() to z.string().nullable()
- src/types/wger.ts: Changed license_author from string to string | null

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Juxsta Juxsta merged commit fbdb780 into master Dec 31, 2025
0 of 2 checks passed
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