Skip to content

Commit

Permalink
docs(cors): add a note about syncCorsPreflighIntegration to the cors …
Browse files Browse the repository at this point in the history
…section

closes #2289

pr #2290
  • Loading branch information
jfkisafk committed May 22, 2024
1 parent fbc7ad1 commit 9115f7f
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions docs/source-2.0/guides/model-translations/converting-to-openapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -691,29 +691,6 @@ onErrorStatusConflict (``String``)
}
}
.. _generate-openapi-setting-syncCorsPreflightIntegration:

syncCorsPreflightIntegration (``boolean``)
Set to true to sync CORS preflight integration request templates with all combinations
of content-types from other methods within the same path resource.

.. code-block:: json
:caption: smithy-build.json
{
"version": "1.0",
"plugins": {
"openapi": {
"service": "example.weather#Weather",
"syncCorsPreflightIntegration": true
}
}
}
With this enabled, the `integration's passthroughBehavior`_ for CORS preflight integration
will be set to ``never``.


----------------------------------
JSON schema configuration settings
----------------------------------
Expand Down Expand Up @@ -1573,6 +1550,29 @@ additionalAllowedCorsHeaders (``[string]``)
}
}
.. _generate-openapi-apigateway-setting-syncCorsPreflightIntegration:

syncCorsPreflightIntegration (``boolean``)
Set to true to sync CORS preflight integration request templates with all possible content-types
from other methods within the same path resource.

.. code-block:: json
:caption: smithy-build.json
{
"version": "1.0",
"plugins": {
"openapi": {
"service": "example.weather#Weather",
"syncCorsPreflightIntegration": true
}
}
}
With this enabled, the `integration's passthroughBehavior`_ for CORS preflight integration
will be set to ``never``.

Binary types
============

Expand Down Expand Up @@ -1671,6 +1671,10 @@ additions during the OpenAPI conversion:
* Adds static CORS response headers to API Gateway "gateway" responses. These are added only when
no gateway responses are defined in the OpenAPI model.

.. note::
If :ref:`syncCorsPreflightIntegration <generate-openapi-apigateway-setting-syncCorsPreflightIntegration>` is
set to ``true``, the CORS preflight `integration's passthroughBehavior`_ will be set to ``never`` and the integration's
request templates will be synced with all possible content-types from other methods within the same path resource.

.. _authorizers:

Expand Down

0 comments on commit 9115f7f

Please sign in to comment.