Skip to content

Commit 8561138

Browse files
[#239] Updated API schema
1 parent ec88b85 commit 8561138

File tree

4 files changed

+26
-28
lines changed

4 files changed

+26
-28
lines changed

src/openklant/components/contactgegevens/api/schema.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"""
66
**Warning: Difference between `PUT` and `PATCH`**
77
8-
Both `PUT` and `PATCH` methods are used to update the fields in a resource,
8+
Both `PUT` and `PATCH` methods can be used to update the fields in a resource,
99
but there is a key difference in how they handle required fields:
1010
11-
> The `PUT` method requires you to specify **all mandatory fields** when updating a resource.
12-
If any mandatory field is missing, the update will fail.
11+
* The `PUT` method requires you to specify **all mandatory fields** when updating a resource.
12+
If any mandatory field is missing, the update will fail. Optional fields are left unchanged if they are not specified.
1313
14-
> The `PATCH` method, on the other hand, allows you to update only the fields you specify.
14+
* The `PATCH` method, on the other hand, allows you to update only the fields you specify.
1515
Some mandatory fields can be left out, and the resource will only be updated with the provided data,
1616
leaving other fields unchanged.
1717
"""

src/openklant/components/contactgegevens/openapi.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ info:
66
77
**Warning: Difference between `PUT` and `PATCH`**
88
9-
Both `PUT` and `PATCH` methods are used to update the fields in a resource,
9+
Both `PUT` and `PATCH` methods can be used to update the fields in a resource,
1010
but there is a key difference in how they handle required fields:
1111
12-
> The `PUT` method requires you to specify **all mandatory fields** when updating a resource.
13-
If any mandatory field is missing, the update will fail.
12+
* The `PUT` method requires you to specify **all mandatory fields** when updating a resource.
13+
If any mandatory field is missing, the update will fail. Optional fields are left unchanged if they are not specified.
1414
15-
> The `PATCH` method, on the other hand, allows you to update only the fields you specify.
15+
* The `PATCH` method, on the other hand, allows you to update only the fields you specify.
1616
Some mandatory fields can be left out, and the resource will only be updated with the provided data,
1717
leaving other fields unchanged.
1818
contact:

src/openklant/components/klantinteracties/api/schema.py

+9-10
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"""
66
**Warning: Difference between `PUT` and `PATCH`**
77
8-
Both `PUT` and `PATCH` methods are used to update the fields in a resource,
8+
Both `PUT` and `PATCH` methods can be used to update the fields in a resource,
99
but there is a key difference in how they handle required fields:
1010
11-
> The `PUT` method requires you to specify **all mandatory fields** when updating a resource.
12-
If any mandatory field is missing, the update will fail.
11+
* The `PUT` method requires you to specify **all mandatory fields** when updating a resource.
12+
If any mandatory field is missing, the update will fail. Optional fields are left unchanged if they are not specified.
1313
14-
> The `PATCH` method, on the other hand, allows you to update only the fields you specify.
14+
* The `PATCH` method, on the other hand, allows you to update only the fields you specify.
1515
Some mandatory fields can be left out, and the resource will only be updated with the provided data,
1616
leaving other fields unchanged.
1717
"""
@@ -20,10 +20,9 @@
2020
"""
2121
**Atomicity in Partij and PartijIdentificator**
2222
23-
Starting from version **2.7.0**, the `Partij` endpoint has been modified to handle
24-
`PartijIdentificator` objects more effectively,
23+
The `Partij` endpoint handles `PartijIdentificator` objects more effectively,
2524
allowing them to be processed within the same request.
26-
This ensures that both entities are handled atomically, preventing incomplete,
25+
This ensures that both entities are handled atomically, preventing incompleteness,
2726
and offering better control over the uniqueness of `PartijIdentificator` objects.
2827
2928
For `POST`, `PATCH`, and `PUT` requests for `Partij`,
@@ -37,11 +36,11 @@
3736
- If the **UUID** is provided in the `PartijIdentificator` object,
3837
the endpoint will treat it as an update operation for the existing `PartijIdentificator`,
3938
applying the provided data and linking the parent `Partij` to the new one created.
40-
- If the **UUID** is **not** specified, the system will create a new resource
41-
for the `PartijIdentificator` respecting all uniqueness constraints.
39+
- If the **UUID** is **not** specified, the system will create a new
40+
`PartijIdentificator` instance respecting all uniqueness constraints.
4241
- `PATCH` or `PUT` requests:
4342
- If the **UUID** is provided in the `PartijIdentificator` object,
44-
the system will update the specified resource with the new data.
43+
the system will update the specified instance with the new data.
4544
- If the **UUID** is **not** specified, the system will `DELETE` all `PartijIdentificator`
4645
objects related to the parent and `CREATE` new ones with the passed data.
4746
"""

src/openklant/components/klantinteracties/openapi.yaml

+9-10
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ info:
66
77
**Warning: Difference between `PUT` and `PATCH`**
88
9-
Both `PUT` and `PATCH` methods are used to update the fields in a resource,
9+
Both `PUT` and `PATCH` methods can be used to update the fields in a resource,
1010
but there is a key difference in how they handle required fields:
1111
12-
> The `PUT` method requires you to specify **all mandatory fields** when updating a resource.
13-
If any mandatory field is missing, the update will fail.
12+
* The `PUT` method requires you to specify **all mandatory fields** when updating a resource.
13+
If any mandatory field is missing, the update will fail. Optional fields are left unchanged if they are not specified.
1414
15-
> The `PATCH` method, on the other hand, allows you to update only the fields you specify.
15+
* The `PATCH` method, on the other hand, allows you to update only the fields you specify.
1616
Some mandatory fields can be left out, and the resource will only be updated with the provided data,
1717
leaving other fields unchanged.
1818
contact:
@@ -5790,10 +5790,9 @@ tags:
57905790
57915791
**Atomicity in Partij and PartijIdentificator**
57925792
5793-
Starting from version **2.7.0**, the `Partij` endpoint has been modified to handle
5794-
`PartijIdentificator` objects more effectively,
5793+
The `Partij` endpoint handles `PartijIdentificator` objects more effectively,
57955794
allowing them to be processed within the same request.
5796-
This ensures that both entities are handled atomically, preventing incomplete,
5795+
This ensures that both entities are handled atomically, preventing incompleteness,
57975796
and offering better control over the uniqueness of `PartijIdentificator` objects.
57985797
57995798
For `POST`, `PATCH`, and `PUT` requests for `Partij`,
@@ -5807,11 +5806,11 @@ tags:
58075806
- If the **UUID** is provided in the `PartijIdentificator` object,
58085807
the endpoint will treat it as an update operation for the existing `PartijIdentificator`,
58095808
applying the provided data and linking the parent `Partij` to the new one created.
5810-
- If the **UUID** is **not** specified, the system will create a new resource
5811-
for the `PartijIdentificator` respecting all uniqueness constraints.
5809+
- If the **UUID** is **not** specified, the system will create a new
5810+
`PartijIdentificator` instance respecting all uniqueness constraints.
58125811
- `PATCH` or `PUT` requests:
58135812
- If the **UUID** is provided in the `PartijIdentificator` object,
5814-
the system will update the specified resource with the new data.
5813+
the system will update the specified instance with the new data.
58155814
- If the **UUID** is **not** specified, the system will `DELETE` all `PartijIdentificator`
58165815
objects related to the parent and `CREATE` new ones with the passed data.
58175816
- name: rekeningnummers

0 commit comments

Comments
 (0)