You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exposing multiple swagger documents as described here fails. The problem is that our custom ISchemaGenerator is registered as a singleton, causing the same ISchemaRepositoryAccessor to be reused for different documents.
The fix is to register our ISchemaGenerator as transient, probably.
Along the way, we should consider to not deviate from the lifetimes used in Swashbuckle for other similar services. We're going with singleton most of the time, which can lead to unexpected problems like it did here.
The text was updated successfully, but these errors were encountered:
Exposing multiple swagger documents as described here fails. The problem is that our custom
ISchemaGenerator
is registered as a singleton, causing the sameISchemaRepositoryAccessor
to be reused for different documents.The fix is to register our
ISchemaGenerator
as transient, probably.Along the way, we should consider to not deviate from the lifetimes used in Swashbuckle for other similar services. We're going with singleton most of the time, which can lead to unexpected problems like it did here.
The text was updated successfully, but these errors were encountered: