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

no 400 default response #31

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

Conversation

gsemet
Copy link

@gsemet gsemet commented Nov 21, 2017

No description provided.

Signed-off-by: Gaetan Semet <[email protected]>
@coveralls
Copy link

coveralls commented Nov 22, 2017

Coverage Status

Coverage remained the same at 88.394% when pulling 175160a on Stibbons:clean_transmute into 5ef9277 on toumorokoshi:master.

@toumorokoshi
Copy link
Owner

@stibbons it's pretty guaranteed that it's possible to get a 400 response from a transmute API, as any violation of the schema will return that back as an error code.

How about an optional flag in the decorator instead? Or one can do global switches by modifying either the global (or passing in a new instance) of transmutecontext

@gsemet
Copy link
Author

gsemet commented Nov 23, 2017

Agree with the optional flag

@coveralls
Copy link

coveralls commented Nov 23, 2017

Coverage Status

Coverage increased (+0.02%) to 88.418% when pulling 46d6428 on Stibbons:clean_transmute into 5ef9277 on toumorokoshi:master.

Copy link
Owner

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

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

The code looks good, but I think you'll need to pipe that config through @Describe, by adding that option to TransmuteAttribute:

https://github.com/toumorokoshi/transmute-core/blob/master/transmute_core/decorators.py#L35

https://github.com/toumorokoshi/transmute-core/blob/master/transmute_core/attributes/__init__.py#L7

That gets wired into TransmuteFunction, which can then pull fields from that attributes struct and apply it to itself:

https://github.com/toumorokoshi/transmute-core/blob/master/transmute_core/function/transmute_function.py#L42

Also a unit test on this would be great!

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.

3 participants