Skip to content

Commit 84b40ef

Browse files
committed
Proposed fix for OAI#1830. Each variable expression in a path must have a corresponding path parameter.
1 parent 9cd19ea commit 84b40ef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

versions/3.0.3.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ An OpenAPI definition can then be used by documentation generation tools to disp
7171
A document (or set of documents) that defines or describes an API. An OpenAPI definition uses and conforms to the OpenAPI Specification.
7272

7373
##### <a name="pathTemplating"></a>Path Templating
74-
Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters.
74+
Path templating refers to the usage of variable expressions, delimited by curly braces ({}), to mark a section of a URL path as replaceable using path parameters.
75+
76+
Each variable expression in the path MUST correspond to a path parameter that is included in the [Path Item](#path-item-object) itself and/or in each of the Path Item's [Operations](#operation-object).
7577

7678
##### <a name="mediaTypes"></a>Media Types
7779
Media type definitions are spread across several resources.
@@ -1010,7 +1012,7 @@ There are four possible parameter locations specified by the `in` field:
10101012
##### Fixed Fields
10111013
Field Name | Type | Description
10121014
---|:---:|---
1013-
<a name="parameterName"></a>name | `string` | **REQUIRED**. The name of the parameter. Parameter names are *case sensitive*. <ul><li>If [`in`](#parameterIn) is `"path"`, the `name` field MUST correspond to the associated path segment from the [path](#pathsPath) field in the [Paths Object](#pathsObject). See [Path Templating](#pathTemplating) for further information.<li>If [`in`](#parameterIn) is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.<li>For all other cases, the `name` corresponds to the parameter name used by the [`in`](#parameterIn) property.</ul>
1015+
<a name="parameterName"></a>name | `string` | **REQUIRED**. The name of the parameter. Parameter names are *case sensitive*. <ul><li>If [`in`](#parameterIn) is `"path"`, the `name` field MUST correspond to a variable expression occurring at least once within the [path](#pathsPath) field in the [Paths Object](#pathsObject). See [Path Templating](#pathTemplating) for further information.<li>If [`in`](#parameterIn) is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.<li>For all other cases, the `name` corresponds to the parameter name used by the [`in`](#parameterIn) property.</ul>
10141016
<a name="parameterIn"></a>in | `string` | **REQUIRED**. The location of the parameter. Possible values are `"query"`, `"header"`, `"path"` or `"cookie"`.
10151017
<a name="parameterDescription"></a>description | `string` | A brief description of the parameter. This could contain examples of use. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation.
10161018
<a name="parameterRequired"></a>required | `boolean` | Determines whether this parameter is mandatory. If the [parameter location](#parameterIn) is `"path"`, this property is **REQUIRED** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`.

0 commit comments

Comments
 (0)