How to create openapi parameter for azure function in pascal case?

Juan Pinzón 1 Reputation point

I am creating an azure function with open api support that receives a query parameter, this parameter should only allow a list of values, so I am using an enum as is showing in the following code:

[OpenApiOperation(operationId: "GetInformation", tags: new[] { "Information" })]  
[OpenApiParameter(name: "System", In = ParameterLocation.Query, Required = true, Type = typeof(SystemEnum), Description = "System that generates information")]  
public static async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "get", Route = "api/information")] HttpRequest req, ILogger log)  

To use the enum as string I am using the following enum

public enum SystemEnum  

But when the azure function is launched, the system parameter appears with camelCase naming:

Also in the swagger.json specification appears with camelcase naming:

How can I change this behavior? Or What Do I need to change to the code to change the enum to pascalcase?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,991 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,141 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce ( 35,416 Reputation points