Home > cdk-rest-api-with-spec > IResourceWithSpec
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
aws_apigateway.IResource augmented with the features to build the OpenAPI definition.
Signature:
export interface IResourceWithSpec extends apigateway.Resource
Extends: apigateway.Resource
Although this interface actually inherits aws_apigateway.Resource, you should rely on only properties defined in aws_apigateway.IResource.
Property | Modifiers | Type | Description |
---|---|---|---|
defaultMethodOptions? | MethodOptionsWithSpec | (BETA) (Optional) Default method options with the OpenAPI definition. | |
parentResource? | IResourceWithSpec | (BETA) (Optional) Parent resource. |
Method | Description |
---|---|
addMethod(httpMethod, target, options) | (BETA) Adds a method with the OpenAPI definition. |
addResource(pathPart, options) | (BETA) Adds a new child resource with the OpenAPI definition. |