swagger-api / swagger-api/swagger-codegen
Python: proper support for binary typeMapping
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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