swagger-api / swagger-api/swagger-codegen

OneOf code generation issue in java client.

Open
#10,340 4 comments 0 reactions 1 assignee View on GitHub

@HugoMario is already working on this.

Since Oct 17, 2020.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Hi,

If i use oneOf and generate a java client I run into issues where it has created an interface called OneOfBody and then a basic implementation of it called Body. All of my generated classes are implementations of OneOfBody but the api client methods are all expecting the input of type Body so all my request objects do not match. Because of this i am unable to execute any of the api calls that use oneOf in the OAS.

Kindly look into this issue and resolve ASAP.

Let me know in case any further information needed.

Thanks,
Manoj.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.