swagger-api / swagger-api/swagger-ui

Could not render Dt

Open
#8,442 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Is there an existing issue for this?
  • I have searched the existing issues
Current behavior

current Error

스크린샷 2023-02-24 02 46 25


Controller

스크린샷 2023-02-24 02 46 44


Dto

스크린샷 2023-02-24 02 46 57

Minimum reproduction code

https://github.com/koreanddinghwan/nest

Steps to reproduce

i think this error caused by examples property of ApiProperty.
when i use example property instead of examples, it worked properly

Expected behavior

change examples into example

스크린샷 2023-02-24 02 47 18

스크린샷 2023-02-24 02 47 34


then, work properly

스크린샷 2023-02-24 02 47 51

Package version

6.1.4

NestJS version

9.0.0

Node.js version

18.13.0

In which operating systems have you tested?
  • macOS
  • Windows
  • Linux
Other

console error logs

스크린샷 2023-02-24 02 51 02

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 running the linked minimum reproduction repository with the reported Swagger UI, NestJS, and Node.js versions. Compare the rendering and console error when ApiProperty uses examples versus example, then verify that the DTO renders correctly without the reported error. The issue is open with no recent response, so confirm the behavior still exists before starting.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, openapi
Domain
documentation, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.