-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
In Open Api spec, https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#fixed-fields-20, there is the following statement:
If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only.
Therefore, if a field is set as required and readOnly, it should not be considered as optional in the type used by server stubs since it must be in the response.
Since #547 however, all read-only fields have been defined as pointers in the generated types even if there are in the required list. Could we make the generation of types different whether it is for consumption by clients or by servers so that, the presence of required read-only fields is enforced in response and required write only-fields in requests?