Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support JSON-based retrieval and update for theme and plugin configs #6661

Merged
merged 5 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading