Skip to content

Fix/issue 485 openapi examples#534

Merged
greatest0fallt1me merged 2 commits into
Predictify-org:mainfrom
Agencybuilds:fix/issue-485-openapi-examples
Jul 26, 2026
Merged

Fix/issue 485 openapi examples#534
greatest0fallt1me merged 2 commits into
Predictify-org:mainfrom
Agencybuilds:fix/issue-485-openapi-examples

Conversation

@Agencybuilds

Copy link
Copy Markdown
Contributor

Closes #485

Description

This PR addresses the backend issue for the GrantFox FWC26 campaign (Stellar Wave) by implementing structured example request/response bodies for the /api/users endpoints in openapi.yaml.

Changes Made

  • OpenAPI Registry Updates: Added examples blocks for all HTTP error responses (400, 401, 404) across the following endpoints in src/openapi/registry.ts:
    • GET /api/users/me
    • GET /api/users/{address}/predictions
    • GET /api/users/{stellarAddress}/profile
    • POST /api/users/{addr}/follow
    • DELETE /api/users/{addr}/follow
  • Spec Generation: Ran npm run openapi:generate to output the updated OpenAPI definitions to openapi.yaml.
  • Test Coverage: Expanded tests/openapi.users.examples.test.ts to assert that the generated openapi.yaml correctly contains the new 400, 401, and 404 error examples.

Requirements Checklist

  • Example request/response bodies added for /api/users in openapi.yaml.
  • Focused tests added for the change and achieving test coverage guidelines.
  • Input validation examples follow the standardized error envelope schema.
  • Passed automated verification and formatting checks.

@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@Agencybuilds Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me
greatest0fallt1me merged commit 2094a23 into Predictify-org:main Jul 26, 2026
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.

Add OpenAPI examples for /api/users

2 participants