Open ln-ws opened 2 months ago
Thanks for the request @ln-ws, can you explain the actual real-world use-case where this is desired?
I'd just like to understand the scenario where it'd important to ensure additional added API endpoints have their own examples built in.
We wrote a logical theme which (besides other customizations) extends the api to include endpoints for token management. We are working with multiple person on extending the Logical Theme, implementing an api client and integrating the functionality in our solution. When working in a team it's great to have the api documentation in a single place.
We are versioning our theme in git. We need to install our theme in multiple bookstack instances (dev, test, prod). Our current process is to create symlinks after cloning our repository:
ln -s ../../../themes/Our.Theme/dev/api/requests/tokens-create.json dev/api/requests/.
ln -s ../../../themes/Our.Theme/dev/api/requests/tokens-update.json dev/api/requests/.
ln -s ../../../themes/Our.Theme/dev/api/responses/tokens-create.json dev/api/responses/.
ln -s ../../../themes/Our.Theme/dev/api/responses/tokens-list.json dev/api/responses/.
ln -s ../../../themes/Our.Theme/dev/api/responses/tokens-read.json dev/api/responses/.
ln -s ../../../themes/Our.Theme/dev/api/responses/tokens-update.json dev/api/responses/.
Another scenario is publishing an api extension to the BookStack Hacks Directory - it would be great if the hack also contains the documentation and examples for new API endpoints.
Describe the feature you'd like
Implement a mechanism for BookStack to recognize and utilize API request/response examples stored within custom themes using the Logical Theme System. Currently, these examples must be manually linked to the /dev/api/requests and /dev/api/responses folders. We propose two possible solutions:
Describe the benefits this would bring to existing BookStack users
Can the goal of this request already be achieved via other means?
Yes, the goal can currently be achieved by manually creating symlinks from the theme's examples to the /dev/api/requests and /dev/api/responses folders.
Have you searched for an existing open/closed issue?
How long have you been using BookStack?
3 months to 1 year
Additional context
No response