swagger-api / swagger-api/swagger-codegen-generators
Cannot read property 'properties' of undefined exception when using Swagger page
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
I used Swagger for a while for my Web API. Lately I've added a couple of application services - nothing especial, like all others, but cannot test them, since getting JS exception. So, when I press "Try it out" button - I am getting this exception. I am using the latest Swashbuckle Nuget version. Before this Nuget update, I had another exception - "Cannot read property '$ref' of undefined" - on version 5.5.1.

I am getting three exceptions at once and they look the same. The page gets irresponsive afterwards:

I don't have this exception on another API calls, but how it can be related to the kind of calls, if there is no exception in ApplicationService constructor?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Swagger page failure with the affected application service calls and the "Try it out" button, using the latest Swashbuckle NuGet version and, for comparison, version 5.5.1. Use the attached exception screenshots as reference; done means the calls can be tested without the "properties" or "$ref" JavaScript errors and the page remains responsive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100