vmware / vmware-openapi-generator

VMware-openapi-generator tool generates open-api documents from vapi metamodel format.
Other
23 stars 19 forks source link

Changes to replace . with _ in the model reference #51

Closed kunal-pmj closed 4 years ago

kunal-pmj commented 4 years ago

Signed-off-by: Kunal Singhsinghk@vmware.com

kunal-pmj commented 4 years ago

This will fix following issue : https://github.com/vmware/vmware-openapi-generator/issues/50

sreeshas commented 4 years ago

Is "_" the preferred option always? How would this change affect other languages?

kunal-pmj commented 4 years ago

Some generators like java and Python handle "." by replacing it with _ or CamelCasing it.

sreeshas commented 4 years ago

So replacing . with _ might break those generators. Ideally generators should not influence spec. If majority of generators are okay with ".", we should leave it as it is. typescript generator can add the functionality to replace "." to whatever is reasonable.