RapiPdf
RapiPdf copied to clipboard
Feature request: Support for x-enumNames
This is a custom property from NSwag. So e.g. a C# enum looks like the following in the OpenAPI spec:
public enum DataType {
String,
Integer
}
{
...
"DataType": {
"type": "integer",
"description": "",
"x-enumNames": [
"String",
"Integer"
],
"enum": [
1,
2
]
}
...
}
The RapiPDF doc currently tells users they can use 1 or 2 which is technically correct, but not so helpful. We can add a description manually, but it would be great to take this information from the spec automatically when it's available.
Still quite useful but in the meantime I've realised that I can work around this in NSwag by turning on the "generateEnumMappingDescription": true, option in nswag.json to generate the mappings as a description.