beaker icon indicating copy to clipboard operation
beaker copied to clipboard

WIP: swagger yaml defination

Open p3ck opened this issue 1 year ago • 2 comments

Using openapi 3.0 specification to define the restAPI for beaker backend.

skeleton api with some dummy methods to allow for testing the test framework.

Once this is fleshed out we can start migrating the model code over and then create the actual rest methods.

Created a test_systems unittest to make sure I understood how this would all glue together. pytest output:

================================================= test session starts =================================================
platform linux -- Python 3.12.1, pytest-7.4.4, pluggy-1.3.0
rootdir: /home/bpeck/Sandbox/beaker/beaker/API
plugins: anyio-4.2.0
collected 4 items                                                                                                     

tests/test_api.py .                                                                                             [ 25%]
tests/test_systems.py ...                                                                                       [100%]

================================================== warnings summary ===================================================
============================================ 4 passed, 7 warnings in 0.10s ============================================

Alembic migrations will be handled by command line db-init and db-migrate tools.

p3ck avatar Jan 31 '24 21:01 p3ck

@p3ck This looks cool. Thanks!

Only thought I have is that at some point it would be good to add some CI to test this.

JohnVillalovos avatar Feb 01 '24 19:02 JohnVillalovos

@p3ck This looks cool. Thanks!

Only thought I have is that at some point it would be good to add some CI to test this.

Absolutely! You notice that I have the beginnings of tests in this PR. We will enable them in github when we switch over.

Lot more work to be done before then though.

p3ck avatar Feb 01 '24 20:02 p3ck