-
Notifications
You must be signed in to change notification settings - Fork 3
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
Added PDF, PNG, JPEG convenience body types #65
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi again, @toastx and thank you so much for taking time to make this awesome contribution. I made a few comments regarding some little details that you probably forgot to fix or restore. The main logic and tests are perfect, so if you fix that I'll merge asap.
If you can't apply those fixes, don't sweat it. Just tell me and I'll do it myself. Thanks again.
bin/example.toml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this file, i gues that it's a leftover for some test that you did
bin/tests/inputs/jpeg_post.toml
Outdated
Content-Type = "image/jpeg" | ||
|
||
[body] | ||
file = "D:/open-source/rede/bin/tests/assets/earth.jpeg" #modify relative path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file = "D:/open-source/rede/bin/tests/assets/earth.jpeg" #modify relative path | |
file = "./tests/assets/earth.jpeg" |
bin/tests/inputs/pdf_post.toml
Outdated
Content-Type = "application/pdf" | ||
|
||
[body] | ||
file = "D:/open-source/rede/bin/tests/assets/dummy-pdf_2.pdf" #modify relative path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file = "D:/open-source/rede/bin/tests/assets/dummy-pdf_2.pdf" #modify relative path | |
file = "./tests/assets/dummy-pdf_2.pdf" |
bin/tests/inputs/png_post.toml
Outdated
Content-Type = "image/png" | ||
|
||
[body] | ||
file = "D:/open-source/rede/bin/tests/assets/moon.png" #modify relative path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file = "D:/open-source/rede/bin/tests/assets/moon.png" #modify relative path | |
file = "./tests/assets/moon.png" |
Pdf(String), | ||
#[serde(alias = "png")] | ||
Png(String), | ||
#[serde(alias = "jpeg")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[serde(alias = "jpeg")] | |
#[serde(alias = "jpg", "jpeg")] |
Let's also support jpg as a way to invoke
bin/Cargo.toml
Outdated
# rede_parser = "0.2.2" | ||
# rede_placeholders = "0.1.0" | ||
# rede_schema = "0.2.0" | ||
|
||
# rede_parser = { path = "../parser" } # local | ||
# rede_placeholders = { path = "../placeholders"} # local | ||
# rede_schema = { path = "../schema" } # local | ||
rede_parser = { path = "../parser" } # local | ||
rede_placeholders = { path = "../placeholders" } # local | ||
rede_schema = { path = "../schema" } # local |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, restore it back to its previous state
My bad, i forgot to remove the local dependencies. Also , giving path like that isnt working... it prompts rede to be in the root |
Don't worry about the request not working right now. It will work once I set-up an integration test when we upgrade the parser version as the tests executed from the Merging! |
Expanded Body of parser/src/schema/body.rs for body.pdf, body.png, body.jpeg as per #63
2024-10-17.12-43-44.mp4