Skip to content

Commit

Permalink
Merge pull request #6661 from guqing/refactor/setting-config-update
Browse files Browse the repository at this point in the history
feat: support JSON-based retrieval and update for theme and plugin configs
  • Loading branch information
JohnNiang authored Sep 28, 2024
2 parents 45a08bd + 982a45b commit a4c9067
Show file tree
Hide file tree
Showing 15 changed files with 1,071 additions and 91 deletions.
139 changes: 135 additions & 4 deletions api-docs/openapi/v3_0/aggregated.json
Original file line number Diff line number Diff line change
Expand Up @@ -2871,7 +2871,7 @@
},
"/apis/api.console.halo.run/v1alpha1/plugins/{name}/config": {
"get": {
"description": "Fetch configMap of plugin by configured configMapName.",
"description": "Fetch configMap of plugin by configured configMapName. it is deprecated since 2.20.0",
"operationId": "fetchPluginConfig",
"parameters": [
{
Expand Down Expand Up @@ -2900,7 +2900,8 @@
]
},
"put": {
"description": "Update the configMap of plugin setting.",
"deprecated": true,
"description": "Update the configMap of plugin setting, it is deprecated since 2.20.0",
"operationId": "updatePluginConfig",
"parameters": [
{
Expand Down Expand Up @@ -2939,6 +2940,70 @@
]
}
},
"/apis/api.console.halo.run/v1alpha1/plugins/{name}/json-config": {
"get": {
"description": "Fetch converted json config of plugin by configured configMapName.",
"operationId": "fetchPluginJsonConfig",
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
},
"description": "default response"
}
},
"tags": [
"PluginV1alpha1Console"
]
},
"put": {
"description": "Update the config of plugin setting.",
"operationId": "updatePluginJsonConfig",
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"required": true
},
"responses": {
"204": {
"content": {},
"description": "No Content"
}
},
"tags": [
"PluginV1alpha1Console"
]
}
},
"/apis/api.console.halo.run/v1alpha1/plugins/{name}/plugin-state": {
"put": {
"description": "Change the running state of a plugin by name.",
Expand Down Expand Up @@ -4545,7 +4610,8 @@
},
"/apis/api.console.halo.run/v1alpha1/themes/{name}/config": {
"get": {
"description": "Fetch configMap of theme by configured configMapName.",
"deprecated": true,
"description": "Fetch configMap of theme by configured configMapName. It is deprecated.",
"operationId": "fetchThemeConfig",
"parameters": [
{
Expand Down Expand Up @@ -4574,7 +4640,8 @@
]
},
"put": {
"description": "Update the configMap of theme setting.",
"deprecated": true,
"description": "Update the configMap of theme setting. It is deprecated.",
"operationId": "updateThemeConfig",
"parameters": [
{
Expand Down Expand Up @@ -4637,6 +4704,70 @@
]
}
},
"/apis/api.console.halo.run/v1alpha1/themes/{name}/json-config": {
"get": {
"description": "Fetch converted json config of theme by configured configMapName.",
"operationId": "fetchThemeJsonConfig",
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
},
"description": "default response"
}
},
"tags": [
"ThemeV1alpha1Console"
]
},
"put": {
"description": "Update the configMap of theme setting.",
"operationId": "updateThemeJsonConfig",
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"required": true
},
"responses": {
"204": {
"content": {},
"description": "No Content"
}
},
"tags": [
"ThemeV1alpha1Console"
]
}
},
"/apis/api.console.halo.run/v1alpha1/themes/{name}/reload": {
"put": {
"description": "Reload theme setting.",
Expand Down
139 changes: 135 additions & 4 deletions api-docs/openapi/v3_0/apis_console.api_v1alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@
},
"/apis/api.console.halo.run/v1alpha1/plugins/{name}/config": {
"get": {
"description": "Fetch configMap of plugin by configured configMapName.",
"description": "Fetch configMap of plugin by configured configMapName. it is deprecated since 2.20.0",
"operationId": "fetchPluginConfig",
"parameters": [
{
Expand Down Expand Up @@ -767,7 +767,8 @@
]
},
"put": {
"description": "Update the configMap of plugin setting.",
"deprecated": true,
"description": "Update the configMap of plugin setting, it is deprecated since 2.20.0",
"operationId": "updatePluginConfig",
"parameters": [
{
Expand Down Expand Up @@ -806,6 +807,70 @@
]
}
},
"/apis/api.console.halo.run/v1alpha1/plugins/{name}/json-config": {
"get": {
"description": "Fetch converted json config of plugin by configured configMapName.",
"operationId": "fetchPluginJsonConfig",
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
},
"description": "default response"
}
},
"tags": [
"PluginV1alpha1Console"
]
},
"put": {
"description": "Update the config of plugin setting.",
"operationId": "updatePluginJsonConfig",
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"required": true
},
"responses": {
"204": {
"content": {},
"description": "No Content"
}
},
"tags": [
"PluginV1alpha1Console"
]
}
},
"/apis/api.console.halo.run/v1alpha1/plugins/{name}/plugin-state": {
"put": {
"description": "Change the running state of a plugin by name.",
Expand Down Expand Up @@ -2412,7 +2477,8 @@
},
"/apis/api.console.halo.run/v1alpha1/themes/{name}/config": {
"get": {
"description": "Fetch configMap of theme by configured configMapName.",
"deprecated": true,
"description": "Fetch configMap of theme by configured configMapName. It is deprecated.",
"operationId": "fetchThemeConfig",
"parameters": [
{
Expand Down Expand Up @@ -2441,7 +2507,8 @@
]
},
"put": {
"description": "Update the configMap of theme setting.",
"deprecated": true,
"description": "Update the configMap of theme setting. It is deprecated.",
"operationId": "updateThemeConfig",
"parameters": [
{
Expand Down Expand Up @@ -2504,6 +2571,70 @@
]
}
},
"/apis/api.console.halo.run/v1alpha1/themes/{name}/json-config": {
"get": {
"description": "Fetch converted json config of theme by configured configMapName.",
"operationId": "fetchThemeJsonConfig",
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"content": {
"*/*": {
"schema": {
"type": "object"
}
}
},
"description": "default response"
}
},
"tags": [
"ThemeV1alpha1Console"
]
},
"put": {
"description": "Update the configMap of theme setting.",
"operationId": "updateThemeJsonConfig",
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
},
"required": true
},
"responses": {
"204": {
"content": {},
"description": "No Content"
}
},
"tags": [
"ThemeV1alpha1Console"
]
}
},
"/apis/api.console.halo.run/v1alpha1/themes/{name}/reload": {
"put": {
"description": "Reload theme setting.",
Expand Down
Loading

0 comments on commit a4c9067

Please sign in to comment.