Skip to content

[BUG] [Python] - license format #21619

@Huluti

Description

@Huluti

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
Description

pyproject.toml file had a format change.

Previous:
licence: "MIT"

Now:
license = { text = "MIT" }

Source: https://python-poetry.org/docs/pyproject/#license

Not following this change leads to this error when trying to upload the package generated to PyPi:

ERROR    InvalidDistribution: Invalid distribution metadata: unrecognized or    
         malformed field 'license-expression' 

Also, I did not find a way to change the license used by setting a var in config file.

openapi-generator version

7.14.0

Suggest a fix

Use this new format in pyproject.mustache file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions