Skip to content

feat(ui): add dynamic provider schema boundary - #12646

Open
Alan-TheGentleman wants to merge 1 commit into
feat/prowler-2414-registry-ui-11-explorer-async-addfrom
feat/prowler-2414-registry-ui-12-dynamic-provider-schema
Open

feat(ui): add dynamic provider schema boundary#12646
Alan-TheGentleman wants to merge 1 commit into
feat/prowler-2414-registry-ui-11-explorer-async-addfrom
feat/prowler-2414-registry-ui-12-dynamic-provider-schema

Conversation

@Alan-TheGentleman

Copy link
Copy Markdown
Contributor

Context

This is PR 12 in the Registry UI chain and follows #12590.

The backend now exposes provider credential schemas through GET /api/v1/provider-schemas/{type}. The UI needs a narrow, defensive transport boundary before it can interpret or render dynamic provider onboarding forms.

Description

  • add strict TypeScript contracts for provider-schema responses
  • add an authenticated, no-cache adapter for /api/v1/provider-schemas/{type}
  • normalize and URI-encode provider types before transport
  • validate the JSON:API envelope, resource type, normalized ID binding, and secret_types map
  • preserve schema values as opaque objects while rejecting non-object values
  • map authentication, HTTP, malformed-response, and rejected-fetch failures to safe action results
  • export the new action from the providers action boundary
  • cover adapter and action contracts with focused unit tests

This PR intentionally does not interpret JSON Schema or render onboarding forms. That work belongs to the next focused child.

Chain

Steps to review

  1. Review ui/types/provider-schema.ts for the transport contracts.
  2. Review ui/actions/providers/provider-schemas.adapter.ts for URL construction, authentication, and cache behavior.
  3. Review ui/actions/providers/provider-schemas.ts for fail-closed response validation and safe error mapping.
  4. Review both focused test files for invalid provider input, authentication, HTTP failures, malformed envelopes, invalid schema values, and rejected fetches.

Validation

  • pnpm exec vitest run --project unit actions/providers/provider-schemas.adapter.test.ts actions/providers/provider-schemas.test.ts — 16/16 passed
  • pnpm run test:unit — 442 files, 3,169 tests passed
  • pnpm run typecheck — passed
  • scoped ESLint — passed
  • scoped Prettier check — passed
  • primary LSP diagnostics — 0 findings across all six files
  • git diff --check 67aab39847 — clean
  • pre-commit hooks — passed
  • native RDD review — approved (review-49e8c3c41f84f0cd)

Checklist

  • The PR title follows Conventional Commits.
  • Relevant tests were added and pass.
  • Type checking, linting, and formatting checks pass.
  • No screenshots are required because this PR has no visual changes.
  • No changelog entry is required for this intermediate chained PR.

@Alan-TheGentleman
Alan-TheGentleman requested a review from a team as a code owner August 28, 2026 10:31
@Alan-TheGentleman Alan-TheGentleman added the no-changelog Skip including change in changelog/release notes label Aug 28, 2026
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d6435f8e-e19c-4a6a-a294-52dab211e6d1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Skip including change in changelog/release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant