-
Notifications
You must be signed in to change notification settings - Fork 8
Protein fails to generate proper code when objects have dots in their name #29
Comments
I'm checking the problem you describe but I'm not sure if it's a generator problem or a definition problem. I explain, if the definition must be the final name of the class why you define it with dots instead of using the correct naming instead? We can debate it if you're not agree. |
here is a snippet.
@delete("/api/sections/{id}")
|
Hi @yudhir ! Why you named a reference that way? Since a reference should be a model from your definition, is there any reason for that? Please could you post the definition of Section-section.read? Thanks! |
yes it was autogenerated from api-platform and probably a result of intenal Joins and Serialization and Normalization rules. here is my swagger
OpenaApi gen i think used SectionMinusSectionRead to get around this . I need an Rx, Retrofit solution , that is not available on the openapi-gen and swagger-gen . |
Describe the bug
Protein is a really cool tool, I like it! However, it has failed to generate right names for data classes.
Generated classes are like "data class Class.V1.API.Model", and their names are put in Kotlin captions ``.
To Reproduce
Just add dots in the object names in JSON file.
Example:
Expected behavior
The easiest way would be to trim dots and generate clients with CapitalCase naming convenetion (or camelCase):
CompanyMyAwesomeApiContractsV1SpecificSecondSpecific
The JSON file cannot be changed since it is generated via .NET code and they use dots for namespaces.
Info Required
Which version of the plugin do you actually use?
The latest one - 1.1.2
Any other thing that could help me to reproduce the error?
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: