Skip to content

Commit 2836368

Browse files
committed
Revert "fix: reject required custom auth fields (#44)"
This reverts commit 9694d05.
1 parent 9694d05 commit 2836368

9 files changed

Lines changed: 12 additions & 99 deletions

File tree

.github/workflows/self-test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ jobs:
5454
fi
5555
echo "✅ Auto-discovery correctly skips tests/"
5656
57-
- name: Test validate_integration.py — focused pytest regressions
58-
run: pytest tests/test_validate_integration.py
59-
6057
- name: Test check_imports.py — valid imports
6158
run: |
6259
python scripts/check_imports.py tests/examples/submodule-imports/valid_submodules.py

scripts/docs/validate_integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Validates based on `auth.type`:
107107
| Auth Type | Required Fields | Description |
108108
|-----------|----------------|-------------|
109109
| `platform` | `provider`, `scopes` (array) | OAuth2-based authentication |
110-
| `custom` | `fields.properties` | API key or token-based authentication. `auth.fields.required` must be absent or empty; credential presence is handled by the platform connection flow. |
110+
| `custom` | `fields.properties` | API key or token-based authentication |
111111
| _(omitted)_ || No authentication (public APIs) |
112112

113113
#### Action Configuration (`_validate_actions_config`)

scripts/validate_integration.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,7 @@ def _check_required_files(self):
121121
# use absolute imports like 'from <integration> import <instance>'.
122122
has_actions_dir = (self.path / 'actions').is_dir()
123123
if not (self.path / '__init__.py').exists() and not has_actions_dir:
124-
self.add_warning(
125-
"Missing __init__.py "
126-
"(required for package-style integrations, optional for modular integrations with actions/)"
127-
)
124+
self.add_warning("Missing __init__.py (required for package-style integrations, optional for modular integrations with actions/)")
128125

129126
# Check for forbidden files
130127
if (self.path / 'integration.py').exists():
@@ -247,14 +244,6 @@ def _validate_auth_config(self):
247244
self.add_error("Custom auth requires 'fields' configuration")
248245
elif 'properties' not in auth.get('fields', {}):
249246
self.add_error("Custom auth fields must have 'properties' defined")
250-
else:
251-
required_fields = auth['fields'].get('required')
252-
if required_fields:
253-
self.add_error(
254-
"Custom auth fields must not define a non-empty auth.fields.required array. "
255-
"Credential collection and presence are handled by the platform connection flow; "
256-
"define auth.fields.properties only."
257-
)
258247

259248
elif auth_type is not None:
260249
self.add_warning(f"Unknown auth type: '{auth_type}'. Expected 'platform' or 'custom'")

tests/examples/bad-icon/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"label": "API Key",
1616
"help_text": "Enter your API key"
1717
}
18-
}
18+
},
19+
"required": ["api_key"]
1920
}
2021
},
2122
"actions": {

tests/examples/good-integration/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"label": "API Key",
1616
"help_text": "Enter your API key"
1717
}
18-
}
18+
},
19+
"required": ["api_key"]
1920
}
2021
},
2122
"actions": {

tests/examples/long-lines-integration/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"label": "API Key",
1616
"help_text": "Enter your API key"
1717
}
18-
}
18+
},
19+
"required": ["api_key"]
1920
}
2021
},
2122
"actions": {

tests/examples/modular-integration/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"label": "API Key",
1616
"help_text": "Enter your API key"
1717
}
18-
}
18+
},
19+
"required": ["api_key"]
1920
}
2021
},
2122
"actions": {

tests/sample-api/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"label": "API Key",
1616
"help_text": "Enter your API key from the dashboard"
1717
}
18-
}
18+
},
19+
"required": ["api_key"]
1920
}
2021
},
2122
"actions": {

tests/test_validate_integration.py

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)