Modify typespec gen for '$ref' properties.

Ref could point to:
    * JSON object with it's own 'properties' (including abstract object)
    * to single with some constraints (e.g. string with length
    constraints)