Skip to content

Need to show Extensions in swagger-ui-react  #5892

@CrowleyRajapakse

Description

@CrowleyRajapakse

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome, safari
  • Swagger-ui-react npm Version: 3.25.0
  • Method of installation: npm
  • Swagger-UI version: 3.25.0
  • Swagger/OpenAPI version: Swagger 2.0, OpenAPI 3.0

Content & configuration

Swagger-UI configuration options:

const SwaggerUI = (props) => {
    const {
        spec, accessTokenProvider, authorizationHeader, api, securitySchemeType,
    } = props;

    const componentProps = {
        spec,
        showExtensions: true,
        showCommonExtensions: true,
        validatorUrl: null,
        defaultModelsExpandDepth: -1,
        docExpansion: 'list',
        requestInterceptor: (req) => {
              <!-- logic -->      
              return req;
        },
        defaultModelExpandDepth: -1,
        plugins: [disableAuthorizeAndInfoPlugin],
    };
    return <SwaggerUILib {...componentProps} />;
};

Screenshots

When using editor.swagger.io tool swagger ui does show the extensions for the swagger file.
Screenshot 2020-03-04 at 15 16 04

How can we help?

When i try to enable the extensions by adding 'showExtensions:true', it doesn't reflect on the swagger console.
In the swagger-ui-react npm library it is said "Not all configuration bindings are available.". does this include this extensions as well.
If so can we add this functionality as well?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions