Skip to content
Discussion options

You must be logged in to vote

Add a model with the Model constructor. The restApi prop accepts the IRestApi type:

const errorModel = new apigw.Model(this, "errorModal", {
    restApi,
    schema: {},
});

The addModel method isn't exposed on the IRestApi interface type returned by the fromRestApiId method. This is an implementation choice, not an underlying constraint. Under the hood, addModel just calls the Model constructor as we do above.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by mostafaDashtiGrohe
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant