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.58k stars 8.96k forks source link

Swagger-ui displaying only the paths (API Resources) #6447

Open bb9900m opened 4 years ago

bb9900m commented 4 years ago

Q&A (please complete the following information)

Content & configuration

Swagger/OpenAPI definition:

https://petstore.swagger.io/v2/swagger.json

Swagger-UI configuration options:

SwaggerUI({
  url: this.invokeUrl,
      requestInterceptor: (req) => {
        if (req.url === this.invokeUrl) {
          req.headers.Authorization = ""
          return req;
        }
      },
      domNode: this.eRef.nativeElement.querySelector('.swagger-container'),
      deepLinking: true,
      presets: [
        ApiResources.presets.apis
      ],
      defaultModelsExpandDepth: -1,
      defaultModelRendering: "model",
      showExtensions:false,
      withCredentials:false,
      displayOperationId:false,
      operationsSorter: "alpha",
      supportedSubmitMethods: [],
      securityDefinitions:{
})

Screenshots

image

How can we help?

Currently we are working on a business case that request us to displaying only the part of paths (API Resources with Samples if it's contains) without any other information like (API Name, Base URL, Schema, Descriptions, etc...). We are finding some existing configuration to remove the Models and disabling the Try on button and we use that.

If this point is not feasible right now, and you have another suggest solutions, please support us on that.

Thanks,, Faisal.

bb9900m commented 4 years ago

Hi Gents,

Any update on this question? OR any suggest solution required to be discuss?

Thanks, Faisal.