Skip to content

Commit a279c16

Browse files
authored
Merge pull request #71 from mts-ai/bump_version
bump version to 2.4.2
2 parents 6c1f9fd + b368696 commit a279c16

File tree

5 files changed

+73
-62
lines changed

5 files changed

+73
-62
lines changed

docs/changelog.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
Changelog
22
#########
33

4+
**2.4.2**
5+
*********
6+
7+
Separate helper methods for relationships query
8+
===============================================
9+
10+
* fix run validator: sometimes it requires model field by `@mahenzon`_ in `#70 <https://github.com/mts-ai/FastAPI-JSONAPI/pull/70>`_
11+
12+
Authors
13+
"""""""
14+
15+
* `@mahenzon`_
16+
417
**2.4.1**
518
*********
619

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
# The short X.Y version.
6767
version = "2.4"
6868
# The full version, including alpha/beta/rc tags.
69-
release = "2.4.1"
69+
release = "2.4.2"
7070

7171
# The language for content autogenerated by Sphinx. Refer to documentation
7272
# for a list of supported languages.

docs/quickstart.rst

Lines changed: 57 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -24,61 +24,61 @@ An example of FastAPI-JSONAPI API looks like this:
2424

2525
This example provides the following API:
2626

27-
+----------------+--------+----------------+---------------------------------+
28-
| url | method | endpoint | action |
29-
+================+========+================+=================================+
30-
| /users | GET | user_list | Retrieve a collection of users |
31-
+----------------+--------+----------------+---------------------------------+
32-
| /users | POST | user_list | Create a user |
33-
+----------------+--------+----------------+---------------------------------+
34-
| /users/<int:id> | GET | user_detail | Retrieve details of a user |
35-
+----------------+--------+----------------+---------------------------------+
36-
| /users/<int:id> | PATCH | user_detail | Update a user |
37-
+----------------+--------+----------------+---------------------------------+
38-
| /users/<int:id> | DELETE | user_detail | Delete a user |
39-
+----------------+--------+----------------+---------------------------------+
27+
+-----------------+--------+-------------+--------------------------------+
28+
| url | method | endpoint | action |
29+
+=================+========+=============+================================+
30+
| /users | GET | user_list | Retrieve a collection of users |
31+
+-----------------+--------+-------------+--------------------------------+
32+
| /users | POST | user_list | Create a user |
33+
+-----------------+--------+-------------+--------------------------------+
34+
| /users/<int:id> | GET | user_detail | Retrieve details of a user |
35+
+-----------------+--------+-------------+--------------------------------+
36+
| /users/<int:id> | PATCH | user_detail | Update a user |
37+
+-----------------+--------+-------------+--------------------------------+
38+
| /users/<int:id> | DELETE | user_detail | Delete a user |
39+
+-----------------+--------+-------------+--------------------------------+
4040

4141
in developing
4242

43-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
44-
| url | method | endpoint | action |
45-
+===========================================+========+==================+======================================================+
46-
| /users/<int:id>/group | GET | computer_list | Retrieve a collection computers related to a user |
47-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
48-
| /users/<int:id>/group | POST | computer_list | Create a computer related to a user |
49-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
50-
| /users/<int:id>/relationships/group | GET | user_computers | Retrieve relationships between a user and computers |
51-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
52-
| /users/<int:id>/relationships/computers | POST | user_computers | Create relationships between a user and computers |
53-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
54-
| /users/<int:id>/relationships/computers | PATCH | user_computers | Update relationships between a user and computers |
55-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
56-
| /users/<int:id>/relationships/computers | DELETE | user_computers | Delete relationships between a user and computers |
57-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
58-
| /computers | GET | computer_list | Retrieve a collection of computers |
59-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
60-
| /computers | POST | computer_list | Create a computer |
61-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
62-
| /computers/<int:id> | GET | computer_detail | Retrieve details of a computer |
63-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
64-
| /computers/<int:id> | PATCH | computer_detail | Update a computer |
65-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
66-
| /computers/<int:id> | DELETE | computer_detail | Delete a computer |
67-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
68-
| /computers/<int:id>/owner | GET | user_detail | Retrieve details of the owner of a computer |
69-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
70-
| /computers/<int:id>/owner | PATCH | user_detail | Update the owner of a computer |
71-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
72-
| /computers/<int:id>/owner | DELETE | user_detail | Delete the owner of a computer |
73-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
74-
| /computers/<int:id>/relationships/owner | GET | user_computers | Retrieve relationships between a user and computers |
75-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
76-
| /computers/<int:id>/relationships/owner | POST | user_computers | Create relationships between a user and computers |
77-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
78-
| /computers/<int:id>/relationships/owner | PATCH | user_computers | Update relationships between a user and computers |
79-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
80-
| /computers/<int:id>/relationships/owner | DELETE | user_computers | Delete relationships between a user and computers |
81-
+-------------------------------------------+--------+------------------+------------------------------------------------------+
43+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
44+
| url | method | endpoint | action |
45+
+=========================================+========+=================+=====================================================+
46+
| /users/<int:id>/group | GET | computer_list | Retrieve a collection computers related to a user |
47+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
48+
| /users/<int:id>/group | POST | computer_list | Create a computer related to a user |
49+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
50+
| /users/<int:id>/relationships/group | GET | user_computers | Retrieve relationships between a user and computers |
51+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
52+
| /users/<int:id>/relationships/computers | POST | user_computers | Create relationships between a user and computers |
53+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
54+
| /users/<int:id>/relationships/computers | PATCH | user_computers | Update relationships between a user and computers |
55+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
56+
| /users/<int:id>/relationships/computers | DELETE | user_computers | Delete relationships between a user and computers |
57+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
58+
| /computers | GET | computer_list | Retrieve a collection of computers |
59+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
60+
| /computers | POST | computer_list | Create a computer |
61+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
62+
| /computers/<int:id> | GET | computer_detail | Retrieve details of a computer |
63+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
64+
| /computers/<int:id> | PATCH | computer_detail | Update a computer |
65+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
66+
| /computers/<int:id> | DELETE | computer_detail | Delete a computer |
67+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
68+
| /computers/<int:id>/owner | GET | user_detail | Retrieve details of the owner of a computer |
69+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
70+
| /computers/<int:id>/owner | PATCH | user_detail | Update the owner of a computer |
71+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
72+
| /computers/<int:id>/owner | DELETE | user_detail | Delete the owner of a computer |
73+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
74+
| /computers/<int:id>/relationships/owner | GET | user_computers | Retrieve relationships between a user and computers |
75+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
76+
| /computers/<int:id>/relationships/owner | POST | user_computers | Create relationships between a user and computers |
77+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
78+
| /computers/<int:id>/relationships/owner | PATCH | user_computers | Update relationships between a user and computers |
79+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
80+
| /computers/<int:id>/relationships/owner | DELETE | user_computers | Delete relationships between a user and computers |
81+
+-----------------------------------------+--------+-----------------+-----------------------------------------------------+
8282

8383

8484
Save `this file <https://github.com/mts-ai/FastAPI-JSONAPI/blob/main/examples/api_for_sqlalchemy/main.py>`_ as api.py and run it using your Python interpreter. Note that we've enabled
@@ -154,13 +154,11 @@ Response:
154154
Relationships
155155
-------------
156156

157-
| Now let's use relationships tools.
158-
| First, create 3 computers named "Halo", "Nestor" and "Commodore".
159-
|
160-
| Done?
161-
| Ok. So let's continue this tutorial.
162-
|
163-
| We assume that Halo has id=2, Nestor id=3 and Commodore id=4.
157+
.. note::
158+
Now let's use relationships tools.
159+
First, create 3 computers named "Halo", "Nestor" and "Commodore".
160+
We assume that Halo has id=2, Nestor id=3 and Commodore id=4.
161+
164162

165163
Create object with related object(s)
166164
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

fastapi_jsonapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from fastapi_jsonapi.exceptions.json_api import HTTPException
99
from fastapi_jsonapi.querystring import QueryStringManager
1010

11-
__version__ = "2.4.1"
11+
__version__ = "2.4.2"
1212

1313
__all__ = [
1414
"init",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ packages = [
7272

7373
[tool.poetry]
7474
name = "fastapi-jsonapi"
75-
version = "2.4.1"
75+
version = "2.4.2"
7676
description = "FastAPI extension to create REST web api according to JSON:API specification"
7777
authors = [
7878
"Aleksei Nekrasov <nekrasov.aleks@mail.ru>",

0 commit comments

Comments
 (0)