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

Specify charset returned from OpenSearch. #287

Closed
wants to merge 1 commit into from

Conversation

dblock
Copy link
Member

@dblock dblock commented May 8, 2024

Description

Coming from #286 where I started running dredd against the spec. It fails with the following.

fail: headers: At '/content-type' No enum match for: "application/json; charset=utf-8"

expected: 
headers: 
    Content-Type: application/json

actual: 
statusCode: 200
headers: 
    content-type: application/json; charset=UTF-8

In this PR we match the charset correctly in the spec.

I think this is right, but I am not sure.

Issues Resolved

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor

github-actions bot commented May 8, 2024

API specs implemented for 266/649 (40%) APIs.

Copy link
Contributor

github-actions bot commented May 8, 2024

API specs implemented for 266/649 (40%) APIs.

@Xtansia
Copy link
Collaborator

Xtansia commented May 8, 2024

Was wondering why this wasn't an issue with the previous dredd setup, turns out we just explicitly changed the expectation in the hooks files

transactions.expected.headers['Content-Type'] = "application/json; charset=UTF-8";

@dblock
Copy link
Member Author

dblock commented May 9, 2024

Was wondering why this wasn't an issue with the previous dredd setup, turns out we just explicitly changed the expectation in the hooks files

transactions.expected.headers['Content-Type'] = "application/json; charset=UTF-8";

Interesting! I couldn't find any explicit needs to specify the charset in the spec, so I am going to do the above hack.

@dblock dblock closed this May 9, 2024
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.

2 participants