swagger-api / swagger-api/swagger-codegen

Python codegen produces insufficient setup.py file

Open
#12,018 1 comment 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

Python codegen produces insufficient setup.py file.

The generated setup.py file:

# coding: utf-8

"""
    MACHINA Common

    These are the MACHINA common models.  # noqa: E501

    OpenAPI spec version: 0.21.2
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from setuptools import setup, find_packages  # noqa: H301

NAME = "swagger-client"
VERSION = "1.0.0"

It is missing the REQUIRES array and setup function.

Swagger-codegen version

3.0.36

Command line used for generation
swagger-codegen generate -i api/machina-common-swagger.yaml -l python -o ./tmp/

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

Reproduce the issue with the documented swagger-codegen command and inspect the Python codegen template responsible for the generated setup.py. Confirm that the generated file includes the missing REQUIRES array and setup function, then verify the resulting Python package can be set up successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.