File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,18 @@ In this way our components are loosely coupled and the application logic
21
21
(the domains package) is completely independent of the chosen framework
22
22
and the persistence layer.
23
23
24
- ## HTTP API Docs
24
+ ## HTTP API Docs and versioning
25
25
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 .
28
28
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.
30
31
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)
34
36
35
37
## Package layers
36
38
You can’t perform that action at this time.
0 commit comments