Skip to content

Commit bafdf12

Browse files
fix: issue a warning when validate_collections is called without collection (#761)
Co-authored-by: Pete Gadomski <pete.gadomski@gmail.com>
1 parent 1ebd2a3 commit bafdf12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/stac_api_validator/validations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,10 @@ def validate_collections(
10741074
r_session.headers,
10751075
)
10761076

1077+
if not collection:
1078+
warnings += f"[{Context.COLLECTIONS}] Collection parameter required for running all Collections validation"
1079+
return
1080+
10771081
collection_url = f"{data_link['href']}/{collection}"
10781082
_, body, resp_headers = retrieve(
10791083
Method.GET,

0 commit comments

Comments
 (0)