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

Refactor & improve public API #86

Merged
merged 40 commits into from
Feb 13, 2024
Merged

Refactor & improve public API #86

merged 40 commits into from
Feb 13, 2024

Conversation

Redm4x
Copy link
Collaborator

@Redm4x Redm4x commented Jan 23, 2024

Improve public api

  • Added swagger UI documentation
  • Standardized endpoint urls (ex: /getMainnetVersion => /version/mainnet)
  • Switched to honojs instead of express for a better dev experience (better typing + facilitate openapi definition)
  • Added versioning to url and file structure to enable backward compatible upgrades (/v1/endpoint)
  • Added eslint and improved typing across the board

@Redm4x Redm4x requested a review from baktun14 January 23, 2024 16:54
@Redm4x Redm4x mentioned this pull request Jan 23, 2024
8 tasks
@baktun14
Copy link
Collaborator

Rename providers into services?

api/src/caching/helpers.ts Show resolved Hide resolved
api/src/routes/v1/deployments/byOwnerDseq.ts Outdated Show resolved Hide resolved
api/src/utils/pricing.ts Show resolved Hide resolved
deploy-web/src/utils/apiUtils.ts Show resolved Hide resolved
@baktun14
Copy link
Collaborator

Does this new version of the API support the old routes? We should for a grace period of time because some clients use the API actively in their app and will break if we release without support.

@Redm4x Redm4x closed this Jan 26, 2024
@Redm4x Redm4x reopened this Jan 26, 2024
@Redm4x
Copy link
Collaborator Author

Redm4x commented Jan 30, 2024

Does this new version of the API support the old routes? We should for a grace period of time because some clients use the API actively in their app and will break if we release without support.

Good point, I added legacyRouter.ts with redirects so that it doesn't break existing integrations. We should still contact those clients and point them to the new documentation so that they can switch to using v1

@Redm4x Redm4x marked this pull request as ready for review January 30, 2024 15:50
@Redm4x Redm4x merged commit 6ef9b88 into main Feb 13, 2024
5 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.

None yet

2 participants