Skip to content

Commit 1336707

Browse files
committed
docs(api-docs): add latest documentation
- `api-docs` contains the latest results of `npm run doc`.
1 parent 5e5f7b6 commit 1336707

File tree

63 files changed

+1455
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1455
-48
lines changed

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

Lines changed: 39 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,41 @@
77
import { aws_apigateway } from 'aws-cdk-lib';
88
import { BaseParameterObject } from 'openapi3-ts';
99
import { Construct } from 'constructs';
10+
import { InfoObject } from 'openapi3-ts';
1011
import { SecuritySchemeObject } from 'openapi3-ts';
1112

12-
// @public
13+
// @beta
1314
export function augmentAuthorizer(authorizer: aws_apigateway.IAuthorizer, securitySchemeObject: SecuritySchemeObject): IAuthorizerWithSpec;
1415

15-
// @public
16+
// @beta
1617
export interface IAuthorizerWithSpec extends aws_apigateway.IAuthorizer {
1718
securitySchemeObject?: SecuritySchemeObject;
1819
}
1920

20-
// @public
21+
// @beta
2122
export interface IBaseResourceWithSpec extends aws_apigateway.IResource {
22-
addMethod(httpMethod: string, target?: aws_apigateway.Integration, // TODO: augment the type
23-
options?: MethodOptionsWithSpec): aws_apigateway.Method;
23+
addMethod(httpMethod: string, target?: aws_apigateway.Integration, options?: MethodOptionsWithSpec): aws_apigateway.Method;
2424
addResource(pathPart: string, options?: ResourceOptionsWithSpec): IResourceWithSpec;
2525
defaultMethodOptions?: MethodOptionsWithSpec;
2626
parentResource?: IBaseResourceWithSpec;
2727
}
2828

29-
// @public
29+
// @beta
3030
export interface IResourceWithSpec extends aws_apigateway.Resource {
31-
addMethod(httpMethod: string, target?: aws_apigateway.Integration, // TODO: augment the type
32-
options?: MethodOptionsWithSpec): aws_apigateway.Method;
31+
addMethod(httpMethod: string, target?: aws_apigateway.Integration, options?: MethodOptionsWithSpec): aws_apigateway.Method;
3332
addResource(pathPart: string, options?: ResourceOptionsWithSpec): IResourceWithSpec;
3433
defaultMethodOptions?: MethodOptionsWithSpec;
3534
parentResource?: IBaseResourceWithSpec;
3635
}
3736

38-
// @public
37+
// @beta
3938
export interface IRestApiWithSpec extends aws_apigateway.RestApi {
4039
addModel(id: string, props: ModelOptionsWithSpec): aws_apigateway.Model;
4140
root: IBaseResourceWithSpec;
4241
underlying: aws_apigateway.RestApi;
4342
}
4443

45-
// @public
44+
// @beta
4645
export interface JsonSchemaEx extends aws_apigateway.JsonSchema {
4746
additionalItems?: JsonSchemaEx[];
4847
additionalProperties?: boolean | JsonSchemaEx;
@@ -69,69 +68,61 @@ export interface JsonSchemaEx extends aws_apigateway.JsonSchema {
6968
propertyNames?: JsonSchemaEx;
7069
}
7170

72-
// @public
73-
export type MethodOptionsWithSpec = Omit<aws_apigateway.MethodOptions, 'authorizer' | 'methodResponses'> & {
71+
// @beta
72+
export interface MethodOptionsWithSpec extends aws_apigateway.MethodOptions {
7473
authorizer?: IAuthorizerWithSpec;
75-
summary?: string;
7674
description?: string;
75+
methodResponses?: MethodResponseWithSpec[];
7776
requestParameterSchemas?: {
7877
[key: string]: BaseParameterObject;
7978
};
80-
methodResponses?: MethodResponseWithSpec[];
81-
};
79+
summary?: string;
80+
}
8281

83-
// @public
84-
export type MethodResponseWithSpec = aws_apigateway.MethodResponse & {
82+
// @beta
83+
export interface MethodResponseWithSpec extends aws_apigateway.MethodResponse {
8584
description?: string;
86-
};
85+
}
8786

88-
// @public
89-
export type ModelOptionsWithSpec = Omit<aws_apigateway.ModelOptions, 'schema'> & {
87+
// @beta
88+
export interface ModelOptionsWithSpec extends aws_apigateway.ModelOptions {
9089
schema: JsonSchemaEx;
91-
};
90+
}
9291

93-
// @public
92+
// @beta
9493
export class ParameterKey {
95-
constructor(direction: 'request' | 'response', name: string, location: 'path' | 'query' | 'header', explode: boolean);
96-
// (undocumented)
94+
constructor(
95+
direction: 'request' | 'response',
96+
name: string,
97+
location: 'path' | 'query' | 'header',
98+
explode: boolean);
9799
readonly direction: 'request' | 'response';
98-
// (undocumented)
99100
readonly explode: boolean;
100-
// (undocumented)
101101
readonly location: 'path' | 'query' | 'header';
102-
// (undocumented)
103102
readonly name: string;
104103
static parseParameterKey(key: string): ParameterKey;
105104
}
106105

107-
// @public
108-
export type Props = aws_apigateway.RestApiProps & Readonly<{
109-
newRestApi?: RestApiFactory;
110-
documentationVersion: string;
111-
}>;
112-
113-
// @public
114-
export type ResourceOptionsWithSpec = Omit<aws_apigateway.ResourceOptions, 'defaultMethodOptions'> & {
106+
// @beta
107+
export interface ResourceOptionsWithSpec extends aws_apigateway.ResourceOptions {
115108
defaultMethodOptions?: MethodOptionsWithSpec;
116-
};
109+
}
117110

118-
// @public
111+
// @beta
119112
export type RestApiFactory = (scope: Construct, id: string, props?: aws_apigateway.RestApiProps) => aws_apigateway.RestApi;
120113

121-
// @public
114+
// @beta
122115
export class RestApiWithSpec {
123-
static createRestApi(scope: Construct, id: string, props: Props): IRestApiWithSpec;
116+
static createRestApi(scope: Construct, id: string, props: RestApiWithSpecProps): IRestApiWithSpec;
124117
// (undocumented)
125-
readonly props: Props;
118+
readonly props: RestApiWithSpecProps;
126119
}
127120

128-
// @public
129-
export function translateJsonSchemaEx(restApi: aws_apigateway.IRestApi, schema: JsonSchemaEx): TranslateJsonSchemaExOutput;
130-
131-
// @public
132-
export type TranslateJsonSchemaExOutput = {
133-
gatewaySchema: aws_apigateway.JsonSchema;
134-
openapiSchema: JsonSchemaEx;
135-
};
121+
// @beta
122+
export interface RestApiWithSpecProps extends aws_apigateway.RestApiProps {
123+
newRestApi?: RestApiFactory;
124+
openApiInfo: Partial<InfoObject> & Pick<InfoObject, 'version'>;
125+
openApiOutputPath: string;
126+
}
136127

137128
```
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [augmentAuthorizer](./cdk-rest-api-with-spec.augmentauthorizer.md)
4+
5+
## augmentAuthorizer() function
6+
7+
> 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.
8+
>
9+
10+
Makes a given [aws\_apigateway.IAuthorizer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.IAuthorizer.html) an [IAuthorizerWithSpec](./cdk-rest-api-with-spec.iauthorizerwithspec.md) by augmenting it with a specified security scheme object.
11+
12+
<b>Signature:</b>
13+
14+
```typescript
15+
export declare function augmentAuthorizer(authorizer: apigateway.IAuthorizer, securitySchemeObject: SecuritySchemeObject): IAuthorizerWithSpec;
16+
```
17+
18+
## Parameters
19+
20+
| Parameter | Type | Description |
21+
| --- | --- | --- |
22+
| authorizer | apigateway.IAuthorizer | Authorizer to be augmented. |
23+
| securitySchemeObject | SecuritySchemeObject | Security scheme object to add to <code>authorizer</code>. |
24+
25+
<b>Returns:</b>
26+
27+
[IAuthorizerWithSpec](./cdk-rest-api-with-spec.iauthorizerwithspec.md)
28+
29+
`authorizer` with `securitySchemeObject`<!-- -->.
30+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [IAuthorizerWithSpec](./cdk-rest-api-with-spec.iauthorizerwithspec.md)
4+
5+
## IAuthorizerWithSpec interface
6+
7+
> 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.
8+
>
9+
10+
Authorizer augmented with the features to describe the OpenAPI definition.
11+
12+
<b>Signature:</b>
13+
14+
```typescript
15+
export interface IAuthorizerWithSpec extends apigateway.IAuthorizer
16+
```
17+
<b>Extends:</b> apigateway.IAuthorizer
18+
19+
## Properties
20+
21+
| Property | Modifiers | Type | Description |
22+
| --- | --- | --- | --- |
23+
| [securitySchemeObject?](./cdk-rest-api-with-spec.iauthorizerwithspec.securityschemeobject.md) | | SecuritySchemeObject | <b><i>(BETA)</i></b> <i>(Optional)</i> Security scheme object representing this authorizer. |
24+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [IAuthorizerWithSpec](./cdk-rest-api-with-spec.iauthorizerwithspec.md) &gt; [securitySchemeObject](./cdk-rest-api-with-spec.iauthorizerwithspec.securityschemeobject.md)
4+
5+
## IAuthorizerWithSpec.securitySchemeObject property
6+
7+
> 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.
8+
>
9+
10+
Security scheme object representing this authorizer.
11+
12+
<b>Signature:</b>
13+
14+
```typescript
15+
securitySchemeObject?: SecuritySchemeObject;
16+
```
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [IBaseResourceWithSpec](./cdk-rest-api-with-spec.ibaseresourcewithspec.md) &gt; [addMethod](./cdk-rest-api-with-spec.ibaseresourcewithspec.addmethod.md)
4+
5+
## IBaseResourceWithSpec.addMethod() method
6+
7+
> 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.
8+
>
9+
10+
Adds a method with the OpenAPI definition.
11+
12+
<b>Signature:</b>
13+
14+
```typescript
15+
addMethod(httpMethod: string, target?: apigateway.Integration, options?: MethodOptionsWithSpec): apigateway.Method;
16+
```
17+
18+
## Parameters
19+
20+
| Parameter | Type | Description |
21+
| --- | --- | --- |
22+
| httpMethod | string | |
23+
| target | apigateway.Integration | <i>(Optional)</i> |
24+
| options | [MethodOptionsWithSpec](./cdk-rest-api-with-spec.methodoptionswithspec.md) | <i>(Optional)</i> |
25+
26+
<b>Returns:</b>
27+
28+
apigateway.Method
29+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [IBaseResourceWithSpec](./cdk-rest-api-with-spec.ibaseresourcewithspec.md) &gt; [addResource](./cdk-rest-api-with-spec.ibaseresourcewithspec.addresource.md)
4+
5+
## IBaseResourceWithSpec.addResource() method
6+
7+
> 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.
8+
>
9+
10+
Adds a new child resource with the OpenAPI definition.
11+
12+
<b>Signature:</b>
13+
14+
```typescript
15+
addResource(pathPart: string, options?: ResourceOptionsWithSpec): IResourceWithSpec;
16+
```
17+
18+
## Parameters
19+
20+
| Parameter | Type | Description |
21+
| --- | --- | --- |
22+
| pathPart | string | |
23+
| options | [ResourceOptionsWithSpec](./cdk-rest-api-with-spec.resourceoptionswithspec.md) | <i>(Optional)</i> |
24+
25+
<b>Returns:</b>
26+
27+
[IResourceWithSpec](./cdk-rest-api-with-spec.iresourcewithspec.md)
28+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [IBaseResourceWithSpec](./cdk-rest-api-with-spec.ibaseresourcewithspec.md) &gt; [defaultMethodOptions](./cdk-rest-api-with-spec.ibaseresourcewithspec.defaultmethodoptions.md)
4+
5+
## IBaseResourceWithSpec.defaultMethodOptions property
6+
7+
> 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.
8+
>
9+
10+
Default method options with the OpenAPI definition.
11+
12+
<b>Signature:</b>
13+
14+
```typescript
15+
defaultMethodOptions?: MethodOptionsWithSpec;
16+
```
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [IBaseResourceWithSpec](./cdk-rest-api-with-spec.ibaseresourcewithspec.md)
4+
5+
## IBaseResourceWithSpec interface
6+
7+
> 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.
8+
>
9+
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.
11+
12+
<b>Signature:</b>
13+
14+
```typescript
15+
export interface IBaseResourceWithSpec extends apigateway.IResource
16+
```
17+
<b>Extends:</b> apigateway.IResource
18+
19+
## Remarks
20+
21+
This interface duplicates [IResourceWithSpec](./cdk-rest-api-with-spec.iresourcewithspec.md) but is necessary because [aws\_apigateway.RestApi.root](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApi.html#root) might not satisfy [aws\_apigateway.Resource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.Resource.html)<!-- -->.
22+
23+
It might not be obvious but this interface is a super-interface of [IResourceWithSpec](./cdk-rest-api-with-spec.iresourcewithspec.md)<!-- -->.
24+
25+
## Properties
26+
27+
| Property | Modifiers | Type | Description |
28+
| --- | --- | --- | --- |
29+
| [defaultMethodOptions?](./cdk-rest-api-with-spec.ibaseresourcewithspec.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. |
30+
| [parentResource?](./cdk-rest-api-with-spec.ibaseresourcewithspec.parentresource.md) | | [IBaseResourceWithSpec](./cdk-rest-api-with-spec.ibaseresourcewithspec.md) | <b><i>(BETA)</i></b> <i>(Optional)</i> Parent resource. |
31+
32+
## Methods
33+
34+
| Method | Description |
35+
| --- | --- |
36+
| [addMethod(httpMethod, target, options)](./cdk-rest-api-with-spec.ibaseresourcewithspec.addmethod.md) | <b><i>(BETA)</i></b> Adds a method with the OpenAPI definition. |
37+
| [addResource(pathPart, options)](./cdk-rest-api-with-spec.ibaseresourcewithspec.addresource.md) | <b><i>(BETA)</i></b> Adds a new child resource with the OpenAPI definition. |
38+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [IBaseResourceWithSpec](./cdk-rest-api-with-spec.ibaseresourcewithspec.md) &gt; [parentResource](./cdk-rest-api-with-spec.ibaseresourcewithspec.parentresource.md)
4+
5+
## IBaseResourceWithSpec.parentResource property
6+
7+
> 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.
8+
>
9+
10+
Parent resource.
11+
12+
<b>Signature:</b>
13+
14+
```typescript
15+
parentResource?: IBaseResourceWithSpec;
16+
```
17+
18+
## Remarks
19+
20+
`undefined` if this resource represents the root.
21+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [IResourceWithSpec](./cdk-rest-api-with-spec.iresourcewithspec.md) &gt; [addMethod](./cdk-rest-api-with-spec.iresourcewithspec.addmethod.md)
4+
5+
## IResourceWithSpec.addMethod() method
6+
7+
> 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.
8+
>
9+
10+
Adds a method with the OpenAPI definition.
11+
12+
<b>Signature:</b>
13+
14+
```typescript
15+
addMethod(httpMethod: string, target?: apigateway.Integration, options?: MethodOptionsWithSpec): apigateway.Method;
16+
```
17+
18+
## Parameters
19+
20+
| Parameter | Type | Description |
21+
| --- | --- | --- |
22+
| httpMethod | string | |
23+
| target | apigateway.Integration | <i>(Optional)</i> |
24+
| options | [MethodOptionsWithSpec](./cdk-rest-api-with-spec.methodoptionswithspec.md) | <i>(Optional)</i> |
25+
26+
<b>Returns:</b>
27+
28+
apigateway.Method
29+

0 commit comments

Comments
 (0)