autorest icon indicating copy to clipboard operation
autorest copied to clipboard

Add support for generating one client from multiple swagger specs

Open stankovski opened this issue 10 years ago • 2 comments

  • When processing multiple swagger documents we will flatten them into one client (e.g. if swagger1 had operation groups foo1 and bar1 while swagger2 had operation group foo2, the resulting client will have foo1, foo2, and bar1 operation groups)
  • We will NOT generate ApiVersion property on the client
  • We will make ApiVersion constants inside each method (consumers will not be able to modify them)
  • If there are client level properties with conflicting names and data types, we will throw code generation error

stankovski avatar Feb 04 '16 23:02 stankovski

Just curious; What's the scenario for this?

bitsforthought avatar Feb 04 '16 23:02 bitsforthought

Compute team (and other teams will follow) are starting to have per-resource versioning where each "operation" will have it's own api version. This enhancement will allow us to support the new model without having the user to initialize multiple clients for compute operations.

stankovski avatar Feb 05 '16 15:02 stankovski