postmanlabs / postmanlabs/postman-code-generators

python codegen makes HTTPSConnection on http scheme

Open
#673 0 comments 0 reactions 0 assignees View on GitHub

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
image
image

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.