Skip to content

Commit 749f5c1

Browse files
authored
Include the scope in the package name, and more (#24)
* chore: bump dependencies * chore: replace npm with run-s from npm-run-all2 Makes the scripts package manager agnostic. * chore: include scope `@codemonger-io` in package name * chore(example): bump dependencies * chore(example): include scope `@codemonger-io` in package name * docs: update README.md - Includes the scope `@codemonger-io` in the package name - Replaces `npm` with `pnpm` * docs(example): update README Includes the scope `@codemonger-io` in the package name. * chore: configure pnpm workspace Configures the pnpm workspace that includes: - the root directory - the `example` directory The `example` package installs `@codemonger-io/cdk-rest-api-with-spec` from the workspace. * docs: update API documentation * chore: clean dist folder on build The `build` script removes the `dist` folder before building. * chore: bump version to 0.3.0
1 parent 277480b commit 749f5c1

File tree

67 files changed

+7076
-2219
lines changed

Some content is hidden

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

67 files changed

+7076
-2219
lines changed

README.ja.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[English](./README.md) / 日本語
22

3-
# cdk-rest-api-with-spec
3+
# @codemonger-io/cdk-rest-api-with-spec
44

5-
[Amazon API Gateway (API Gateway)](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html)のREST APIとその[OpenAPI](https://spec.openapis.org/oas/latest.html)定義を`cdk-rest-api-with-spec`で一度に記述。
5+
[Amazon API Gateway (API Gateway)](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html)のREST APIとその[OpenAPI](https://spec.openapis.org/oas/latest.html)定義を`@codemonger-io/cdk-rest-api-with-spec`で一度に記述。
66

77
## 誰のためのライブラリ?
88

@@ -12,7 +12,7 @@
1212
## 事前準備
1313

1414
[Node.js](https://nodejs.org/en/) v12かそれ以降をインストールしてください。
15-
このライブラリはNode.js v16.xで開発しました。
15+
このライブラリはNode.js v22.xで開発しました。
1616

1717
このライブラリはCDK**バージョン2** (CDK v2)向けに実装されており、CDKバージョン1には対応していません。
1818

@@ -21,7 +21,7 @@
2121
このレポジトリを依存関係(`dependencies`)に追加してください。
2222

2323
```sh
24-
npm install https://github.com/codemonger-io/cdk-rest-api-with-spec.git#v0.2.3
24+
npm install https://github.com/codemonger-io/cdk-rest-api-with-spec.git#v0.3.0
2525
```
2626

2727
このライブラリはCDK v2プロジェクトで使用することを想定しており、以下のモジュールは`dependencies`ではなく`peerDependencies`に含んでいます。
@@ -320,13 +320,13 @@ const authorizer = augmentAuthorizer(
320320
### 依存関係を解決する
321321

322322
```sh
323-
npm install
323+
pnpm install
324324
```
325325

326326
### ライブラリをビルドする
327327

328328
```sh
329-
npm run build
329+
pnpm build
330330
```
331331

332332
`dist`フォルダ内で以下のファイルが作成または更新されます。
@@ -341,7 +341,7 @@ npm run build
341341
### ドキュメンテーションを生成する
342342

343343
```sh
344-
npm run doc
344+
pnpm doc
345345
```
346346

347347
[`api-docs/markdown`](./api-docs/markdown)フォルダのコンテンツを置き換えます。

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
English / [日本語](./README.ja.md)
22

3-
# cdk-rest-api-with-spec
3+
# @codemonger-io/cdk-rest-api-with-spec
44

5-
Describe an [Amazon API Gateway (API Gateway)](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html) REST API and the [OpenAPI](https://spec.openapis.org/oas/latest.html) definition at once with `cdk-rest-api-with-spec`.
5+
Describe an [Amazon API Gateway (API Gateway)](https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html) REST API and the [OpenAPI](https://spec.openapis.org/oas/latest.html) definition at once with `@codemonger-io/cdk-rest-api-with-spec`.
66

77
## For whom is this library?
88

@@ -12,7 +12,7 @@ See ["Background"](#background) for more details.
1212
## Prerequisites
1313

1414
You have to install [Node.js](https://nodejs.org/en/) v12 or later.
15-
I have developed this library with Node.js v16.x.
15+
I have developed this library with Node.js v22.x.
1616

1717
This library is implemented for the CDK **version 2** (CDK v2) and does not work with the CDK version 1.
1818

@@ -21,7 +21,7 @@ This library is implemented for the CDK **version 2** (CDK v2) and does not work
2121
Please add this repository to your dependencies.
2222

2323
```sh
24-
npm install https://github.com/codemonger-io/cdk-rest-api-with-spec.git#v0.2.3
24+
npm install https://github.com/codemonger-io/cdk-rest-api-with-spec.git#v0.3.0
2525
```
2626

2727
This library is supposed to be used in a CDK v2 project, so it does not include the following modules in the `dependencies` but does in the `peerDependencies`.
@@ -320,13 +320,13 @@ The latest API documentation is available on [`api-docs/markdown/index.md`](./ap
320320
### Resolving dependencies
321321

322322
```sh
323-
npm install
323+
pnpm install
324324
```
325325

326326
### Building the library
327327

328328
```sh
329-
npm run build
329+
pnpm build
330330
```
331331

332332
You will find the following files created or updated in the `dist` folder,
@@ -341,7 +341,7 @@ You will also find the file [`api-docs/cdk-rest-api-with-spec.api.md`](./api-doc
341341
### Generating the documentation
342342

343343
```sh
344-
npm run doc
344+
pnpm doc
345345
```
346346

347347
This will replace the contents of the [`api-docs/markdown`](./api-docs/markdown) folder.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## API Report File for "cdk-rest-api-with-spec"
1+
## API Report File for "@codemonger-io/cdk-rest-api-with-spec"
22

33
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
44

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

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

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)
3+
[Home](./index.md) &gt; [@codemonger-io/cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [augmentAuthorizer](./cdk-rest-api-with-spec.augmentauthorizer.md)
44

55
## augmentAuthorizer() function
66

@@ -17,11 +17,55 @@ export declare function augmentAuthorizer(authorizer: apigateway.IAuthorizer, se
1717

1818
## Parameters
1919

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>. |
20+
<table><thead><tr><th>
2421

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
authorizer
39+
40+
41+
</td><td>
42+
43+
apigateway.IAuthorizer
44+
45+
46+
</td><td>
47+
48+
Authorizer to be augmented.
49+
50+
51+
</td></tr>
52+
<tr><td>
53+
54+
securitySchemeObject
55+
56+
57+
</td><td>
58+
59+
SecuritySchemeObject
60+
61+
62+
</td><td>
63+
64+
Security scheme object to add to `authorizer`<!-- -->.
65+
66+
67+
</td></tr>
68+
</tbody></table>
2569
**Returns:**
2670

2771
[IAuthorizerWithSpec](./cdk-rest-api-with-spec.iauthorizerwithspec.md)

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

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

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)
3+
[Home](./index.md) &gt; [@codemonger-io/cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [IAuthorizerWithSpec](./cdk-rest-api-with-spec.iauthorizerwithspec.md)
44

55
## IAuthorizerWithSpec interface
66

@@ -18,7 +18,44 @@ export interface IAuthorizerWithSpec extends apigateway.IAuthorizer
1818
1919
## Properties
2020
21-
| Property | Modifiers | Type | Description |
22-
| --- | --- | --- | --- |
23-
| [securitySchemeObject?](./cdk-rest-api-with-spec.iauthorizerwithspec.securityschemeobject.md) | | SecuritySchemeObject | **_(BETA)_** _(Optional)_ Security scheme object representing this authorizer. |
21+
<table><thead><tr><th>
2422
23+
Property
24+
25+
26+
</th><th>
27+
28+
Modifiers
29+
30+
31+
</th><th>
32+
33+
Type
34+
35+
36+
</th><th>
37+
38+
Description
39+
40+
41+
</th></tr></thead>
42+
<tbody><tr><td>
43+
44+
[securitySchemeObject?](./cdk-rest-api-with-spec.iauthorizerwithspec.securityschemeobject.md)
45+
46+
47+
</td><td>
48+
49+
50+
</td><td>
51+
52+
SecuritySchemeObject
53+
54+
55+
</td><td>
56+
57+
**_(BETA)_** _(Optional)_ Security scheme object representing this authorizer.
58+
59+
60+
</td></tr>
61+
</tbody></table>

api-docs/markdown/cdk-rest-api-with-spec.iauthorizerwithspec.securityschemeobject.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

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)
3+
[Home](./index.md) &gt; [@codemonger-io/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)
44

55
## IAuthorizerWithSpec.securitySchemeObject property
66

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

Lines changed: 63 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

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)
3+
[Home](./index.md) &gt; [@codemonger-io/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)
44

55
## IResourceWithSpec.addMethod() method
66

@@ -17,12 +17,69 @@ addMethod(httpMethod: string, target?: apigateway.Integration, options?: MethodO
1717

1818
## Parameters
1919

20-
| Parameter | Type | Description |
21-
| --- | --- | --- |
22-
| httpMethod | string | |
23-
| target | apigateway.Integration | _(Optional)_ |
24-
| options | [MethodOptionsWithSpec](./cdk-rest-api-with-spec.methodoptionswithspec.md) | _(Optional)_ |
20+
<table><thead><tr><th>
2521

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
httpMethod
39+
40+
41+
</td><td>
42+
43+
string
44+
45+
46+
</td><td>
47+
48+
49+
</td></tr>
50+
<tr><td>
51+
52+
target
53+
54+
55+
</td><td>
56+
57+
apigateway.Integration
58+
59+
60+
</td><td>
61+
62+
_(Optional)_
63+
64+
65+
</td></tr>
66+
<tr><td>
67+
68+
options
69+
70+
71+
</td><td>
72+
73+
[MethodOptionsWithSpec](./cdk-rest-api-with-spec.methodoptionswithspec.md)
74+
75+
76+
</td><td>
77+
78+
_(Optional)_
79+
80+
81+
</td></tr>
82+
</tbody></table>
2683
**Returns:**
2784

2885
apigateway.Method

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

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

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; [addResource](./cdk-rest-api-with-spec.iresourcewithspec.addresource.md)
3+
[Home](./index.md) &gt; [@codemonger-io/cdk-rest-api-with-spec](./cdk-rest-api-with-spec.md) &gt; [IResourceWithSpec](./cdk-rest-api-with-spec.iresourcewithspec.md) &gt; [addResource](./cdk-rest-api-with-spec.iresourcewithspec.addresource.md)
44

55
## IResourceWithSpec.addResource() method
66

@@ -17,11 +17,53 @@ addResource(pathPart: string, options?: ResourceOptionsWithSpec): IResourceWithS
1717

1818
## Parameters
1919

20-
| Parameter | Type | Description |
21-
| --- | --- | --- |
22-
| pathPart | string | |
23-
| options | [ResourceOptionsWithSpec](./cdk-rest-api-with-spec.resourceoptionswithspec.md) | _(Optional)_ |
20+
<table><thead><tr><th>
2421

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
pathPart
39+
40+
41+
</td><td>
42+
43+
string
44+
45+
46+
</td><td>
47+
48+
49+
</td></tr>
50+
<tr><td>
51+
52+
options
53+
54+
55+
</td><td>
56+
57+
[ResourceOptionsWithSpec](./cdk-rest-api-with-spec.resourceoptionswithspec.md)
58+
59+
60+
</td><td>
61+
62+
_(Optional)_
63+
64+
65+
</td></tr>
66+
</tbody></table>
2567
**Returns:**
2668

2769
[IResourceWithSpec](./cdk-rest-api-with-spec.iresourcewithspec.md)

0 commit comments

Comments
 (0)