Skip to content

Update stapi-fastapi README with more info #80

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

Open
gadomski opened this issue Apr 3, 2025 · 0 comments
Open

Update stapi-fastapi README with more info #80

gadomski opened this issue Apr 3, 2025 · 0 comments
Labels
documentation Improvements or additions to documentation [package] stapi-fastapi FastAPI server implementation

Comments

@gadomski
Copy link
Member

gadomski commented Apr 3, 2025

It's could have more info for folks looking to do things just with stapi-fastapi. What we put in each README is a bit fuzzy at this point, though, to be fair.

@gadomski gadomski added the documentation Improvements or additions to documentation label Apr 3, 2025
ka7eh pushed a commit to ka7eh/pystapi that referenced this issue Apr 3, 2025
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]>
@gadomski gadomski added the [package] stapi-fastapi FastAPI server implementation label Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation [package] stapi-fastapi FastAPI server implementation
Projects
No open projects
Development

No branches or pull requests

1 participant