title: AspNetCore Custom/Explicit Swagger OperationId
body: <p>I am creating restful APIs using aspnet core 2.2. I have a standard setup where each model has it's own controller with a <code>GET</code> and a <code>POST</code> actions. I am using <code>Swashbuckle.AspNetCore</code> NUGET package and using <a href="https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle" rel="nofollow noreferrer">this</a> article from Microsoft docs.</p>
  
  <p>Now, when I look at the generated swagger file, it has multiple GET and POST operationIds. How can I configure custom operationIds without using <code>Swashbuckle.AspNetCore.Annotations</code>?</p>
  
  <p>Here's what my Action methods look like:</p>
  
  <pre><code>[HttpPost]
  [ProducesResponseType(200)]
  [ProducesResponseType(400)]
  [ProducesResponseType(500)]
  public async Task&lt;ActionResult&lt;Response&gt;&gt; PostAsync([FromBody]Request request)
  {
      Response result = await _context.PostAsync(request);
      return Ok(result);
  }
  </code></pre>
  
  <p>I have multiple controllers, they're all following the same pattern.</p>
  
  <p>My Startup class looks like this:</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
      services.AddSwaggerGen(c =&gt;
      {
          c.SwaggerDoc("v1", new Info { Title = "My API", Version = "v1" });
      });
  
      ...
  }
  
  public void Configure(IApplicationBuilder app, IHostingEnvironment env)
  {
      app.UseSwagger();
  
      app.UseSwaggerUI(c =&gt;
      {
          c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
      });
  
      ...
  }
  </code></pre>
  
  <p>I have already looked at <a href="https://stackoverflow.com/questions/52262826/asp-net-core-swashbuckle-set-operationid?rq=1">this</a> solution, but don't want to go that route.</p>