private PathItem CreatePathItem(IEnumerable <ApiDescription> apiDescriptions, SchemaRegistry schemaRegistry) { var pathItem = new PathItem(); // Group further by http method var perMethodGrouping = apiDescriptions .GroupBy(apiDesc => apiDesc.HttpMethod.Method.ToLower()); foreach (var group in perMethodGrouping) { var httpMethod = group.Key; var apiDescription = (group.Count() == 1) ? group.First() : _options.ConflictingActionsResolver(group); switch (httpMethod) { case "get": pathItem.get = CreateOperation(apiDescription, schemaRegistry); break; case "put": pathItem.put = CreateOperation(apiDescription, schemaRegistry); break; case "post": pathItem.post = CreateOperation(apiDescription, schemaRegistry); break; case "delete": pathItem.delete = CreateOperation(apiDescription, schemaRegistry); break; case "options": pathItem.options = CreateOperation(apiDescription, schemaRegistry); break; case "head": pathItem.head = CreateOperation(apiDescription, schemaRegistry); break; case "patch": pathItem.patch = CreateOperation(apiDescription, schemaRegistry); break; } } return(pathItem); }