Skip to content

chore: add allowed media types lambda#1026

Closed
OmarAlJarrah wants to merge 5 commits intomainfrom
OmarAlJarrah/add-allowed-media-types-lambda
Closed

chore: add allowed media types lambda#1026
OmarAlJarrah wants to merge 5 commits intomainfrom
OmarAlJarrah/add-allowed-media-types-lambda

Conversation

@OmarAlJarrah
Copy link
Contributor

@OmarAlJarrah OmarAlJarrah commented Mar 3, 2025

Situation

In the context of our current API operations, the GetCarsListingsOperationParams and GetCarsDetailsOperationParams are incorrectly generating an Accept header that requests both JSON and XML content types. This is causing unnecessary complications and potential issues when interacting with the API.

Task

The goal of this change is to ensure that the Accept header only requests the JSON content type for the specified operations.

Action

To accomplish this task, I have updated the MustacheHelpers.kt file to include a new allowedMediaTypes Mustache Lambda. This lambda filters out any XML content types from the Accept header, ensuring that only JSON content types are requested. The specific changes include:

  • Adding a new Mustache Lambda to filter the media types.
  • Ensuring the context for the fragment execution only includes the filtered media types.

Testing

NaN

Results

Fixes SDK-1718.

Notes

NaN

@OmarAlJarrah OmarAlJarrah requested a review from a team as a code owner March 3, 2025 23:33
@anssari1 anssari1 deleted the OmarAlJarrah/add-allowed-media-types-lambda branch April 29, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant