Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/stac_api_validator/validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2185,7 +2185,6 @@ def validate_exclude_field(
field: str,
errors: Errors,
warnings: Warnings,
disallow_extra: bool = True,
):
if not body or not (item := first_item(body)):
errors += f"[{context}] : response had no items in response for {desc}"
Expand All @@ -2200,10 +2199,6 @@ def validate_exclude_field(
if value:
errors += f"[{context}] : {desc} response contained '{field}', but should have been excluded"

if disallow_extra:
if len(item) < 5:
errors += f"[{context}] : {desc} response contained fewer than 5 fields {list(item.keys())}"

if Method.GET in search_method_to_url:
_, body, _ = retrieve(
Method.GET,
Expand Down Expand Up @@ -2384,7 +2379,7 @@ def validate_post_case(fields: Any, msg: str):
r_session=r_session,
)
desc = f"GET fields='{field}'"
validate_exclude_field(desc, body, "geometry", errors, warnings, False)
validate_exclude_field(desc, body, "geometry", errors, warnings)
validate_include_field(
desc, body, fields_nested_property, errors, warnings, True
)
Expand Down