Skip to content

feat(poc): add schema form prototype with raw json fallback#3346

Open
Baluduvamsi2006 wants to merge 1 commit intoapache:masterfrom
Baluduvamsi2006:feat/poc-schemaform-prototype-clean
Open

feat(poc): add schema form prototype with raw json fallback#3346
Baluduvamsi2006 wants to merge 1 commit intoapache:masterfrom
Baluduvamsi2006:feat/poc-schemaform-prototype-clean

Conversation

@Baluduvamsi2006
Copy link
Contributor

@Baluduvamsi2006 Baluduvamsi2006 commented Mar 21, 2026

Why submit this pull request?

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What changes will this PR take into?

This PR introduces a prototype (PoC) for schema-driven plugin configuration in APISIX Dashboard.

Summary

  • Added a new Prototype Schema Form mode in the plugin editor drawer.
  • Kept existing Raw JSON (Monaco) mode as fallback.
  • Added mode switch to toggle between:
    • Prototype Schema Form
    • Raw JSON
  • Implemented basic schema-to-form rendering support for:
    • string, number/integer, boolean
    • enum (select)
    • array<string> (tags input)
    • nested object
  • Added initial conditional behavior support for:
    • if/then/else merge
    • basic dependencies (required propagation)
  • Synced prototype form changes to JSON payload so users can verify/edit in Raw JSON mode.
  • Added a safety guard for Monaco diagnostics setup to avoid runtime crashes when jsonDefaults is unavailable.

Why this approach

  • Demonstrates feasibility of the GSoC schema-form idea with minimal risk.
  • Maintains backward compatibility through JSON fallback.
  • Enables incremental adoption and mentor/community review before full implementation.

Manual verification

  • Opened plugin editor drawer.
  • Edited fields in Prototype Schema Form and verified values appear in Raw JSON.
  • Switched back and forth between modes without losing state.
  • Saved plugin config successfully.

Related issues

refs #3347

Checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant