Worker caught an error: Error: schema with key or id "openapi-2.0" already exists
Content & configuration
Swagger/OpenAPI definition: I use two valid Yaml files. If you want I can insert it.
Is your feature request related to a problem?
Yes, it is related to https://github.com/swagger-api/swagger-editor/issues/2339

Describe the solution you'd like
It's possible create a clean SwaggerEditorBundle instance function, in order to call it on 'ngOnDestroy' angular function?
Yes , thanks for creating this, hope for a quicker solution
i got the same error how can i fix this?
Yes if author add this in their code, we can control worker and finish him in unmount steps @char0n

I've issued a following PR that exposes worker life-cycle management to the plugin system via getWorker and terminateWorker redux thunks. Example of using this:
// instantiation
const editor = SwaggerEditorBundle({
dom_id: '#swagger-editor',
layout: 'StandaloneLayout',
presets: [
SwaggerEditorStandalonePreset
],
queryConfigEnabled: true,
});
// after the SwaggerEditor have been disposed of, terminate the worker manually
editor.jsonSchemaValidatorActions.terminateWorker();
Awaiting feedback, if this is sufficient solution for this issue.
It will be perfect @char0n thank you :D
is it resolve in new version v4.4.4 release?
@Dilo07 no, I've issued this PR an hour ago and I'm currently awaiting feedback. Will merge (if I have some feedback that this will help resolve the issue) and release during Monday.
ok, I'm waiting for you to test the fix release.
The change described in https://github.com/swagger-api/swagger-editor/issues/3016#issuecomment-1286716347 released in v4.5.0.
@char0n Thank you guys :)
Now it's fine, thanks!