0

I'd like to generate enum properties as string but when I use the NSwagStudio or Unchase OpenApi extension for VS2019 for generating C# client code, there is no specific property to do this. In the properties file ConnectedServices.json there are these fields:

  "typeNameGeneratorType": null,
  "propertyNameGeneratorType": null,
  "enumNameGeneratorType": null,

As last chance I'd like to implement my custom enumNameGeneratorType but I cannot find any documentation on the web.

The swagger.json file contains this enum:

"status": {
  "type": "string",
  "description": "The status of the item",
  "example": "Open",
  "enum": [
    "Open"
  ]
}

Unless there is an automated way, I would not want to modify the swagger.json before importing it, as it is provided by a vendor. Is there any way to achieve this?

Marco Di Scala
  • 424
  • 1
  • 7
  • 18

0 Answers0