title: Generating C# classes from Swagger model, how to handle $ref with Json.net?
body: <p>I am generating C# classes from Swagger exposed model.
  For now, I am using the provided petstore example</p>
  
  <p><a href="http://petstore.swagger.wordnik.com/api/api-docs/pet" rel="nofollow">http://petstore.swagger.wordnik.com/api/api-docs/pet</a></p>
  
  <p>The Json from this url contains the following:</p>
  
  <pre><code>"category": {
      "$ref": "Category"
  },
  </code></pre>
  
  <p>I tried to read this with Json.net by</p>
  
  <pre><code>[JsonProperty("$ref")]
  public string Ref { get; set; }
  </code></pre>
  
  <p>My purpose is to instanciate Swagger Object model thanks to Json.net, then to use it to generate the swagger-described model.</p>
  
  <p>It does not work and the object that holds this property remains <code>null</code> with no further exception (Also tries to set <code>IsReference = true</code>). It works when there is no <code>$ref</code>.</p>
  
  <p>What would be the best practice to handle this cleanly?</p>