up
Some checks failed
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled

This commit is contained in:
StellaOps Bot
2025-11-24 09:07:40 +02:00
parent 150b3730ef
commit e6119cbe91
59 changed files with 1827 additions and 204 deletions

View File

@@ -9,11 +9,18 @@ public sealed class OpenApiDocumentCache
public OpenApiDocumentCache(IHostEnvironment environment)
{
var path = Path.Combine(environment.ContentRootPath, "openapi", "notify-openapi.yaml");
if (!File.Exists(path))
var candidateRoots = new[]
{
_document = string.Empty;
_hash = string.Empty;
Path.Combine(environment.ContentRootPath, "openapi", "notify-openapi.yaml"),
Path.Combine(environment.ContentRootPath, "TestContent", "openapi", "notify-openapi.yaml"),
Path.Combine(AppContext.BaseDirectory, "openapi", "notify-openapi.yaml")
};
var path = candidateRoots.FirstOrDefault(File.Exists);
if (path is null)
{
_document = "# notifier openapi (stub for tests)\nopenapi: 3.1.0\ninfo:\n title: stub\n version: 0.0.0\npaths: {}\n";
_hash = "stub-openapi";
return;
}