diff --git a/backend/sdk/src/main/java/com/alibaba/higress/sdk/service/WasmPluginServiceImpl.java b/backend/sdk/src/main/java/com/alibaba/higress/sdk/service/WasmPluginServiceImpl.java index 4f03311b..28e80594 100644 --- a/backend/sdk/src/main/java/com/alibaba/higress/sdk/service/WasmPluginServiceImpl.java +++ b/backend/sdk/src/main/java/com/alibaba/higress/sdk/service/WasmPluginServiceImpl.java @@ -86,7 +86,7 @@ class WasmPluginServiceImpl implements WasmPluginService { private static final Pattern I18N_EXTENSION_KEY_PATTERN = Pattern.compile("^x-(.+)-i18n$"); private static final String DEFAULT_PLUGIN_VERSION = "1.0.0"; - private static final String EXAMPLE_RAW_PROPERTY_NAME = "exampleRaw"; + private static final String EXAMPLE_RAW_PROPERTY_NAME = "x-example-raw"; private static final Pattern YAML_CONTENT_PATTERN = Pattern.compile("^(\\s*)(\\S.*)\\s*$"); private static final String YAML_V3_SCHEMA_PROPERTY_KEY = "openAPIV3Schema:"; diff --git a/frontend/src/pages/plugin/components/PluginDrawer/GlobalPluginDetail.tsx b/frontend/src/pages/plugin/components/PluginDrawer/GlobalPluginDetail.tsx index 194eaa1f..6bb8918b 100644 --- a/frontend/src/pages/plugin/components/PluginDrawer/GlobalPluginDetail.tsx +++ b/frontend/src/pages/plugin/components/PluginDrawer/GlobalPluginDetail.tsx @@ -90,7 +90,7 @@ const GlobalPluginDetail = forwardRef((props: IProps, ref) => { onSuccess: (res) => { setConfigData(res); if (!defaultValue) { - let exampleRaw = res?.schema.exampleRaw; + let exampleRaw = res?.schema?.extensions['x-example-raw']; if (isChangeExampleRaw) { // 需要冒号后面加空格 exampleRaw = 'allow: []';