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

Check openapi correspondence #21

Open
ch1bo opened this issue Feb 4, 2025 · 1 comment
Open

Check openapi correspondence #21

ch1bo opened this issue Feb 4, 2025 · 1 comment

Comments

@ch1bo
Copy link
Member

ch1bo commented Feb 4, 2025

Why

While we use servant to describe the API types in the hydra-explorer, the actual api/*.yaml openapi schemas are the interface to be used by observers and clients.

We want to ensure that the implementation (through servant-server) is matching what is claimed in the openapi schema through some automated testing (and stays that way).

What

  • Add a test suite that fails if we change the ObservationApi Haskell type (or its constituents), but not the openapi schema in observer-api.yaml#paths/" /observations/{network}/{version}"
  • Add a test suite that fails if we change the ClientApi Haskell type (or its constituents), but not the openapi schema in client-api.yaml#paths/\/ticks or client-api.yaml#paths/\/heads
@ch1bo ch1bo mentioned this issue Feb 4, 2025
1 task
@ch1bo
Copy link
Member Author

ch1bo commented Feb 6, 2025

This looks like it could be what we want: https://schemathesis.readthedocs.io/en/stable/getting-started.html

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

No branches or pull requests

1 participant