private static void CollectClassesThatImplementInterface(
     OperationModel operation,
     OutputTypeModel outputType,
     Dictionary <NameString, TypeDescriptorModel> typeDescriptors,
     HashSet <NamedTypeDescriptor> classes)
 {
     foreach (var type in operation.GetImplementations(outputType))
     {
         if (type.IsInterface)
         {
             CollectClassesThatImplementInterface(
                 operation,
                 type,
                 typeDescriptors,
                 classes);
         }
         else
         {
             classes.Add(typeDescriptors[type.Name].NamedTypeDescriptor);
         }
     }
 }