swagger-api / swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
https://swagger.io
Apache License 2.0
26.47k stars 8.96k forks source link

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

Open nehasharmaa35 opened 3 years ago

nehasharmaa35 commented 3 years ago

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 } } } }

rajaksunil commented 2 years ago

I am facing the same issue, any solution for this?