swagger-api / swagger-editor

Swagger Editor
https://editor.swagger.io
Apache License 2.0
8.87k stars 2.24k forks source link

Add possible to use editor in multiple tabs (adding 1 option more in config object) #5207

Open MrKarlsonCloud opened 1 month ago

MrKarlsonCloud commented 1 month ago

Content & configuration

Swagger/OpenAPI definition:

 # your YAML here

Swagger-Editor configuration options:

 SwaggerEditor({
   layout: 'EditorLayout', // BasicLayout without swagger
    plugins: [BasicLayoutPlugin],
    dom_id: '#swagger-editor',
    docExpansion: 'list',
    localStorageKey: 'swagger-editor-content-UUID', // This field i want to add and use it in /plugins/local-storage/index.js
    defaultModelExpandDepth: false,
    defaultModelsExpandDepth: false,
    swagger2GeneratorUrl: 'https://generator.swagger.io/api/swagger.json',
    oas3GeneratorUrl: 'https://generator3.swagger.io/openapi.json',
    swagger2ConverterUrl: 'https://converter.swagger.io/api/convert'
 })
 ?yourQueryStringConfig

Is your feature request related to a problem?

I want to open multiple tabs with multiple apis using same aplication.

Describe the solution you'd like

Put in config object file like "localStorageId" and use it in /plugins/local-storage/index.js Line 2 this is version 4 of plugin image

Describe alternatives you've considered

Like above

Additional context