Hi Thor,
describe param4 as not required
In OpenAPI, path parameters are always required. If a path parameter is optional, you need to define two paths - with and without that parameter:
paths:
/api/v1/{param1}/{param2}/{param3}:
...
/api/v1/{param1}/{param2}/{param3}/{param4}:
...
"param4" is subdivided in parameters. They serve more or less as filters. Sub parameters may be "begin", "end", "format" and others.
"begin" and "end" are e.g. unixtimestamps "format" could be "xml".
ourdomain.com/api/v1/param1/param2/param3/begin-1560730667,format-json
OpenAPI provides several serialization styles for path parameters, but there's no built-in style for dash-separated values inside a comma-separated list. The closest option is to define "param4" as a comma-separated array of strings and describe the possible prefixes and value format for each string:
openapi: 3.0.0
paths:
/api/v1/param1/param2/param3/{param4}:
get:
parameters:
- in: path
name: param4
required: true
description: >
A list of filters. Each filter is in the format
`prefix-value`. The supported prefixes are:
* `begin` and `end` - the value is a Unix timestamp.
* `format` - the value can be `json` or `xml`.
* ..
schema:
type: array
items:
type: string
minItems: 1
example:
- begin-1560730667
- format-json