Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(apigateway): remove default* properties from SpecRestApi (aws#9099
) SpecRestApiProps contained `defaultMethodOptions`, `defaultCorsPreflightOptions` and `defaultIntegration` as properties. However, these defaults are only applied to Methods and Resources defined via addMethod() and addResource() APIs. These do *not* apply to Resources and Methods defined in the OpenAPI spec. Users have complained that this is unclear [1] [2]. This PR removes these options from the constructor properties of `SpecRestApi`. Users can still specify these when adding new Resources and new Methods. These options don't make much sense to be specified on a `SpecRestApi` since they cannot be applied to the Resources and Methods in the OpenAPI spec. This will match up with the functionality available. closes aws#8347 [1]: aws#8347 (comment) [2]: aws#8347 (comment) BREAKING CHANGE: `defaultMethodOptions`, `defaultCorsPreflightOptions` and `defaultIntegration` have been removed from `SpecRestApiProps`. These can be specifed directly in the OpenAPI spec or via `addMethod()` and `addResource()` APIs. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information