Versions:
- Asp.Net 2.2
- Swashbuckle v5.0.0 rc2
I am experiencing an issue when using NSWAG to generate my Angular client. I am using OAS 3.0. The issue is with using IFormFile as a parameter in my API.
This is my endpoint:
public async Task<object> UploadTest(IFormFile file) { }
When using OAS 3 nswag will generate the above endpoint's 'IFileFormat' parameter as a 'Blob' within the client code.
sample(body?: Blob | undefined): Observable<ObjectCommonApiResponse>;
When using OAS 2 nswag will generate the above endpoint's 'IFileFormat' parameter as a 'FileParameter' within the client code.
sample(file?: FileParameter | null | undefined): Observable<ObjectCommonApiResponse>;
Maybe I am missing something but I am not sure how to turn my file into 'Blob', which doesnt seem useful, so I can pass it into the service. On the other hand, when it's a 'FileParameter' type, using OAS 2, I can just extend the 'FileParameter' interface with my own class and send that in and it works as expected.