Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

docs: remove refs to InferringRouter as it is deprecated #239

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ This package includes a number of utilities to help reduce boilerplate and reuse

* **Resource Class**: Create CRUD with ease the OOP way with `Resource` base class that lets you implement methods quick.
* **Class Based Views**: Stop repeating the same dependencies over and over in the signature of related endpoints.
* **Response-Model Inferring Router**: Let FastAPI infer the `response_model` to use based on your return type annotation.
* **Repeated Tasks**: Easily trigger periodic tasks on server startup
* **Timing Middleware**: Log basic timing information for every request
* **OpenAPI Spec Simplification**: Simplify your OpenAPI Operation IDs for cleaner output from OpenAPI Generator
Expand Down
5 changes: 2 additions & 3 deletions docs/src/class_based_views2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
from uuid import UUID

import sqlalchemy as sa
from fastapi import Depends, FastAPI, Header, HTTPException
from fastapi import Depends, FastAPI, Header, HTTPException, APIRouter
from sqlalchemy.orm import Session, declarative_base
from starlette.status import HTTP_403_FORBIDDEN, HTTP_404_NOT_FOUND

from fastapi_restful.api_model import APIMessage, APIModel
from fastapi_restful.cbv import cbv
from fastapi_restful.guid_type import GUID
from fastapi_restful.inferring_router import InferringRouter

# Begin Setup
UserID = NewType("UserID", UUID)
Expand Down Expand Up @@ -54,7 +53,7 @@ def get_owned_item(session: Session, owner: UserID, item_id: ItemID) -> ItemORM:

# End Setup
app = FastAPI()
router = InferringRouter() # Step 1: Create a router
router = APIRouter() # Step 1: Create a router


@cbv(router) # Step 2: Create and decorate a class to hold the endpoints
Expand Down
33 changes: 0 additions & 33 deletions docs/src/inferring_router2.py

This file was deleted.

47 changes: 0 additions & 47 deletions docs/user-guide/inferring-router.md

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ nav:
- User Guide:
- Class Resource: 'user-guide/class-resource.md'
- Class Based Views: 'user-guide/class-based-views.md'
- Inferring Router: 'user-guide/inferring-router.md'
- Repeated Tasks: 'user-guide/repeated-tasks.md'
- Timing Middleware: 'user-guide/timing-middleware.md'
- SQLAlchemy Sessions: 'user-guide/session.md'
Expand Down