swagger-api / swagger-api/swagger-codegen

Python: proper support for binary typeMapping

Open
#7,900 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

Hi all,

binary typeMapping could probably be better handled by python 2/3 portable six.binary_type.

There's already a TODO in master branch and I'd be happy to help with that but unfortunately I'm not (anymore) proficient in java language, nor on this codebase.
Is that really trivial as it seems, that is just putting the proper python types in between quotes ?

Anyway, this could unlock kubernetes-client/python#494 and so I came to beg for some help :)
Otherwise I'll try to take a look on this after refreshing a bit my rusty java skillz.

Thank you, regards !

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the TODO in modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java and inspect how Python typeMapping handles binary values. Compare the generated Python types with six.binary_type for Python 2/3 portability; the work is done when binary mappings generate the appropriate portable type and support the linked Kubernetes client use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, python
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.