OpenAPI/Swagger 2.0 does not support matrix parameters, but they are supported in OpenAPI 3.0.
Using OpenAPI 3.0, your example:
/map/color;lat=50;long=20;scale=32000
can be defined as:
openapi: 3.0.1
...
paths:
/map/color{params}:
get:
parameters:
- in: path
name: params
required: true
# Named matrix parameters are defined as object properties
schema:
type: object
properties:
lat:
type: integer
example: 50
long:
type: integer
example: 20
scale:
type: integer
example: 32000
# Serialize this object as ;prop1=value2;prop2=value2 etc
style: matrix
explode: true
Swagger UI/Editor Support
This is supported in Swagger UI 3.15.0+ and Swagger Editor 3.5.6+. In the parameter editor, enter the parameter names and values in the JSON object format, e.g.:
{
"lat": 50,
"long": 20,
"scale": 32000
}
"Try it out" will send these parameters as matrix parameters in the URL:

Swagger-Core Support
For those using Java annotations, @MatrixParam
is supported in swagger-core 2.0. @MatrixParam
corresponds to OpenAPI 3.0's path parameters with style: matrix
(as in the example above).