/kong-plugin-metric-transform

Plugin to transform length to pre-determined metric unit.

Primary LanguageLuaApache License 2.0Apache-2.0

Kong Metric Transformation

Functionality

Added to a route with GET request and subsequent response format

{
    data: {
        value: <number>,
        metric: <string>    // metric unit "dm", "cm", "km", etc.
    }
}

this plugin will convert the data to meters { data: { value: // magnitude converted to meters metric: "m" } }

Error Handling