[aspnetcore] Setting properties of a model in server that are readOnly for client
Created by: HOTAPIYC
Description
I am working on a project that uses a generated C# ASP.NET core server-stub. The project is on .NET 6. There are a number of parameters in the API that are specified as readOnly: true
for the client. However on the serverside I do want to write these fields. The model template assigns these parameters a private set
. How am I supposed to write in this case? There is also no constructor.
openapi-generator version
v5.1.0
Suggest a fix/enhancement
Temporary solution to this problem is to customize the template and remove the private
attribute. I would prefer however not to do this and use the defaults instead. Is this a potential bug or am I missing something here?