Skip to content

Commit ddf0cc1

Browse files
[#239] Updated API schema
1 parent 0b96b45 commit ddf0cc1

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:
@@ -5725,10 +5725,9 @@ tags:
57255725
57265726
**Atomicity in Partij and PartijIdentificator**
57275727
5728-
Starting from version **2.7.0**, the `Partij` endpoint has been modified to handle
5729-
`PartijIdentificator` objects more effectively,
5728+
The `Partij` endpoint handles `PartijIdentificator` objects more effectively,
57305729
allowing them to be processed within the same request.
5731-
This ensures that both entities are handled atomically, preventing incomplete,
5730+
This ensures that both entities are handled atomically, preventing incompleteness,
57325731
and offering better control over the uniqueness of `PartijIdentificator` objects.
57335732
57345733
For `POST`, `PATCH`, and `PUT` requests for `Partij`,
@@ -5742,11 +5741,11 @@ tags:
57425741
- If the **UUID** is provided in the `PartijIdentificator` object,
57435742
the endpoint will treat it as an update operation for the existing `PartijIdentificator`,
57445743
applying the provided data and linking the parent `Partij` to the new one created.
5745-
- If the **UUID** is **not** specified, the system will create a new resource
5746-
for the `PartijIdentificator` respecting all uniqueness constraints.
5744+
- If the **UUID** is **not** specified, the system will create a new
5745+
`PartijIdentificator` instance respecting all uniqueness constraints.
57475746
- `PATCH` or `PUT` requests:
57485747
- If the **UUID** is provided in the `PartijIdentificator` object,
5749-
the system will update the specified resource with the new data.
5748+
the system will update the specified instance with the new data.
57505749
- If the **UUID** is **not** specified, the system will `DELETE` all `PartijIdentificator`
57515750
objects related to the parent and `CREATE` new ones with the passed data.
57525751
- name: rekeningnummers

0 commit comments

Comments
 (0)