OpenAPITools / OpenAPITools/openapi-generator

Question: None of the oneOf schemas matched the input data.

Open
#14,559 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Hi, I've added a Person.json schema

"title": "Person",
"type": "object",
"properties": {
"id": { "type": "string" },
"type": { "type": "string", "const": "Person" }}

I think the problem is that my response data from the api looks like:

Response: {

  • statusCode:
  • data: { "data": { id: "1", "type": Person"}}}

How can I un-wrap one Data layer ? Or how can I describe the response structure?

Thanks

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 reviewing the Person.json schema and comparing it with the shown API response, including the nested data object and oneOf validation context. Determine where the response structure is defined and document the expected wrapper shape; done means the schema accurately describes the response without the oneOf mismatch.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.