title: Net Core API: Purpose of ProducesResponseType
body: <p>I want to understand the purpose of <code>ProducesResponseType.</code></p>
  <p>Microsoft defines as <code>a filter that specifies the type of the value and status code returned by the action.</code></p>
  <p>So I am curious what are consequences if</p>
  <ul>
  <li>a person does not place ProductResponseType?</li>
  <li>How is system at a disadvantage, or is there negative consequence?</li>
  <li>Doesn't Microsoft API already automatically inherently know the type/value of status code returned?</li>
  </ul>
  <pre><code>[ProducesResponseType(typeof(DepartmentDto), StatusCodes.Status200OK)]
  [ProducesResponseType(StatusCodes.Status404NotFound)]
  </code></pre>
  <p>Documentation from the Microsoft: <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.producesresponsetypeattribute?view=aspnetcore-2.2" rel="noreferrer">ProducesResponseTypeAttribute Class</a></p>