Merge pull request #5622 from penpot/niwinz-api-doc-fix

🐛 Fix api docs page issue
This commit is contained in:
Aitor Moreno 2025-01-20 15:21:45 +01:00 committed by GitHub
commit 7b408e4db1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 7 deletions

View file

@ -6,6 +6,8 @@
- Fix detach when top copy is dangling and nested copy is not [Taiga #9699](https://tree.taiga.io/project/penpot/issue/9699) - Fix detach when top copy is dangling and nested copy is not [Taiga #9699](https://tree.taiga.io/project/penpot/issue/9699)
- Fix problem in plugins with `replaceColor` method [#174](https://github.com/penpot/penpot-plugins/issues/174) - Fix problem in plugins with `replaceColor` method [#174](https://github.com/penpot/penpot-plugins/issues/174)
- Fix missing methods reference on API Docs
## 2.4.1 ## 2.4.1

View file

@ -87,6 +87,7 @@
(let [params (:query-params request) (let [params (:query-params request)
pstyle (:type params "js") pstyle (:type params "js")
context (assoc context :param-style pstyle)] context (assoc context :param-style pstyle)]
{::yres/status 200 {::yres/status 200
::yres/body (-> (io/resource "app/templates/api-doc.tmpl") ::yres/body (-> (io/resource "app/templates/api-doc.tmpl")
(tmpl/render context))})) (tmpl/render context))}))
@ -207,7 +208,7 @@
(assert (sm/valid? ::rpc/methods (::rpc/methods params)) "expected valid methods")) (assert (sm/valid? ::rpc/methods (::rpc/methods params)) "expected valid methods"))
(defmethod ig/init-key ::routes (defmethod ig/init-key ::routes
[_ {:keys [methods] :as cfg}] [_ {:keys [::rpc/methods] :as cfg}]
[(let [context (prepare-doc-context methods)] [(let [context (prepare-doc-context methods)]
[["/_doc" [["/_doc"
{:handler (doc-handler context) {:handler (doc-handler context)

View file

@ -30,20 +30,21 @@
[app.util.i18n :as i18n] [app.util.i18n :as i18n]
[app.util.theme :as theme] [app.util.theme :as theme]
[beicon.v2.core :as rx] [beicon.v2.core :as rx]
[cuerdas.core :as str]
[debug] [debug]
[features] [features]
[potok.v2.core :as ptk] [potok.v2.core :as ptk]
[rumext.v2 :as mf])) [rumext.v2 :as mf]))
(log/setup! {:app :info}) (log/setup! {:app :info})
(log/set-level! :debug)
(when (= :browser cf/target) (when (= :browser cf/target)
(log/info :version (:full cf/version) (log/inf :version (:full cf/version)
:asserts *assert* :asserts *assert*
:build-date cf/build-date :build-date cf/build-date
:public-uri (dm/str cf/public-uri)) :public-uri (dm/str cf/public-uri))
(log/info :flags (str/join "," (map name cf/flags)))) (doseq [flag cf/flags]
(log/dbg :hint "flag enabled" :flag (name flag))))
(declare reinit) (declare reinit)