CenterEdge / Yardarm

OpenAPI 3 SDK Generator for C#
Apache License 2.0
44 stars 6 forks source link

Api Client Naming Conventions #8

Open mmmasent opened 3 years ago

mmmasent commented 3 years ago

Currently, the clients generated seem to only reference the tag for the name, which may or may not be ideal. I believe OpenApi generator will suffix tags with Api so that clients generated will read more to what they are used for (i.e. a tag of Money seems to be generated into a client named IMoneyApi with open api, whereas the same client generated by yardarm would be name IMoney)

This is technically working as intended; this issue is more to start a discussion about how naming of the generated api clients should be resolved. If this should be opened as a different format/ticket/etc. somewhere else, please let me know!

mmmasent commented 3 years ago

My personal preference is for naming conventions to be more explicit as to the use of the variable/object so that it is easier to understand from a quick glance as to what the object is most likely being used for.

As an example, a client generated from the tag DockerContainer will, at the point of this issue, read IDockerContainer, which gives a different impression to me than the actual use of the client itself (i.e. a client calling an external api).

I've grown accustomed to the open api generated client names and believe those would work well here too, but anything more readable than IDockerContainer to the uasage will work for me.