Each model should have 2 definitions. The first definition will contain only writeable by user properties and the second definition will contain all properties with reference to writeable ones.
This helps to tell API consumers to send only writeable properties to CREATE & UPDATE request in Swagger UI.
As per the new version 2.0, we moved to Open API specs with swagger v3. Where there is a dedicated option for readOnly specification. so I think it will be resolved automatically.
Each model should have 2 definitions. The first definition will contain only writeable by user properties and the second definition will contain all properties with reference to writeable ones.
This helps to tell API consumers to send only writeable properties to CREATE & UPDATE request in Swagger UI.
Example of swagger definitions.