question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`Client` suffix for Swagger title and Autorest

See original GitHub issue

Hi @amarzavery @fearthecowboy @markcowl

I see that regularly now, new Swagger files remove the Client suffix from the title in Swagger (recently new Storage 2015-05-01, changed from StorageManagementClient to StorageManagement). I remember having a discussion with @amarzavery where he told me that this is a good behavor, since the Swagger file can describe also the server and is not client only. BUT Autorest might add Client to the main class name if not present.

I wanted to check with you what you think about this. Since this is the only breaking change for the new Storage file in Python, I’d like to have your feeling before release it (if Autorest adds a Client suffix in the main class name if not present, this is not breaking). If generated clients should not have Client and have to follow strictly the title, (and the client should be named StorageManagement for the storage example), that’s ok too (I saw the C# PR integrates the change, so it might be on purpose). Just tell me 😃

Thanks!

FYI @annatisch

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
fearthecowboycommented, Dec 13, 2016

Ah, yeah, dammit. That’s Why.

The change should only affect *Azure generators, so GetClientName has to be overridden in all the CodeNamer??a implementations. (and one has to be created for the ones that don’t have one.

sigh

And, now that I think deeper about it, there’s a bit more to it.

Leave it for today, If I can recover enough, I’ll be in tomorrow, and we can finish solving this right.

1reaction
fearthecowboycommented, Jan 18, 2017

Sorry, I’ve been in the middle of XmlSerialization stuff. Lemme see if I can get to it this afternoon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Naming AutoRest generated method names using Swagger
When I generate a client for the service, the client has an interface IResourcesOperations , where Resources is the name of the controller....
Read more >
How to use AutoRest with RDP - Refinitiv Developer Community
This article demonstrates how to use AutoRest to generate client libraries for RDP services. AutoRest Overview. AutoRest is an OpenAPI (Swagger) specification ...
Read more >
Seven Tips For Using Swagger And AutoRest Together In ...
The path to swagger.json by default will be /swagger/<name> where <name> ... AutoRest will generate models for the client from the swagger ...
Read more >
Parameter Serialization - Swagger
explode (true/false) specifies whether arrays and objects should generate separate parameters for each array item or object property. OpenAPI serialization ...
Read more >
Don't write your Web API Client code - Medium
Pro tip: Always look to follow name conventions on your solutions. In this case, I named this Class Library with the suffix .Client...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found