Copyright | (c) 2013-2017 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Undocumented operation.
- createDocumentationPart :: Text -> DocumentationPartLocation -> Text -> CreateDocumentationPart
- data CreateDocumentationPart
- cdpRestAPIId :: Lens' CreateDocumentationPart Text
- cdpLocation :: Lens' CreateDocumentationPart DocumentationPartLocation
- cdpProperties :: Lens' CreateDocumentationPart Text
- documentationPart :: DocumentationPart
- data DocumentationPart
- dpLocation :: Lens' DocumentationPart (Maybe DocumentationPartLocation)
- dpId :: Lens' DocumentationPart (Maybe Text)
- dpProperties :: Lens' DocumentationPart (Maybe Text)
Creating a Request
createDocumentationPart Source #
Creates a value of CreateDocumentationPart
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cdpRestAPIId
- [Required] The string identifier of the associatedRestApi
.cdpLocation
- [Required] The location of the targeted API entity of the to-be-created documentation part.cdpProperties
- [Required] The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only Swagger-compliant key-value pairs can be exported and, hence, published.
data CreateDocumentationPart Source #
Creates a new documentation part of a given API.
See: createDocumentationPart
smart constructor.
Request Lenses
cdpRestAPIId :: Lens' CreateDocumentationPart Text Source #
- Required
- The string identifier of the associated
RestApi
.
cdpLocation :: Lens' CreateDocumentationPart DocumentationPartLocation Source #
- Required
- The location of the targeted API entity of the to-be-created documentation part.
cdpProperties :: Lens' CreateDocumentationPart Text Source #
- Required
- The new documentation content map of the targeted API entity. Enclosed key-value pairs are API-specific, but only Swagger-compliant key-value pairs can be exported and, hence, published.
Destructuring the Response
documentationPart :: DocumentationPart Source #
Creates a value of DocumentationPart
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dpLocation
- The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.dpId
- TheDocumentationPart
identifier, generated by Amazon API Gateway when theDocumentationPart
is created.dpProperties
- A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g.,"{ "description": "The API does ..." }"
. Only Swagger-compliant documentation-related fields from theproperties
map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension ofx-amazon-apigateway-documentation
.
data DocumentationPart Source #
A documentation part for a targeted API entity.
A documentation part consists of a content map (properties
) and a target (location
). The target specifies an API entity to which the documentation content applies. The supported API entity types are API
, AUTHORIZER
, MODEL
, RESOURCE
, METHOD
, PATH_PARAMETER
, QUERY_PARAMETER
, REQUEST_HEADER
, REQUEST_BODY
, RESPONSE
, RESPONSE_HEADER
, and RESPONSE_BODY
. Valid location
fields depend on the API entity type. All valid fields are not required.
The content map is a JSON string of API-specific key-value pairs. Although an API can use any shape for the content map, only the Swagger-compliant documentation fields will be injected into the associated API entity definition in the exported Swagger definition file.
Documenting an API , DocumentationParts
See: documentationPart
smart constructor.
Response Lenses
dpLocation :: Lens' DocumentationPart (Maybe DocumentationPartLocation) Source #
The location of the API entity to which the documentation applies. Valid fields depend on the targeted API entity type. All the valid location fields are not required. If not explicitly specified, a valid location field is treated as a wildcard and associated documentation content may be inherited by matching entities, unless overridden.
dpId :: Lens' DocumentationPart (Maybe Text) Source #
The DocumentationPart
identifier, generated by Amazon API Gateway when the DocumentationPart
is created.
dpProperties :: Lens' DocumentationPart (Maybe Text) Source #
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., "{ "description": "The API does ..." }"
. Only Swagger-compliant documentation-related fields from the properties
map are exported and, hence, published as part of the API entity definitions, while the original documentation parts are exported in a Swagger extension of x-amazon-apigateway-documentation
.