Skip to content

Load the route designer when a plugin has a form field named label - #2912

Merged
mathieuancelin merged 1 commit into
MAIF:masterfrom
davlgd:davlgd-fix-2911-designer-label
Oct 26, 2026
Merged

mathieuancelin merged 1 commit into
MAIF:masterfrom
davlgd:davlgd-fix-2911-designer-label

Conversation

@davlgd

@davlgd davlgd commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Resolves #2911

toUpperCaseLabels treats the label keys it encounters in plugin form schemas as display text. A form field can itself be named label, like the links items of the OtoroshiApiPortalCatalog plugin of otoroshi-api-portal:

"schema": {
  "label": { "type": "string", "label": "Label" },
  "url": { "type": "string", "label": "URL" }
}

The value under label is then the descriptor of that field, an object, and replace throws a.replace is not a function. loadData processes the schemas of the plugins listed in the designer before clearing its loading state, so such a plugin can block the designer even on routes that do not use it.

The helper now applies text formatting only to string values, and processes field descriptors recursively: the nested field keeps its own Label and the form renders it as a field. String and empty labels give the same result as before.

Checked on maif/otoroshi:18.0.0-jdk25 with a plugin that has this form: with the bundle of the image, the designer never loads; with the bundle built from this branch, it loads and renders the nested Label and URL fields.

@mathieuancelin
mathieuancelin merged commit eeda140 into MAIF:master Oct 26, 2026
3 checks passed
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.

The route designer does not load when an installed plugin has a form field named label

2 participants