Skip to content

Commit d56a0cd

Browse files
committed
Update README.md
1 parent a5fed86 commit d56a0cd

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,18 @@ In this way our components are loosely coupled and the application logic
2121
(the domains package) is completely independent of the chosen framework
2222
and the persistence layer.
2323

24-
## HTTP API Docs
24+
## HTTP API Docs and versioning
2525

26-
This application uses [fastapi-versionizer](https://github.com/alexschimpf/fastapi-versionizer)
27-
to provide easy API schema version management.
26+
API documentation is provided by [FastAPI](https://fastapi.tiangolo.com/features/)
27+
on `/docs` and `/redoc` paths using OpenAPI format.
2828

29-
There are 3 different API documentation paths:
29+
I believe that versioning an API at resource level provides a much more
30+
flexible approach than versioning the whole API.
3031

31-
* `/api/v1/docs` and `/api/v1/redoc`: v1 OpenAPI schema
32-
* `/api/v2/docs` and `/api/v2/redoc`: v2 OpenAPI schema
33-
* `/docs` : non-versioned routes OpenAPI schema (e.g. health check endpoint)
32+
The example `books` domain provides 2 endpoints to demonstrate this approach
33+
34+
* `/api/books/v1` (POST)
35+
* `/api/books/v2` (POST)
3436

3537
## Package layers
3638

0 commit comments

Comments
 (0)