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
  • Issues
  • #8014
Closed
Open
Issue created Nov 24, 2020 by Administrator@rootContributor

[BUG] [Python] validate_and_convert_types does not pass _check_type to attempt_convert_item

Created by: fbl100

Bug Report Checklist

  • [ No] Have you provided a full/minimal spec to reproduce the issue?
  • [No ] Have you validated the input using an OpenAPI validator (example)?
  • [ Yes] Have you tested with the latest master to confirm the issue still exists?
  • [ Yes] Have you searched for related issues/PRs?
  • [ N/A] What's the actual output vs expected output?
  • [ No] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

The Python module's type validation fails on my model. It is unclear why this fails, but when using _check_input_type and _check_return_type to bypass the type validation, I find that there are times where it is still attempting to validate. I tracked this down to model_utils.mustache. It appears that the _check_type flag is not being passed into 'attempt_convert_item'. I do not know if this is by design, but passing this parameter along solved my issue. I will submit a PR with the update.

openapi-generator version

5.0.0-SNAPSHOT

OpenAPI declaration file content or url

I do not have a model definition that reproduces this. I cannot upload my model

Generation Details

N/A

Steps to reproduce

N/A

Related issues/PRs

N/A

Suggest a fix

add 'check_type=_check_type' to the 'attempt_convert_item' call on line 1122 (as of commit b5ce7cec)

Assignee
Assign to
Time tracking