swagger-api / swagger-api/swagger-codegen

OAS 3.1 support?

Open
#12,413 0 comments 10 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

When I tried to generate a Python client using the Swagger config file, field types were replaced with object like this:
image

So it seems that the current stable version of swagger codegen doesn't support OAS 3.1.

Swagger-codegen version

3.0.57 (also tired on 3.0.46)

Swagger declaration file content or url

https://gist.githubusercontent.com/samson0v/49ee3b75e34f82a61be6e1d5a1d59129/raw/82658684b4719fdbf77fc402864c5570a50ed9b4/swagger-ce.json

Command line used for generation

swagger-codegen generate -i swagger-ce.json -l python -o /tmp/api_ce/

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 running the mentioned swagger-codegen command with swagger-ce.json and inspect the generated Python client's field types. Compare the result with the OAS 3.1 declaration to determine the unsupported behavior; done means the declared field types are preserved instead of being replaced with object.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, python
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.