are there any plans to have an api gateway constru...
# sst
b
are there any plans to have an api gateway construct which supports open api definitions and request validation? it seems the current
sst.ApiGatewayV1Api
doesn't support it https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-apigateway.SpecRestApi.html
f
Hey @Boris Tane, does this work?
Copy code
import { SpecRestApi, ApiDefinition } from "aws-cdk-lib/aws-apigateway";

new ApiGatewayV1Api(stack, "Api", {
  cdk: {
    restApi: SpecRestApi(stack, "ApiSpec", {
      apiDefinition: ApiDefinition.fromAsset('path-to-file.json')
    }),
  },
});
Let me know if it works.. I will add an example to the doc
b
ah I ultimately decided to go another route for this problem 😕 if I get a chance to try this again I'll let you know 👍