Attributes modifying Swagger output parameters

I understand I can intercept the ApiDeclarationFilter to modify the json generated for Swagger output, but is there a built-in attribute to allow explicit naming of the operationId?
For example, it currently names RenderSnippetContentByName as
and I was wondering if I could add something like [SwaggerOperation("GetRenderSnippetContentByName")] to override the value that the existing supercalifragilisticexpialidocious() function generates :smile:
I know we don’t see this value in the UI, but codegen libraries for client-side use it for their method name.

These very long operation names are generated because in Open API specification all operation ids must be unique.

public class RenderSnippetContentByNameRequest {
 /* .... */

must have different operation ids for these routes, otherwise invalid Open API declaration will be produced. Moreover this unique operation id must be generated for each supported verb. Azure autorest generator adds additional constraint that these vebs must be added after underscore (_Get, _Post etc) to operation name. That’s why it’s implemented in such way (RequestName+Params+_Verb). If you have ideas how naming of operation ids can be simplified with keeping it unique and compatible to Azure autorest it would be great to hear them. I think we can remove using of params if only one route is used per DTO but need to check first that it won’t break generating clients using autorest.

Yes, I guessed that they needed to be unique.
We’re using CQRS (obviously, it’s SS) so apart from when multiple verbs are created for the same request, it’s already unique to the request name.
My fix is this:

Dictionary<string, int> results = new Dictionary<string, int>();
void UniquifyCall(string verb, OpenApiOperation op)
    if (op == null) return;
    op.OperationId = op.RequestType.EndsWith("Request") ? op.RequestType.Substring(0,op.RequestType.Length-7) : op.RequestType;
    if (!results.ContainsKey(op.RequestType))
        results.Add(op.RequestType, 1);
        op.OperationId += "_" + verb;

Plugins.Add(new OpenApiFeature(){ OperationFilter = UniquifyCall });

An attribute override for functions known to generate duplicates would be nice, but this code means unique friendly names for most methods (unless I’m missing something)