Skip to content

Fix: Normalize userId to integer in POST/PUT requestsFix: Normalize userId to integer in POST/PUT requests #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tania2607
Copy link

@Tania2607 Tania2607 commented Jul 28, 2025

When using the /posts endpoint:

  • GET /posts/1 returns userId as an integer:
    { "userId": 1, ... }

  • POST /posts with userId=1 returns it as a string:
    { "userId": "1", ... }

This causes issues in strictly typed languages like Swift or TypeScript.

Suggested fix: Normalize userId as an integer across all responses.

Fixes: #217

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