Last active
August 24, 2020 12:29
-
-
Save brianfoody/1cb11418a88eb79c11335495f22e69d6 to your computer and use it in GitHub Desktop.
Create EventBridge Schema from TypeScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as schemas from "@aws-cdk/aws-eventschemas"; | |
import * as cdk from "@aws-cdk/core"; | |
import { generateOpenApiSchema } from "./generators/schemaGenerator"; | |
... | |
this.schema = new schemas.CfnSchema(this, "MySchema", { | |
registryName: props.mlRegistry.attrRegistryName, | |
type: "OpenApi3", | |
description: "Schema Definition for my events", | |
content: JSON.stringify(generateOpenApiSchema("OrgEvents", "1.0.0")), | |
}); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment