title: How to reference to an ID of another model definition in Swagger
body: <p>Let's assume I have a User and a UserType model. I would like to add a reference to the UserType-ID in the User model. The swagger documentation only shows how to reference to another (whole) model, not just to one of it's properties.</p>
  
  <p>So I was wondering it it's even possible to reference only to a property of another model definition.</p>
  
  <pre><code>"definitions": {
      "User": {
          "required": [
              "username",
              "typeId"
          ],
          "properties": {
              "id": {
                  "type": "integer",
                  "format": "int32"
              },
              "username": {
                  "type": "string"
              },
              "typeId": {
                  "$ref": "UserType.id" // ==&gt; this doesn't work! and without
                                        // the ".id" part it would include all
                                        // the properties of UserType
              }
          }
      },
      "UserType": {
          "required": [
              "name"
          ],
          "properties": {
              "id": {
                  "type": "integer",
                  "format": "int32"
              },
              "name": {
                  "type": "string"
              }
          }
      }
  }
  </code></pre>
  
  <p>Or is that not possible at all and it should always be just:</p>
  
  <pre><code>"definitions": {
      "User": {
          ...
          "properties": {
              "typeId": {
                  "type": "integer",
                  "format": "int32"
              }
          }
      },
      ...
  }
  </code></pre>