readOnly - Java generation to PDF
Hello, I am using the swagger and i stucked on readOnly attribute. If i use it in swagger editor and generate HTML doc then everything is alright, but if i generate PDF doc then i cannot see readOnly flag in whole documentation. I would add readOnly attribute to tables as column in definitions section where are described objects. How can i do that ? I am using the latest version of swagger."readOnly" and "required" C# properties generation
Dears Please help me with readOnly property generation I've found that properties declared with readOnly -oneOf are generated with Object data type. Customer: type: object required: - "ClientTypeId" properties: ClientTypeId: type: "integer" format: "int32" ClientType: readOnly: true allOf: - $ref: '#/definitions/ClientType' definitions: ClientType: type: object required: - "ClientTypeId" properties: ClientTypeId: type: "integer" format: "int32" Description: type: "string" LegalType: type: "boolean" ClientType is generated as /// <summary> /// Gets or Sets ClientType /// </summary> [DataMember(Name="ClientType")] public Object ClientType { get; set; } however I expected that it will get strongly typed property ClientType according to the definition additionally ClientTypeId is generated as Nullable<int> property but I expect that it will be generated like int ClientTypeId: /// <summary> /// Gets or Sets ClientTypeId /// </summary> [Required] [DataMember(Name="ClientTypeId")] public int? ClientTypeId { get; set; } I used both online generatorhttps://generator.swagger.io/api/gen/servers/aspnetcore and offline swagger-codegen (https://github.com/swagger-api/swagger-codegen) at master. Is it possible to get ClientType to be generated as public ClientType ClientType { get; set; } ? Regards