postmanlabs / postmanlabs/postman-code-generators
python codegen makes HTTPSConnection on http scheme
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 381
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
python codegen generates the HTTPSConnection when the url is http scheme.
To Reproduce
use python codegen based on http.client lib.
and the url is the http scheme.
see details on the screenshot.
Expected code snippet and corresponding request
it's supposed to be http.client.HTTPConnection instead of http.client.HTTPSConnection
Screenshots


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 by locating the Python http.client generator and the logic that selects the connection class from the URL scheme. Reproduce the issue with an HTTP URL, then verify that generated code uses http.client.HTTPConnection rather than HTTPSConnection. The screenshots and expected snippet provide the completion check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100