title: Reusing choice definition in swagger generation with Django Rest Framework
body: <p>I have a Django (Django Rest Framework) webservice that uses <code>drf-yasg</code> to generate a <code>swagger.json</code> file. In the model, I have a couple of enums/choicefields that are used in more than one place. By default, <code>drf-yasg</code> defines the field inline for each occurrance:</p>
  
  <pre><code>Choices = serializers.ChoiceField(choices=['a', 'b', 'c'])
  
  class SomeObject(serializers.Serializer):
      field_1 = Choices
      field_2 = Choices
  </code></pre>
  
  <p>Produces the following definitions in the swagger file:</p>
  
  <pre><code>{
    "definitions": {
      "SomeObject": {
        "required": [ "field_1", "field_2" ],
        "type": "object",
        "properties": {
          "field_1": {
            "title": "Field 1",
            "type": "string",
            "enum": [ "a", "b", "c" ]
          },
          "field_2": {
            "title": "Field 1",
            "type": "string",
            "enum": [ "a", "b", "c" ]
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>This is a slight problem, since it makes client-codegen tools generate each enum as its own type, instead of reusing the definition. So instead I would like to create a swaggerfile like so:</p>
  
  <pre><code>{
    "definitions": {
      "Choices": {
        "title": "Field 1",
        "type": "string",
        "enum": [ "a", "b", "c" ]
      },
      "SomeObject": {
        "required": [ "field_1", "field_2" ],
        "type": "object",
        "properties": {
          "field_1": {
            "$ref": "#/definitions/Choices"
          },
          "field_2": {
            "$ref": "#/definitions/Choices"
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>Is it possible to enable this behaviour within the Django Rest Framework? </p>