title: How do I use Swagger with dynamic parameters from a Web API Action Method?
body: <p>I write my Web API controllers in a non-standard way where I get the parameters as  dynamic objects.</p>
  
  <p>This creates an issue with NSwag. Because there are no parameters in the method definition, NSwag cannot generate what is needed.</p>
  
  <p>I wonder if there is any option to use NSwag in this situation. Maybe there are some attributes that I can add to the methods so that NSwag will be able to generate the API?</p>
  
  <pre><code>[HttpPost]
  [ActionName("create-account")]
  public IHttpActionResult CreateAccount()
  {
      var body = Request.Content.ReadAsStringAsync().Result;
  
      dynamic json = Utils.GetJsonBody(body);
  
      if (!Utils.GetJsonPropertyValueByPropertyName&lt;String&gt;(json, "email", out String email))
      {
          return Content(HttpStatusCode.BadRequest, "Please provide a valid email.".AsApiMessageResult());
      }
  
      if (!Utils.GetJsonPropertyValueByPropertyName&lt;String&gt;(json, "name", out String name))
      {
          return Content(HttpStatusCode.BadRequest, "Please provide an account name.".AsApiMessageResult());
      }
  
      if (!Utils.GetJsonPropertyValueByPropertyName&lt;String&gt;(json, "domain", out String domain))
      {
          return Content(HttpStatusCode.BadRequest, "Please provide a valid domain.".AsApiMessageResult());
      } 
  </code></pre>