Skip to content

Commit 6461fab

Browse files
committed
docs
1 parent b3cf412 commit 6461fab

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.changeset/read_only_props.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
default: minor
3+
---
4+
5+
# Omitting `readOnly` properties from request bodies
6+
7+
OpenAPI allows any object property to be marked as `readOnly: true`, meaning that the server does not allow that property to be updated in a request. OpenAPI does not specifically define "updated", but some servers may interpret it to mean that no value should be serialized for the property at all.
8+
9+
You can now tell `openapi-python-client` to omit read-only properties when serializing a schema, if and only if it is being serialized as part of a request body. This behavior is only enabled if you set `skip_sending_read_only_properties: true` in your configuration.
10+
11+
Regardless of this option, read-only properties will still be deserialized normally in responses, and the behavior of the object's `to_dict` method is unchanged in all other contexts.

0 commit comments

Comments
 (0)