https://cerebralvalley.ai logo
#02-general-community-chat
Title
# 02-general-community-chat
c

colin fortuner

04/16/2023, 5:13 PM
Hey all, just wanted to share a useful plugin api pattern for anyone building.
Copy code
My latest plugin is a pattern for expanding your plugin's API without adding to your OpenAPI spec.

How?

It's simple. Just make your api paths generic!

/help
/run-command 

Plugin #6 - Commands API
https://twitter.com/colinfortuner/status/1647649246349258758?s=20 Also, if you're interested, i have a new plugin i'm working on that I need beta testers for! DM if interested 🙂 Code for plugin -> https://gist.github.com/cfortuner/38130debec4cc9b3412f2dbccf4d87a6
👍 1
h

Han

04/16/2023, 9:27 PM
How is this going to interact when there are multiple plugins at the same time
c

colin fortuner

04/16/2023, 9:29 PM
In practice, you probably wouldn’t name it Command API, but instead choose names specific to your api. Should be fine with multiple plugins!
Screen Shot 2023-04-16 at 5.36.22 PM.png
a

AHMAD SHADID

04/16/2023, 10:16 PM
@colin fortuner , would you mind sharing the code file ?
amazing concept ❤️
c

colin fortuner

04/16/2023, 10:26 PM
a

AHMAD SHADID

04/18/2023, 4:45 AM
Thank you Colin