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

How to accept optional parameters #23

Open
dashesy opened this issue Apr 28, 2020 · 0 comments
Open

How to accept optional parameters #23

dashesy opened this issue Apr 28, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@dashesy
Copy link

dashesy commented Apr 28, 2020

I want the endpoint to get 2 keys, 1 being optional. e.g.

@input_schema('b64', StandardPythonParameterType("base64_encoded_image"), convert_to_provided_type=False)
@input_schema('url', StandardPythonParameterType("image url"), convert_to_provided_type=False)
@output_schema(StandardPythonParameterType(output_sample))
def run(b64, url):
    pass

I still have to pass both inputs. And if I change this to

@input_schema('b64', StandardPythonParameterType("base64_encoded_image"), convert_to_provided_type=False)
@input_schema('url', StandardPythonParameterType("image url"), convert_to_provided_type=False)
@output_schema(StandardPythonParameterType(output_sample))
def run(b64="", url=""):
    pass

Local instance works as expected (Both parameters become optional). But if I deploy to Aci then both parameters will be always empty! They will not get values

@trangevi trangevi added the bug Something isn't working label Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants