oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

Custom Name Normalizer?

Open lcrownover opened this issue 1 year ago • 1 comments

I couldn't find anything in the existing issues for this, but I'm hoping it's possible somehow.

The API I'm generating against has endpoints that are versioned:

"/slurm/v0.0.41/nodes/": { ... }

And the outputted types are then named:

V0041OpenapiNodesResp

I want to be able to strip out the V0041 from all the types. I can do this pretty easily with awk, but I don't want to introduce more build dependencies unless necessary. Is there a built-in way to create my own name-normalizer function that I can reference in my config.yml file?

lcrownover avatar Sep 19 '24 19:09 lcrownover

I have a similar thing where every API endpoint for the API is prefixed with /web/api/v2.1 and all of the functions come out named WebApixxxxx

UVduane avatar Sep 23 '24 21:09 UVduane