One of my endpoints returns a JSON (not huge, around 2MB). Trying to run GET on this endpoint in swagger-ui
results in the browser hanging for a few minutes. After this time, it finally displays the JSON.
Is there a way to define that the response shouldn't be rendered but provided as a file to download instead?
I'm using OpenAPI 3, and I tried the following:
content:
application/json:
schema:
type: string
format: binary
taken from the documentation. Still, swagger-ui renders the response.
Has anyone had the same problem?
The Swagger API interface in the AppDynamics Platform is deprecated starting version 4.5. 15.
Swagger Editor: Swagger Editor lets you edit OpenAPI specifications in YAML inside your browser and to preview documentations in real time. Swagger UI: Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from an OAS-compliant API.
Introduction. Swagger™ is a project used to describe and document RESTful APIs. The Swagger specification defines a set of files required to describe such an API. These files can then be used by the Swagger-UI project to display the API and Swagger-Codegen to generate clients in various languages.
Swagger is a framework implementation for describing, producing, consuming, and visualizing RESTful web services, based on the OpenAPI specification.
Lex45x proposes in this github issue to disable syntax highlighting. In ASP.Net Core you can do this with
app.UseSwaggerUI(config =>
{
config.ConfigObject.AdditionalItems["syntaxHighlight"] = new Dictionary<string, object>
{
["activated"] = false
};
});
This significantly improves render performance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With