Redocly / Redocly/redoc

Json example showing null in an array of string instead of properties with string values.

Open
#2,273 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

under consideration
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

Describe the bug
We're experiencing issues with Redocly.
Json example showing null in an array of string instead of properties with string values.
We're using the same code and swagger schema everywhere, but it's not working in some places while getting json example from [FromBody] parameter of API.
As shown in the screenshots.

Expected behavior
image

Screenshots
swaggerschema issue

Additional context
We have used Swashbuckle.AspNetCore.ReDoc 6.4.0.

Could you please help with this?

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 reproducing the JSON example in Redocly using the Swagger schema and [FromBody] parameter described in the issue, with Swashbuckle.AspNetCore.ReDoc 6.4.0. Compare the rendered array with the expected screenshot and determine what input causes string-valued properties to appear as null. Done means the example renders the expected string values instead of null.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
documentation
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.