Skip to content

feat: JSON Schema-driven UI for APISIX Plugin Configuration [GSoC 2026 Proposal] #3347

@Baluduvamsi2006

Description

@Baluduvamsi2006

Feature request

Problem

APISIX Dashboard plugin configuration is still edited mostly as raw JSON.
This increases cognitive load for users who are not deeply familiar with each plugin schema, and it can cause invalid or incomplete configurations.

A schema-driven UI can improve usability and correctness by rendering form controls directly from JSON Schema metadata, while still keeping raw JSON fallback for advanced users.

Alignment note

I am aligning this proposal with existing work in #3274 and I am not proposing a parallel SchemaForm engine.

This issue is now my GSoC tracking/alignment plan for incremental and mergeable work.

Proposed solution (aligned extension)

I propose a production-focused JSON Schema -> Form UI track by extending and hardening the current direction, with correctness and verifiable deliverables as top priorities.

Reuse from #3274

  • Existing SchemaForm foundation and recursive rendering direction
  • Existing conditional rendering baseline (oneOf/anyOf/if-then-else)
  • Existing AJV validation direction and demo/test setup

New focus from my side

  • Correctness hardening first (branch switching cleanup + payload consistency)
  • Edge-case reliability (nested conditionals, repeated switching, dependencies)
  • Incremental integration polish for real plugin flows
  • Contributor-oriented documentation and maintenance guidance

Core architecture (aligned)

  1. Schema Resolver Layer
  • Parse and normalize plugin schema definitions
  • Resolve nested paths, defaults, and required metadata
  • Handle APISIX-specific schema usage where practical
  1. Field Mapping Layer
  • string -> text/password/textarea
  • number/integer -> numeric input
  • boolean -> switch/checkbox
  • enum -> select/radio
  • array -> tags/list editor
  • object -> grouped/nested section

Enhancements:

  • Better label/help extraction
  • Default value hydration consistency
  • Contributor-friendly extension path
  1. Conditional Rendering Engine (correctness-first)
  • Improve deterministic handling for:
    • if/then/else
    • oneOf/anyOf
    • dependencies
  • Ensure inactive branches are fully cleaned from form state
  • Ensure final submit payload strictly matches active schema branch
  1. Validation Layer
  • Integrate AJV compiled validators
  • Normalize errors into field-level + form-level UX
  • Accurate error mapping to field paths
  • Block unsafe submission on invalid state
  1. Form <-> Raw JSON Sync + Fallback
  • Two-way sync between Schema Form and Raw JSON mode
  • Safe fallback for unsupported/advanced cases
  • Preserve values during mode switching without silent corruption

Implementation plan (MVP-first)

Phase 1: MVP stabilization

  • Reuse and stabilize parser + base renderer flow
  • Primitive/object/array + enum/default/required reliability
  • Baseline cleanup guarantees for inactive branch fields
  • Schema Form <-> Raw JSON mode switch in plugin editor

Deliverables:

  • Stable parser + renderer baseline
  • Unit tests for parser/widget mapping
  • Reproducible demo for core flows

MVP gate:

  • Deterministic rendering for baseline types
  • No stale inactive-field payload leakage in covered scenarios

Phase 2: Conditional logic hardening

  • Strengthen oneOf/anyOf/if-then-else/dependencies behavior
  • Fix edge cases in branch transitions and nested conditions
  • Improve hidden/disabled inactive-branch handling

Deliverables:

  • Deterministic conditional rendering
  • Expanded branch-transition test matrix
  • Reproducible edge-case demos

MVP gate:

  • Branch switching preserves only active-branch payload
  • Tests pass for nested + repeated transitions

Phase 3: Validation + Error UX

  • Full AJV validation pipeline integration
  • Field-level and summary-level error UX
  • Invalid-section highlighting and recovery flow

Deliverables:

  • End-to-end validation flow
  • Clear error reporting and correction UX
  • Regression tests for validation scenarios

MVP gate:

  • Accurate error-to-field mapping
  • Invalid payload submission blocked reliably

Phase 4: Hardening + Rollout

  • Add integration/E2E coverage for representative plugins
  • Optimize behavior for large/nested schemas
  • Finalize contributor docs and rollout checklist

Deliverables:

  • Production-quality behavior and docs
  • Verified compatibility across target plugin flows
  • Rollout and maintenance guidance

MVP gate:

  • Stable CI-quality pass criteria met on scoped flows
  • Contributor docs sufficient for extension without core rewrites

Verifiable pass criteria

For each phase I will provide:

  • Reproducible demo scenario
  • Explicit test additions
  • Pass criteria definition

Global quality bar:

  • Tests pass
  • Lint clean
  • No stale inactive-branch values in submit payload for covered cases

Expected outcomes

  • Reduced configuration errors and invalid submissions
  • Faster plugin setup for first-time and intermediate users
  • Better maintainability through schema-first UI generation
  • Retained power-user control through raw JSON fallback

Alternatives considered

  1. Raw JSON only
    Low implementation effort, but poor UX and higher error rate.

  2. Handcrafted form per plugin
    Good UX per plugin, but not scalable and expensive to maintain.

  3. Schema-driven + JSON fallback (chosen)
    Best tradeoff: scalable generation with safe escape hatch.

Related work

Initial acceptance criteria

  • Schema Form mode available in plugin editor
  • Primitive/object/array fields render correctly
  • Conditional sections render deterministically
  • Inactive branch values do not leak into submit payload
  • Validation errors map to correct field paths
  • Raw JSON fallback remains available and sync-safe
  • Unit + integration/E2E coverage for core flows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions