Skip to content

Commit bac7bbb

Browse files
committed
docs: update api-docs
1 parent 49139be commit bac7bbb

21 files changed

+101
-265
lines changed

api-docs/cdk-rest-api-with-spec.api.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,18 @@ export interface IAuthorizerWithSpec extends aws_apigateway.IAuthorizer {
1818
securitySchemeObject?: SecuritySchemeObject;
1919
}
2020

21-
// @beta
22-
export interface IBaseResourceWithSpec extends aws_apigateway.IResource {
23-
addMethod(httpMethod: string, target?: aws_apigateway.Integration, options?: MethodOptionsWithSpec): aws_apigateway.Method;
24-
addResource(pathPart: string, options?: ResourceOptionsWithSpec): IResourceWithSpec;
25-
defaultMethodOptions?: MethodOptionsWithSpec;
26-
parentResource?: IBaseResourceWithSpec;
27-
}
28-
2921
// @beta
3022
export interface IResourceWithSpec extends aws_apigateway.Resource {
3123
addMethod(httpMethod: string, target?: aws_apigateway.Integration, options?: MethodOptionsWithSpec): aws_apigateway.Method;
3224
addResource(pathPart: string, options?: ResourceOptionsWithSpec): IResourceWithSpec;
3325
defaultMethodOptions?: MethodOptionsWithSpec;
34-
parentResource?: IBaseResourceWithSpec;
26+
parentResource?: IResourceWithSpec;
3527
}
3628

3729
// @beta
38-
export interface IRestApiWithSpec extends aws_apigateway.RestApi {
30+
export interface IRestApiWithSpec extends aws_apigateway.IRestApi {
3931
addModel(id: string, props: ModelOptionsWithSpec): aws_apigateway.Model;
40-
root: IBaseResourceWithSpec;
41-
underlying: aws_apigateway.RestApi;
32+
readonly root: IResourceWithSpec;
4233
}
4334

4435
// @beta
@@ -109,18 +100,16 @@ export interface ResourceOptionsWithSpec extends aws_apigateway.ResourceOptions
109100
}
110101

111102
// @beta
112-
export type RestApiFactory = (scope: Construct, id: string, props?: aws_apigateway.RestApiProps) => aws_apigateway.RestApi;
113-
114-
// @beta
115-
export class RestApiWithSpec {
116-
static createRestApi(scope: Construct, id: string, props: RestApiWithSpecProps): IRestApiWithSpec;
103+
export class RestApiWithSpec extends aws_apigateway.RestApi implements IRestApiWithSpec {
104+
constructor(scope: Construct, id: string, props: RestApiWithSpecProps);
105+
addModel(id: string, props: ModelOptionsWithSpec): aws_apigateway.Model;
117106
// (undocumented)
118107
readonly props: RestApiWithSpecProps;
108+
readonly root: IResourceWithSpec;
119109
}
120110

121111
// @beta
122112
export interface RestApiWithSpecProps extends aws_apigateway.RestApiProps {
123-
newRestApi?: RestApiFactory;
124113
openApiInfo: Partial<InfoObject> & Pick<InfoObject, 'version'>;
125114
openApiOutputPath: string;
126115
}

api-docs/markdown/cdk-rest-api-with-spec.ibaseresourcewithspec.addmethod.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

api-docs/markdown/cdk-rest-api-with-spec.ibaseresourcewithspec.addresource.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

api-docs/markdown/cdk-rest-api-with-spec.ibaseresourcewithspec.defaultmethodoptions.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

api-docs/markdown/cdk-rest-api-with-spec.ibaseresourcewithspec.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

api-docs/markdown/cdk-rest-api-with-spec.ibaseresourcewithspec.parentresource.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

api-docs/markdown/cdk-rest-api-with-spec.iresourcewithspec.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
88
>
99
10-
[aws\_apigateway.Resource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.Resource.html) augmented with the features to build the OpenAPI definition.
10+
[aws\_apigateway.IResource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IResource.html) augmented with the features to build the OpenAPI definition.
1111

1212
<b>Signature:</b>
1313

@@ -16,12 +16,16 @@ export interface IResourceWithSpec extends apigateway.Resource
1616
```
1717
<b>Extends:</b> apigateway.Resource
1818
19+
## Remarks
20+
21+
Although this interface actually inherits [aws\_apigateway.Resource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.Resource.html)<!-- -->, you should rely on only properties defined in [aws\_apigateway.IResource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IResource.html)<!-- -->.
22+
1923
## Properties
2024
2125
| Property | Modifiers | Type | Description |
2226
| --- | --- | --- | --- |
2327
| [defaultMethodOptions?](./cdk-rest-api-with-spec.iresourcewithspec.defaultmethodoptions.md) | | [MethodOptionsWithSpec](./cdk-rest-api-with-spec.methodoptionswithspec.md) | <b><i>(BETA)</i></b> <i>(Optional)</i> Default method options with the OpenAPI definition. |
24-
| [parentResource?](./cdk-rest-api-with-spec.iresourcewithspec.parentresource.md) | | [IBaseResourceWithSpec](./cdk-rest-api-with-spec.ibaseresourcewithspec.md) | <b><i>(BETA)</i></b> <i>(Optional)</i> Parent resource. |
28+
| [parentResource?](./cdk-rest-api-with-spec.iresourcewithspec.parentresource.md) | | [IResourceWithSpec](./cdk-rest-api-with-spec.iresourcewithspec.md) | <b><i>(BETA)</i></b> <i>(Optional)</i> Parent resource. |
2529
2630
## Methods
2731

api-docs/markdown/cdk-rest-api-with-spec.iresourcewithspec.parentresource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Parent resource.
1212
<b>Signature:</b>
1313

1414
```typescript
15-
parentResource?: IBaseResourceWithSpec;
15+
parentResource?: IResourceWithSpec;
1616
```
1717

1818
## Remarks

api-docs/markdown/cdk-rest-api-with-spec.irestapiwithspec.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@
1212
<b>Signature:</b>
1313

1414
```typescript
15-
export interface IRestApiWithSpec extends apigateway.RestApi
15+
export interface IRestApiWithSpec extends apigateway.IRestApi
1616
```
17-
<b>Extends:</b> apigateway.RestApi
17+
<b>Extends:</b> apigateway.IRestApi
1818
1919
## Properties
2020
2121
| Property | Modifiers | Type | Description |
2222
| --- | --- | --- | --- |
23-
| [root](./cdk-rest-api-with-spec.irestapiwithspec.root.md) | | [IBaseResourceWithSpec](./cdk-rest-api-with-spec.ibaseresourcewithspec.md) | <b><i>(BETA)</i></b> Root resource ('/') with the features to build the OpenAPI definition. |
24-
| [underlying](./cdk-rest-api-with-spec.irestapiwithspec.underlying.md) | | apigateway.RestApi | <b><i>(BETA)</i></b> Underlying [aws\_apigateway.RestApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApi.html) object. |
23+
| [root](./cdk-rest-api-with-spec.irestapiwithspec.root.md) | <code>readonly</code> | [IResourceWithSpec](./cdk-rest-api-with-spec.iresourcewithspec.md) | <b><i>(BETA)</i></b> Root resource ('/') with the features to build the OpenAPI definition. |
2524
2625
## Methods
2726

api-docs/markdown/cdk-rest-api-with-spec.irestapiwithspec.root.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ Root resource ('/') with the features to build the OpenAPI definition.
1212
<b>Signature:</b>
1313

1414
```typescript
15-
root: IBaseResourceWithSpec;
15+
readonly root: IResourceWithSpec;
1616
```

0 commit comments

Comments
 (0)