From c004c2509fd259f83c892d867e050ed215f0271f Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 2 Jan 2025 13:40:41 -0700 Subject: [PATCH 1/3] doveadm: Simplify doveadm response display Doveadm responses are so variable, that creating an abstract system for documenting would be extremely difficult. To simplify (for now), do the following: - Only worry about HTTP API responses - Allow for free-form description of response info - Allow for markdown enabled description of the response --- components/DoveadmComponent.vue | 24 +------------- components/DoveadmHttpApiComponent.vue | 23 ++++---------- data/doveadm.js | 44 ++++++++++++++------------ lib/data/doveadm.data.js | 26 +++------------ lib/doveadm.js | 6 ---- 5 files changed, 36 insertions(+), 87 deletions(-) diff --git a/components/DoveadmComponent.vue b/components/DoveadmComponent.vue index 50e55403a..050cec2b9 100644 --- a/components/DoveadmComponent.vue +++ b/components/DoveadmComponent.vue @@ -49,7 +49,7 @@ function httpClick(k) { - +
@@ -79,28 +79,6 @@ function httpClick(k) { - - - - -
Man Page
Response Values - - - - - - - - - - - - - -
KeyTypeDescription
{{ elem.key }} - -
-
diff --git a/components/DoveadmHttpApiComponent.vue b/components/DoveadmHttpApiComponent.vue index 4feacb1c2..8217fef44 100644 --- a/components/DoveadmHttpApiComponent.vue +++ b/components/DoveadmHttpApiComponent.vue @@ -21,21 +21,10 @@ const jsonReq = ] ] -const resp = {} -if (d.response) { - for (let elem of d.response) { - resp[elem.key] = elem.example - } -} +const jsonResp = d.response?.example + ? [ [ "doveadmResponse", [ d.response.example ], "tag1" ] ] + : null -const jsonResp = -[ - [ - "doveadmResponse", - [ resp ], - "tag1" - ] -]