docusaurus-openapi-docs icon indicating copy to clipboard operation
docusaurus-openapi-docs copied to clipboard

Parameters that are defined with allOf and read-only shouldn't be displayed in the body

Open JaimeOVasconcelos opened this issue 1 year ago • 0 comments

Describe the bug

The parameters that go in the body of endpoints should not be present if they are read-only. Currently, this is not true when the parameter is defined with allOf with readOnly: true.

Expected behavior

When the parameter is defined with allOfand readOnly: true should not be in the body.

Current behavior

The parameters defined as allOf and readOnly: trueare in the body. See this example: image Here's some of the parameters that should not be there because they are defined with allOf and readOnly: true: Screenshot 2024-04-20 at 16 01 11

Possible solution

In endpoints, if a parameter is defined with allOf and readOnly: true, they should not be in the body.

Steps to reproduce

  1. Define an endpoint (PUT, POST, ...) with parameters in the Body and some of them are defined with allOf and as readOnly: true. For example: image
  2. When generating the documentation, these parameters are included in the body of the endpoint and shouldn't.

Your Environment

  • Version used: Plugin version is 2.1.3
  • Environment name and version: Chrome 123.0.6312.124, node.js 20.12.2
  • Operating System and version: Mac

JaimeOVasconcelos avatar Apr 20 '24 15:04 JaimeOVasconcelos