public static OpenApiDocument LoadOpenApi(RootNode rootNode) { var openApidoc = new OpenApiDocument(); var openApiNode = rootNode.GetMap(); var required = new List <string>() { "info", "openapi", "paths" }; ParseMap(openApiNode, openApidoc, OpenApiFixedFields, OpenApiPatternFields, required); ReportMissing(openApiNode, required); return(openApidoc); }
public static OpenApiDocument LoadOpenApi(RootNode rootNode) { var openApidoc = new OpenApiDocument(); var openApiNode = rootNode.GetMap(); var required = new List <string>() { "info", "swagger", "paths" }; ParseMap(openApiNode, openApidoc, OpenApiFixedFields, OpenApiPatternFields, required); ReportMissing(openApiNode, required); // Post Process OpenApi Object MakeServers(openApidoc.Servers, openApiNode.Context); return(openApidoc); }