autorest icon indicating copy to clipboard operation
autorest copied to clipboard

x-ms-external types should not require for properties to be declared

Open iouri-s opened this issue 10 years ago • 3 comments

Repro: In a JSON spec declare a type definition:

    "CloudError": {
      "x-ms-external": true
    }

Declare a response using it:

          "default": { "schema": { "$ref": "#/definitions/CloudError" } }

Result - generated code deserializes errors to System.Object, instead of CloudError

iouri-s avatar Jan 29 '16 17:01 iouri-s

Why should x-ms-external not allow properties to be declared? That would break an important scenario: When you have modeled a type in Swagger but discover that AutoRest cannot yet generate optimal code for it. In this case x-ms-external is a convenient way of turning off codegen for a single type without completely removing it from the Swagger spec.

bitsforthought avatar Apr 25 '16 22:04 bitsforthought

You are correct, x-ms-external should be allowed. Thanks for the correction!

iouri-s avatar Apr 25 '16 23:04 iouri-s

Howdy!

In our planning for driving towards a stable '1.0' release, I'm marking this issue as 'deferred' :zzz: and we're going to review it during the post-1.0 planning cycle.

It's not to say that we're not going to work on it, or that this isn't not important, but at the moment, we're picking and choosing the stuff we must do before 1.0. :horse_racing: :horse_racing: :horse_racing:

We'll make sure we pick this back up at that point. :tada:

fearthecowboy avatar Jun 15 '16 16:06 fearthecowboy