We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77b8f58 commit dc80fe3Copy full SHA for dc80fe3
1 file changed
lib/tag.ts
@@ -1,25 +1,21 @@
1
import { Construct } from 'constructs';
2
import type { oas31 } from 'openapi3-ts';
3
4
-interface TagOptions {
5
- name: string;
6
- description?: string;
7
- externalDocs?: oas31.ExternalDocumentationObject;
8
-}
9
-
10
-export class Tag extends Construct {
11
- private options: TagOptions;
+export class Tag<
+ T extends oas31.TagObject = oas31.TagObject,
+> extends Construct {
+ private options: T;
12
13
public get name() {
14
return this.options.name;
15
}
16
17
- constructor(scope: Construct, id: string, options: TagOptions) {
+ constructor(scope: Construct, id: string, options: T) {
18
super(scope, id);
19
this.options = options;
20
21
22
- public synth(): oas31.TagObject {
+ public synth() {
23
return this.options;
24
25
0 commit comments