I have the following OpenApi annotations for my azure function:
using Hl7.Fhir.Model;
[FunctionName("FunctionName")]
[OpenApiOperation(operationId: "OpId", tags: new[] { "Tag" }, Description = "Description to be filled.")]
[OpenApiSecurity("function_key", SecuritySchemeType.ApiKey, Name = "code", In = OpenApiSecurityLocationType.Query)]
[OpenApiRequestBody("text/json", typeof(ProjectModel), Required = true)]
[ApiExplorerSettings(GroupName = "GpName")]
[OpenApiResponseWithBody(statusCode: HttpStatusCode.OK, bodyType: typeof(ClassLibraryModel), contentType: "application/json", Description = "The OK response")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "v1.1/apiendpoint")] HttpRequest req,
ILogger log)
{ }
In [OpenApiResponseWithBody] if I use typeof with the Model that is in the project itself, swagger UI shows up without any issues. But when I use a different model which is imported at the top using the using statement using Hl7.Fhir.Model, the app just crashes. Any ideas why that is happening? Any help would be appreciated.
There are no exception details, the app simply crashes.

