OpenAPITools / OpenAPITools/openapi-generator

[BUG] io.swagger.v3.oas.models.parameters.RequestBody doesn't support extensions

Open
#10,133 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

io.swagger.v3.oas.models.parameters.RequestBody

public class RequestBody {
private String description = null;
private Content content = null;
private Boolean required = null;
private java.util.Map<String, Object> extensions = null;
private String $ref = null;

the size of extensions is always 0,though there are some extension properties in swagger started with "x",for examle:
- in: body
name: XXXBody
description: "request"。
required: true
schema:
$ref: '#/definitions/KeystoneCreateAgencyTokenRequestBody'
x-order: 3

in above swagger,the "x-order" won't be added to extensions of RequestBody

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 at io.swagger.v3.oas.models.parameters.RequestBody and trace how the OpenAPI input containing x-order is converted into this model. Done means extension properties such as x-order are retained in the RequestBody extensions map; the issue does not name a specific file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.