Skip to content

axum -> poem #46

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

Merged
merged 24 commits into from
Jun 7, 2024
Merged

axum -> poem #46

merged 24 commits into from
Jun 7, 2024

Conversation

Dzejkop
Copy link
Contributor

@Dzejkop Dzejkop commented Jun 5, 2024

This PR switches from axum to poem with poem-openapi.

There are quite a few changes but the upside is that the API is now self documenting and while the provided API explorers (notably swagger and rapidoc) aren't a proper UI it's 20% of the way there at 5% of the effort.

Swagger UI

localhost_3000_swagger

The API schema can also be downloaded at HOST/schema.json or HOST/schema.yml.

Drive-by changes

  1. More reasonable test defaults make the tests much shorter
  2. A new db migration that adds a constraint so we only have 2 RPC urls (http and ws) per network
  3. Fixed a bug related to predefined configuration (network, relayer, api key)

Restarting the tx-sitter which has predefined values (network, relayer, api key) would result with multiple tasks indexing blocks. Which would in turn cause db conflicts and weird behaviour.
@Dzejkop Dzejkop merged commit 2c3fdf2 into main Jun 7, 2024
@Dzejkop Dzejkop deleted the dzejkop/poemize branch June 7, 2024 12:34
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.

2 participants