REST API - Mandatory field validations
Open
@parthy007 is already working on this.
Since Apr 22, 2025.
data source
- Dominant language
- JavaScript
- Stars
- 40.9k
- Forks
- 5.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 202
Description
Add required field validations to the REST API datasource configuration page to ensure users enter all necessary details based on the selected authentication and TLS options.
✅ Always Required
- Base URL: Must be a valid URL starting with
http://orhttps://.
🔐 Authentication Type-Based Required Fields
Authentication Type: None
- No additional fields are required.
Authentication Type: Basic
- Username: Required.
- Password: Required.
Authentication Type: Bearer
- Token: Required.
Authentication Type: OAuth 2.0
Grant Type: Authorization Code
- Access Token URL: Required and must be a valid URL.
- Authorization URL: Required and must be a valid URL.
- Client ID: Required.
- Client Secret: Required.
- Add access token to: Must be selected.
- Header prefix: Required if "Request header" is selected.
Grant Type: Client Credentials
- Access Token URL: Required and must be a valid URL.
- Client ID: Required.
- Client Secret: Required.
- Add access token to: Must be selected.
- Header prefix: Required if "Request header" is selected.
🔒 TLS (SSL Certificate) Settings
If TLS is enabled:
CA Certificate (Server Verification)
- CA Certificate: Must be uploaded.
Client Certificate (Mutual TLS)
- CA Certificate: Must be uploaded.
- Client Certificate: Must be uploaded.
- Client Key: Must be uploaded.
ℹ️ Notes
- "Retry on network errors" is enabled by default and does not require validation.
- Optional fields (headers, URL parameters, body, cookies, scopes, custom headers/params) should only be validated if filled.
Acceptance Criteria:
- All required fields are validated based on the configuration context.
- Form prevents submission until all required fields are valid.
- Proper error messages should be displayed next to each invalid field.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.