Skip to content

Commit

Permalink
fix: Fix the bug that plugin configuration example is shown empty (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
CH3CHO authored May 30, 2024
1 parent 28e8a2f commit 1ad44e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: []';
Expand Down

0 comments on commit 1ad44e7

Please sign in to comment.