swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

[RUBY] Bug generated code does not have inheritance

Open Ruubb opened this issue 1 year ago • 0 comments

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
  1. Download right swagger version
  2. Download json file
  3. Run the command provided above
  4. Look at the generated Ruby code
Related issues/PRs

N/A

Suggest a fix/enhancement

N/A

Ruubb avatar Feb 21 '24 09:02 Ruubb