[go: up one dir, main page]

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

Api documentation as json or interactively? #11

Open
inktrap opened this issue Jun 24, 2023 · 1 comment
Open

Api documentation as json or interactively? #11

inktrap opened this issue Jun 24, 2023 · 1 comment

Comments

@inktrap
Copy link
inktrap commented Jun 24, 2023

I checked out the api documentation and couldn't find a way to get the modules and methods in a machine readable way. However typedoc states that you can generate json from the comments.

Could we add json somehow, maybe for something like

https://plugins-doc.logseq.com/logseq/baseInfo

it could just be:

https://plugins-doc.logseq.com/logseq/baseInfo.json

An alternative could be something like swagger, which is for OpenApi-documented RESTful apis only. But maybe there exists something comparable for typedoc?!

@inktrap
Copy link
Author
inktrap commented Jun 25, 2023

Ah I found out.json

Maybe I'll just give some background why I opened this issue.

While looking at the docs/example page (default local link is http://127.0.0.1:12315/) I got the idea to write an api client which derives its capabilities automatically from the docs/out.json. Then you wouldn't have to read the docs but have autocompletion and could validate commands before they are sent. (Edit: just wondering: could this be done genericly if typedoc permits this?)

I know there are other projects doing this, and it seems like a good idea. I even did this once by parsing html, and while it worked (and showed some errors in the documentation/api (depending on your pov) btw), but that is a route I never want to take again.

Edit: I "remembered" the project I liked, it is a wrapper/lib for tmdb: tmdbsimple. It looks pretty generic and is a "One-to-one mapping between tmdbsimple methods and TMDb endpoints."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant