This repository was archived by the owner on Apr 2, 2025. It is now read-only.
Tags: stapi-spec/stapi-fastapi
Tags
ProductRouter split from RootRouter (nee StapiRouter) (#80) This changeset includes a number of fixes to better align behavior with the spec and fix bugs, and a whole bunch of clean up. The main feature is moving the `GET /opportunities` and `POST /orders` endpoints under the product path, such as `/products/{product_id}/opportunities`, as the spec has determined that opportunities and placing an order are product-specific (see stapi-spec/stapi-spec#198 and stapi-spec/stapi-spec#200). This changeset also adds the missing `/products/{product_id}/constraints` endpoint (formerly parameters). Another key feature is the introduction of the `bin/server.py` script that can be used with uvicorn to run a minimal implementation for local browsing. See the README for instructions. * initial implementation of router composition for products * make OpportunityProperties and Opportunity models generics * overhaul the main router as APIRouter, product router not a factory, add product router classmethod to main router * resolve merge conflicts * sort out the conftest a bit more * the /products/{product_id}/opportunities endpoint is accessible * adds product router and backend * wip: splits backend and router for root and product. Co-authored-by: Jarrett Keifer <[email protected]> * adds test for get_constraints * remove unused modules * various cleanup and refinements * no longer a problem with the root router / route * rename tests/backend{,s}.py * get tests passing * more cleanup * fixes StapiExceptions Co-authored-by: Tyler <[email protected]> Co-authored-by: Jarrett Keifer <[email protected]> * removes dupe HTTPException in models * passes product router instead of product to backend Co-authored-by: Tyler <[email protected]> Co-authored-by: Jarrett Keifer <[email protected]> * Adds OrderCollection type and returns for get_orders Co-authored-by: Tyler <[email protected]> Co-authored-by: Jarrett Keifer <[email protected]> * type the opporunities to the product constraints model * upgrade fastapi * fix GeoJSONResponse model bug per openapi docs * minimal test server to allow accessing openapi docs * remove nulls from serialized links * tests should fail not warn on spec incompatibility * add nocover to protocol implementations * standardize links on models --------- Co-authored-by: Mike Parks <[email protected]> Co-authored-by: Jarrett Keifer <[email protected]> Co-authored-by: Tyler <[email protected]>
bump: 0.0.0+240926-073457 → 0.0.0+240926-073941
PreviousNext