Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: broken accept header #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OmarAlJarrah
Copy link
Contributor

@OmarAlJarrah OmarAlJarrah commented Mar 3, 2025

Situation

The current implementation of the operation_params.mustache template in the expediagroup-sdk uses the httpAcceptHeader block to append the "Accept" header with the media types. However, this approach does not handle multiple media types effectively, prompting the need for a more flexible solution.

Task

The goal is to refactor the operation_params.mustache template to allow appending multiple media types to the "Accept" header. This change aims to improve the handling of media types in the generated SDK code.

Action

The changes made include:

  • Replacing the httpAcceptHeader block with the allowedMediaTypes block.
  • Iterating over the mediaTypes within the allowedMediaTypes block.
  • Appending each media type individually to the "Accept" header using the append("Accept", "{{.}}") statement.

Testing

NaN

Results

Fixes SDK-1718.

Notes

NaN

@OmarAlJarrah OmarAlJarrah requested a review from a team as a code owner March 3, 2025 23:31
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