Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !1098

[PythonClientCodeGen] Generated model for not inheriting attributes from parent

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/narenandu/python_client_inheritence_model_properties into master Sep 25, 2018
  • Overview 0
  • Commits 9872
  • Pipelines 0
  • Changes 1

Created by: narenandu

CC'ing technical committee: @taxpon @frol @mbohlool @cbornet @kenjones-cisco to review the pull request if your PR is targeting python programming language.

Description of the PR

It is kind of counter intuitive, but setting supportsInheritance = true is failing to get the properties from the parent when a child model inherits. Didn't dive deep in to the actual base class for the code generation, but commenting out the line from PythonClientCodegen.java fixed the issue.

This solves the reported issues

  • https://github.com/OpenAPITools/openapi-generator/issues/453 (@poli-granot)
  • https://github.com/OpenAPITools/openapi-generator/issues/623 (@emreakca)

There could be multiple reasons since I didn't go to the root cause

  • First that there is no AbstractPyCodegen.java, which might/might not tackle the issue
  • Second, we don't know if other code gen for languages like ObjcClientCodegen / PhpClientCodegen are working since, they also are using supportsInheritence = true in their generation code
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/narenandu/python_client_inheritence_model_properties