OpenAPI.NET.CSharpAnnotations icon indicating copy to clipboard operation
OpenAPI.NET.CSharpAnnotations copied to clipboard

Can't reference nested class or enum in an annotation

Open linelson opened this issue 6 years ago • 1 comments

A customer has a parameter annotation of the following format:

Where SomeOtherClass is a nested enum or class defined within the class SomeClass, for example:

/// <summary>
/// SomeClass
/// </summary>
public class SomeClass {
     /// <summary>
     /// SomeOtherClass
     /// </summary>
     public class SomeOtherClass { SomeOtherClass() {} } 

    /// <summary>
    /// SomeEnum
   /// </summary>
   public enum SomeEnum {
       SomeEnumProperty
   }
}

When generating the document, generation will fail with an 'UnableToGenerateAllOperationsExcepion', with ExceptionType: TypeLoadException and message: Type "SomeNamespace.SomeClass.SomeOtherClas" could not be found. Ensure that it exists in one of the following assemblies: SomeNamespace.dll.

linelson avatar Sep 30 '19 18:09 linelson

Same here

brooksca avatar Jun 03 '21 22:06 brooksca