From ef3dc37e54b6de0439ad17591b5482b09faaf459 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Thu, 14 Apr 2016 23:41:24 -0700 Subject: [PATCH 1/2] added cookie parameter --- versions/3.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/versions/3.0.md b/versions/3.0.md index dd44977584..9fe33bfc80 100644 --- a/versions/3.0.md +++ b/versions/3.0.md @@ -582,7 +582,7 @@ Describes a single operation parameter. A unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). -There are five possible parameter types. +There are six possible parameter types. * Path - Used together with [Path Templating](#pathTemplating), where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, the path parameter is `itemId`. * Query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`. * Header - Custom headers that are expected as part of the request. @@ -590,12 +590,12 @@ There are five possible parameter types. * Form - Used to describe the payload of an HTTP request when either `application/x-www-form-urlencoded`, `multipart/form-data` or both are used as the content type of the request (in the OpenAPI Specification's definition, the [`consumes`](#operationConsumes) property of an operation). This is the only parameter type that can be used to send files, thus supporting the `file` type. Since form parameters are sent in the payload, they cannot be declared together with a body parameter for the same operation. Form parameters have a different format based on the content-type used (for further details, consult http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4): * `application/x-www-form-urlencoded` - Similar to the format of Query parameters but as a payload. For example, `foo=1&bar=swagger` - both `foo` and `bar` are form parameters. This is normally used for simple parameters that are being transferred. * `multipart/form-data` - each parameter takes a section in the payload with an internal header. For example, for the header `Content-Disposition: form-data; name="submit-name"` the name of the parameter is `submit-name`. This type of form parameters is more commonly used for file transfers. - +* Cookie - Used to pass a specific cookie value to the API. Cookies are passed specifically through the `Set-Cookie: {name}={value}` syntax. ##### Fixed Fields Field Name | Type | Description ---|:---:|--- name | `string` | **Required.** The name of the parameter. Parameter names are *case sensitive*. -in | `string` | **Required.** The location of the parameter. Possible values are "query", "header", "path", "formData" or "body". +in | `string` | **Required.** The location of the parameter. Possible values are "query", "header", "path", "formData", "body", or "cookie". description | `string` | A brief description of the parameter. This could contain examples of use. [GFM syntax](https://help.github.com/articles/github-flavored-markdown) can be used for rich text representation. required | `boolean` | Determines whether this parameter is mandatory. If the parameter is [`in`](#parameterIn) "path", this property is **required** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`. deprecated | `boolean` | Specifies that a parameter is deprecated and should be transitioned out of usage. From fe4f5e20ba939f18ee47135c852d15ea21106b70 Mon Sep 17 00:00:00 2001 From: Tony Tam Date: Tue, 19 Apr 2016 23:37:35 -0700 Subject: [PATCH 2/2] removed `Set-Cookie`, not needed for the spec --- versions/3.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/3.0.md b/versions/3.0.md index 9fe33bfc80..0795b29140 100644 --- a/versions/3.0.md +++ b/versions/3.0.md @@ -590,7 +590,7 @@ There are six possible parameter types. * Form - Used to describe the payload of an HTTP request when either `application/x-www-form-urlencoded`, `multipart/form-data` or both are used as the content type of the request (in the OpenAPI Specification's definition, the [`consumes`](#operationConsumes) property of an operation). This is the only parameter type that can be used to send files, thus supporting the `file` type. Since form parameters are sent in the payload, they cannot be declared together with a body parameter for the same operation. Form parameters have a different format based on the content-type used (for further details, consult http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4): * `application/x-www-form-urlencoded` - Similar to the format of Query parameters but as a payload. For example, `foo=1&bar=swagger` - both `foo` and `bar` are form parameters. This is normally used for simple parameters that are being transferred. * `multipart/form-data` - each parameter takes a section in the payload with an internal header. For example, for the header `Content-Disposition: form-data; name="submit-name"` the name of the parameter is `submit-name`. This type of form parameters is more commonly used for file transfers. -* Cookie - Used to pass a specific cookie value to the API. Cookies are passed specifically through the `Set-Cookie: {name}={value}` syntax. +* Cookie - Used to pass a specific cookie value to the API. ##### Fixed Fields Field Name | Type | Description ---|:---:|---