public async Task <IHttpActionResult> Generate(string definition, string path) { if (string.IsNullOrEmpty(definition)) { return(NotFound()); } if (string.IsNullOrEmpty(path)) { return(NotFound()); } // Get Definition Information IDefinition definitionItem = _definitionService.GetByName(definition); if (definitionItem == null) { return(NotFound()); } IPath pathItem = _pathService.GetByEndpointPath(path, definitionItem); if (pathItem == null) { return(NotFound()); } // Process Path if (pathItem.HttpVerb.Value != HttpContext.Current.Request.HttpMethod) { return(NotFound()); } ProcessEndpointPath(pathItem); return(Ok(new { Something = "true" })); }