File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -468,6 +468,7 @@ def parse_project(
468468 return ServerResetResult (result = "Project re-parsed successfully." )
469469
470470
471+ @app .get ("/health" ) # legacy extension support
471472@app .get ("/api/v1/status" )
472473def status (runner : DbtProject = Depends (_get_runner )) -> dict [str , t .Any ]:
473474 """Health check endpoint to verify server status."""
@@ -507,6 +508,7 @@ class ServerFormatResult(BaseModel):
507508@app .get ("/api/v1/lint" )
508509@app .post ("/api/v1/lint" )
509510def lint_sql (
511+ request : Request ,
510512 response : Response ,
511513 sql_path : str | None = Query (None , description = "Path to the SQL file to lint." ),
512514 extra_config_path : str | None = Query (None , description = "Path to extra SQLFluff config file." ),
@@ -546,6 +548,8 @@ def lint_sql(
546548 data = {},
547549 )
548550 )
551+ if request .url .path .endswith ("/lint" ):
552+ return ServerLintResult (result = records [0 ]["violations" ] if len (records ) > 0 else [])
549553 return ServerLintResult (result = records ) # pyright: ignore[reportArgumentType]
550554
551555
You can’t perform that action at this time.
0 commit comments