title: How to remove auto-generated fields from DRF - Swagger UI
body: <p>I've a model where few fields are auto-generated. How do I hide those fields from the Swagger UI during POST request? Following is the example:-</p>
  
  <pre><code>class ModelX(models.Model):
      a = models.CharField()
      b = models.CharField()
      c = models.CharField()
      d = models.CharField()
  </code></pre>
  
  <p>Below is my serialzer:-</p>
  
  <pre><code>class Serializerx(serializers.Serializer):
      class Meta:
          model = ModelX
          fields = '__all__
  </code></pre>
  
  <p>In the above model, fields <code>b</code> and <code>d</code> are auto generated from my code, which means these fields are not required as an input from the user.</p>
  
  <p>If I add <code>b</code> and <code>d</code> as read-only fields, then I wont be able to create an object with these values.</p>
  
  <p>How do I hide some attributes from the payload request.? Somewhat similar to <a href="https://stackoverflow.com/questions/39973840/hidden-fields-in-swagger-ui">this</a></p>