I just updated one of our API projects from .NET 6 to .NET 8 and while doing so we also updated Nswag to the lastest version. After this a number of generic Hateoas classes that we have changed from objects to arrays in the swagger definition.
The problem with this is that the original class contained additional properties that we want to keep in the swagger definition. If i remove the GetEnumerator methods from the classes and generate a new swagger definition i get the old behaviour. With the old behaviour the object generated is "ResourceCollectionOf{GenericType}Resource" but with the new behaviour instead i get an "array of {GenericType}Resource".
Is there any way to get the old behaviour without having to remove the GetEnumerator methods from all our classes?
I just updated one of our API projects from .NET 6 to .NET 8 and while doing so we also updated Nswag to the lastest version. After this a number of generic Hateoas classes that we have changed from objects to arrays in the swagger definition.
The problem with this is that the original class contained additional properties that we want to keep in the swagger definition. If i remove the GetEnumerator methods from the classes and generate a new swagger definition i get the old behaviour. With the old behaviour the object generated is "ResourceCollectionOf{GenericType}Resource" but with the new behaviour instead i get an "array of {GenericType}Resource".
Is there any way to get the old behaviour without having to remove the GetEnumerator methods from all our classes?