swagger-api / swagger-api/swagger-ui

Swagger UI Freeze/Crash - Asp.Net Core 3.1.

Open
#6,919 1 comment 0 reactions 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

I am using swashbuckle in my ASP.Net Core 3.1 with swagger UI. When I hit the methods whose response is bit long, UI crashes while same is working fine in postman. Below is swagger json file.

{
"openapi": "3.0.1",
"info": {
"title": "v1",
"version": "v1"
},
"servers": [
{
"url": "http://localhost:62242"
}
],
"paths": {
"/api/Content/GetContentTypeFields": {
"get": {
"tags": [
"Content"
],
"parameters": [
{
"name": "className",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "siteName",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/ContentTypeRoot"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContentTypeRoot"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/ContentTypeRoot"
}
}
}
}
}
}
},
"/api/Content/GetContentData": {
"get": {
"tags": [
"Content"
],
"parameters": [
{
"name": "pageAliasPath",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "siteName",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ColumnNames"
}
}
}
},
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ColumnNames"
}
}
}
},
"text/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ColumnNames"
}
}
}
}
}
}
}
}
},
"/api/Content/GetContentWithColumnsFilter": {
"get": {
"tags": [
"Content"
],
"parameters": [
{
"name": "pageAliasPath",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "columns",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "siteName",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ColumnNames"
}
}
}
},
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ColumnNames"
}
}
}
},
"text/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ColumnNames"
}
}
}
}
}
}
}
}
},
"/api/Content/GetCategories": {
"get": {
"tags": [
"Content"
],
"parameters": [
{
"name": "siteName",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "CategoryID",
"in": "query",
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Category"
}
}
},
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Category"
}
}
},
"text/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Category"
}
}
}
}
}
}
}
},
"/api/Content/GetAllContentWithColumnsFilter": {
"get": {
"tags": [
"Content"
],
"parameters": [
{
"name": "pageAliasPath",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "columns",
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "siteName",
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
}
},
"components": {
"schemas": {
"Category": {
"type": "object",
"properties": {
"categoryID": {
"type": "string",
"nullable": true
},
"categoryName": {
"type": "string",
"nullable": true
},
"categoryDisplayName": {
"type": "string",
"nullable": true
},
"categoryDescription": {
"type": "string",
"nullable": true
},
"categoryLevel": {
"type": "string",
"nullable": true
},
"categoryNamePath": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},
"ColumnNames": {
"type": "object",
"properties": {
"columnname": {
"type": "string",
"nullable": true
},
"columnvalue": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},
"ContentTypeRoot": {
"type": "object",
"properties": {
"types": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Type"
},
"nullable": true
}
},
"additionalProperties": false
},
"IElement": {
"type": "object",
"properties": {
"type": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"controlname": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},
"System": {
"type": "object",
"properties": {
"id": {
"type": "string",
"nullable": true
},
"name": {
"type": "string",
"nullable": true
},
"codename": {
"type": "string",
"nullable": true
},
"last_modified": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
},
"Type": {
"type": "object",
"properties": {
"system": {
"$ref": "#/components/schemas/System"
},
"elements": {
"type": "array",
"items": {
"$ref": "#/components/schemas/IElement"
},
"nullable": true
}
},
"additionalProperties": false
}
}
}
}

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 freeze or crash in Swagger UI with the supplied OpenAPI JSON, focusing on the endpoints whose responses are described as long. Compare the behavior with Postman and identify the Swagger UI entry point handling the response. Done means the affected endpoint renders without freezing or crashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
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.