Skip to content

Preserve slash in path parameter#206

Merged
thschmitt merged 1 commit intomainfrom
fix/handle-slash-path-parameter
Oct 14, 2025
Merged

Preserve slash in path parameter#206
thschmitt merged 1 commit intomainfrom
fix/handle-slash-path-parameter

Conversation

@thschmitt
Copy link
Copy Markdown
Collaborator

The slash in the path parameter should not be escaped in order to support multi path segment parameters.

Example:

This change allows the support for storage object keys in the path. The following specification would allow objectKeys to contain a slash for folder support:

paths:
  /api/{objectKey}:
    parameters:
    - name: objectKey
      in: path
      required: true
      description: The object key
      schema:
        type: string
    get:
      operationId: download
      summary: Download file

The slash in the path parameter should not be escaped in order to
support multi path segment parameters.

Example:

This change allows the support for storage object keys in the path.
The following specification would allow `objectKey`s to contain a slash
for folder support:

```
paths:
  /api/{objectKey}:
    parameters:
    - name: objectKey
      in: path
      required: true
      description: The object key
      schema:
        type: string
    get:
      operationId: download
      summary: Download file
```
@thschmitt thschmitt merged commit 7289bc4 into main Oct 14, 2025
13 checks passed
@thschmitt thschmitt deleted the fix/handle-slash-path-parameter branch October 21, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants