swagger-codegen
swagger-codegen copied to clipboard
[RUBY] Bug generated code does not have inheritance
Description
I am trying to generate ruby code for the .json file provided below. It generates fine, but the code that comes out of it does not have any inheritance, while in the code it uses super, so it should clearly have that. When I try to generate the c# code for it, it does have the expected (not sure if it's correct yet) inheritance. Examples
[DataContract]
public partial class AuthenticationCommand : Command, IEquatable<AuthenticationCommand>, IValidatableObject
class AuthenticationCommand
attr_accessor :action_uid
attr_accessor :pwd
attr_accessor :user_name
.....
def initialize(attributes = {})
# call parent's initialize
super(attributes)
Swagger-codegen version
wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.52/swagger-codegen-cli-3.0.52.jar -O swagger-codegen-cli.jar
3.0.52
Swagger declaration file content or url
https://gist.github.com/Ruubb/0724a4d471f4363ebedde7ff6006fce9
Command line used for generation
java -jar swagger-codegen-cli.jar generate -i openapi_clean.json -l ruby -o /path/
Steps to reproduce
- Download right swagger version
- Download json file
- Run the command provided above
- Look at the generated Ruby code
Related issues/PRs
N/A
Suggest a fix/enhancement
N/A