You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the specification, each defined path parameter must correspond to a same-named variable placeholder in the path:
name: If in is "path", the name field MUST correspond to the associated path segment from the path field in the Paths Object. See Path Templating for further information.
There is no information about what is a valid name. Is there any restriction/recommendation about the characters that should or must be used?
For example, for:
GET <server>/api/231
231 corresponds to the path parameter.
In the following example with the name is todoID:
openapi: 3.0.1info:
title: Todo Backendversion: '1.0'paths:
'/api/{todoID}':
get:
parameters:
- name: todoIDdescription: The id of the todoschema:
format: int64type: integerin: pathrequired: trueresponses:
'200':
description: OKsummary: Get one todo
An other example with todo-id:
openapi: 3.0.1info:
title: Todo Backendversion: '1.0'paths:
'/api/{todo-id}':
get:
parameters:
- name: todo-iddescription: The id of the todoschema:
format: int64type: integerin: pathrequired: trueresponses:
'200':
description: OKsummary: Get one todo
Are both names (todoID and todo-id) allowed?
The text was updated successfully, but these errors were encountered:
According to the specification, each defined path parameter must correspond to a same-named variable placeholder in the path:
There is no information about what is a valid name. Is there any restriction/recommendation about the characters that should or must be used?
For example, for:
231
corresponds to the path parameter.In the following example with the name is
todoID
:An other example with
todo-id
:Are both names (
todoID
andtodo-id
) allowed?The text was updated successfully, but these errors were encountered: