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

Feat/support non hash value in request body #361

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ryu-sato
Copy link

Hi, team.

This PR allows for interpretation and validation when a non-object is given in the request body. (ex. [{ "key1": "value1" }])

Closes #220

@makdad
Copy link
Contributor

makdad commented Jul 24, 2022

I guess my thought is, "if it is this easy to implement, there was probably some good reason why it wasn't implemented in the first place?". @ota42y do you have any comment as to why this was initially not supported?

I can't comment on the code completeness as I am not so familiar with this part of the library.

@ryu-sato
Copy link
Author

I also thought that there was some good reason why they were not implemented too.

So I wanted to hear the reason/response policy in the Issue #220.

@ota42y ota42y self-requested a review January 21, 2023 09:21
Copy link
Member

@ota42y ota42y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

I forget the details because it was so long ago...
When we created the issue, we didn't need to fix it soon because we only use JSON object in production.
( The Issuer is a colleague and we talked about this problem in office )

This is a long-standing issue and there is no particular reason why it is not currently supported.
8fb1853

JSON also allows non-objects to be placed at the top level.
So this is a very good change!
If we keep this change, the test will fail, so we would like you to fix this and add a test case for the following patch.

The patch will remove unnecessary error handling to fix the bug.

out.patch

@ryu-sato ryu-sato force-pushed the feat/support-non-hash-value-in-request-body branch from 94ecc6d to 2bc8b67 Compare January 22, 2023 08:38
@ryu-sato
Copy link
Author

I forgot about the implementation of the committee and the PR made by myself, so please give me some time...

@ota42y
Copy link
Member

ota42y commented Jan 22, 2023

No problem. Sorry for the delay in responding 🙇 🙇 🙇

@ryu-sato ryu-sato force-pushed the feat/support-non-hash-value-in-request-body branch from 2bc8b67 to eb536ea Compare January 28, 2023 10:41
@ryu-sato ryu-sato requested a review from ota42y January 28, 2023 10:42
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.

No support for request body which is not Hash
3 participants