Skip to content

chore(apigateway): remove default* properties from SpecRestApi#9099

Merged
mergify[bot] merged 2 commits intomasterfrom
nija-at/apigw-restapioptions
Jul 16, 2020
Merged

chore(apigateway): remove default* properties from SpecRestApi#9099
mergify[bot] merged 2 commits intomasterfrom
nija-at/apigw-restapioptions

Conversation

@nija-at
Copy link
Copy Markdown
Contributor

@nija-at nija-at commented Jul 16, 2020

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 #8347

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

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 #8347

[1]: #8347 (comment)
[2]: #8347 (comment)

BREAKING CHANGE: `defaultMethodOptions`, `defaultCorsPreflightOptions`
and `defaultIntegration` have been removed from `SpecRestApiProps`.
@nija-at nija-at requested a review from a team July 16, 2020 09:55
@nija-at nija-at self-assigned this Jul 16, 2020
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jul 16, 2020
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 16, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: e89c1d5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 16, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 06842d6 into master Jul 16, 2020
@mergify mergify bot deleted the nija-at/apigw-restapioptions branch July 16, 2020 10:55
curtiseppel pushed a commit to curtiseppel/aws-cdk that referenced this pull request Aug 11, 2020
)

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*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

defaultMethodOptions in SpecRestApi is confusing

3 participants