From 0c18fb3ec4be341d762a3ace8266f7cd645e3a9f Mon Sep 17 00:00:00 2001 From: John Niang Date: Tue, 31 Jan 2023 22:18:10 +0800 Subject: [PATCH] Fix the problem of not initializing default theme correctly (#3194) #### What type of PR is this? /kind bug /area core /milestone 2.2.x #### What this PR does / why we need it: Make requires field of Theme not required. #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/3177 #### Special notes for your reviewer: 1. Clear Halo working directory 2. Start Halo freshly #### Does this PR introduce a user-facing change? ```release-note None ``` --- src/main/java/run/halo/app/core/extension/Theme.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/run/halo/app/core/extension/Theme.java b/src/main/java/run/halo/app/core/extension/Theme.java index b755ec1f4..37f51f8f9 100644 --- a/src/main/java/run/halo/app/core/extension/Theme.java +++ b/src/main/java/run/halo/app/core/extension/Theme.java @@ -1,5 +1,7 @@ package run.halo.app.core.extension; +import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.NOT_REQUIRED; + import io.swagger.v3.oas.annotations.media.Schema; import java.util.List; import lombok.Data; @@ -60,6 +62,7 @@ public class Theme extends AbstractExtension { @Schema(description = "Deprecated, use `requires` instead.") private String require; + @Schema(requiredMode = NOT_REQUIRED) private String requires; private String settingName;