Skip to content
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

enhancement: update billing plan endpoints docs to show sample return data #944

Conversation

chimeziriobioha
Copy link
Contributor

@chimeziriobioha chimeziriobioha commented Aug 23, 2024

Description

Update billing plan endpoints docs to show samples of expected data so frontend developers can easily integrate with the backend. Endpoint docs updated include:

  • /api/v1/organisations/{organisation_id}/billing-plans
  • /api/v1/organisations/billing-plans
  • /api/v1/organisations/billing-plans/{billing_plan_id}
  • /api/v1/organisations/billing-plans/{billing_plan_id}

Related Issue

[FIX]: Add Expected Data Samples To Docs For All Billing Plan Endpoints #941

Motivation and Context

Frontend developers and others viewing the backend docs should be able to know exactly what to expect from each endpoint.

How Has This Been Tested?

  • Unit Tests: Added tests to validate successful and failed requests as expected.
  • Test Environment: Mocked database; to avoid interference with the production environment.

Screenshots:

Before The Update

boilerplate get all billing plan return value boilerplate post billing plan return value

After The Update

updated billing plan schema all updated billing plan schema single

Types of changes

  • Bug fix (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@chimeziriobioha chimeziriobioha changed the title fix: update billing plan endpoints schemas to show sample return data in docs fix: update billing plan endpoints docs to show sample return data Aug 23, 2024
@JoshuaOloton
Copy link
Contributor

This issue looks resolved already @traderstechie

@chimeziriobioha
Copy link
Contributor Author

chimeziriobioha commented Aug 23, 2024

This issue looks resolved already @traderstechie

Not really @JoshuaOloton . My PR is not about the endpoint functionality, but the docs that shows what's returned in the data key, which tells frontend guys what to expect from the endpoint.

@chimeziriobioha chimeziriobioha changed the title fix: update billing plan endpoints docs to show sample return data enhancement: update billing plan endpoints docs to show sample return data Aug 23, 2024
@johnson-oragui
Copy link
Collaborator

You might as well fix the rest of the docs if this qualifies as an issue.

@chimeziriobioha
Copy link
Contributor Author

chimeziriobioha commented Aug 23, 2024

You might as well fix the rest of the docs if this qualifies as an issue.

I believe it's something that should be done. If not now, then later. Maybe this one will bring attention to it. Without good docs, it'll be hard for non-contributors to integrate the product. It doesn't particularly matter if it qualifies as an issue now or not.

@johnson-oragui johnson-oragui merged commit 43d9e5a into hngprojects:dev Aug 24, 2024
1 check 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.

3 participants