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

Return types in Endpoint.on_get_request() should be expanded #163

Open
nsoblath opened this issue Apr 30, 2024 · 0 comments
Open

Return types in Endpoint.on_get_request() should be expanded #163

nsoblath opened this issue Apr 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@nsoblath
Copy link
Member

Currently only values are allowed as return types. But we could expand that to cover anything that can be converted into a param type.

the_node["values"].push_back(scarab.ParamValue(an_attribute))

Let's allow an_attribute to be anything convertible to param.

And perhaps if it's not convertible to param we try to convert it to a string representation. That should cover most cases.

Effectively:

try:
    converToParam(attribute)
catch [maybe RuntimeError?  or did we create a custom translator for scarab::error?]
    convertUsingRepr(attribute)
@nsoblath nsoblath added the enhancement New feature or request label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant