Each one duplicates the same fields, only changing the inner type.
After digging through Swagger/OpenAPI issues, this appears to be a structural limitation of the current tooling — OpenAPI describes schemas, not type systems.
I ended up treating OpenAPI as a projection layer and keeping a canonical generic contract outside of it.
You define a simple generic response:
ServiceResponse<T>
But after client generation, generics are gone.
You get this instead:
ServiceResponseCustomerDto ServiceResponsePageCustomerDto ServiceResponseOrderDto
Each one duplicates the same fields, only changing the inner type.
After digging through Swagger/OpenAPI issues, this appears to be a structural limitation of the current tooling — OpenAPI describes schemas, not type systems.
I ended up treating OpenAPI as a projection layer and keeping a canonical generic contract outside of it.
How are you dealing with this in your clients?