Client & API Versioning makes easier.
Shephered is a kong plugin for Client & API Versioning
and Shortens your API Endpoint
.
Your client doesn't have to know which API version it is using.
It's the responsibility of API Gateway.
Shephered plugin enables Kong
takes in charge with matching Client Version
with API Version
- Before Start, enable Shepherd Plugin from kong.
luarocks install kong-plugin-shepherd
export KONG_CUSTOM_PLUGINS=shepherd
kong migrations up
kong start
- Add some API's to kong.
- Type
<kong_admin_host>/shepherd
in your browser and add your versioning rules!
- And you are good to go.
Following Use-case with modifying variable of Shepherd plugin will be like this.
Convert
=> converted by Shepherd Plugin
Bypass
=> bypass Shepherd Plugin
redirect | client_ver | results |
---|---|---|
None | O | Convert |
None | X | Bypass |
1 | O | Convert |
1 | X | Bypass |
NOT 1 | O | Bypass |
NOT 1 | X | Bypass |