-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Feature request: function (view) overloading? #378
Comments
It seems good to me, even the presentation of the overloadings, 👍 |
Not sure about "alias" keyword though, maybe it there will be "needed" for other feature in the future, but not sure what else to suggest.
|
I was thought in some think like that:
|
The idea of overloading was to avoid having Maybe I do not follow this example. What will be in the bodies of these two |
No, did you see it right, I didn't see that were two completely different functions, and I thought about the In that case, I have a bad feeling regarding it, Flask doesn't allow mapping two functions to one URL, the opposite is true. Besides that, to do that, we will need to analyze the input (payload) and choice the right function to trigger, and further more, changing the way of register of functions in Flask-JSONRPC, from |
OK, could then some sort of Then, inside that "generated" method implementation, it would select best match from Not sure how would |
The expected behavior is that when using the modular way, the API Browser merges in one, instead of having one API Browser for each. Now, the server is aware of the `SERVER_NAME` Flask configuration, it is being used by API Browser to request the correct server, besides that, the API Browser is able to call servers in different domains. For that configuration, the `JSONRPCSite` generates the `path` and `base_url` variables from `SERVER_NAME`, `APPLICATION_ROOT`, and `PREFERRED_URL_SCHEME`. It is the first step to providing a Browse Schema to improve documentation and examples from API (JSON-RPC methods). Resolves: #388 See: #378, #377, #376, #374, #373, and #370
The expected behavior is that when using the modular way, the API Browser merges in one, instead of having one API Browser for each. Now, the server is aware of the `SERVER_NAME` Flask configuration, it is being used by API Browser to request the correct server, besides that, the API Browser is able to call servers in different domains. For that configuration, the `JSONRPCSite` generates the `path` and `base_url` variables from `SERVER_NAME`, `APPLICATION_ROOT`, and `PREFERRED_URL_SCHEME`. It is the first step to providing a Browse Schema to improve documentation and examples from API (JSON-RPC methods). Resolves: #388 See: #378, #377, #376, #374, #373, and #370
The expected behavior is that when using the modular way, the API Browser merges in one, instead of having one API Browser for each. Now, the server is aware of the `SERVER_NAME` Flask configuration, it is being used by API Browser to request the correct server, besides that, the API Browser is able to call servers in different domains. For that configuration, the `JSONRPCSite` generates the `path` and `base_url` variables from `SERVER_NAME`, `APPLICATION_ROOT`, and `PREFERRED_URL_SCHEME`. It is the first step to providing a Browse Schema to improve documentation and examples from API (JSON-RPC methods). Resolves: #388 See: #378, #377, #376, #374, #373, and #370
The expected behavior is that when using the modular way, the API Browser merges in one, instead of having one API Browser for each. Now, the server is aware of the `SERVER_NAME` Flask configuration, it is being used by API Browser to request the correct server, besides that, the API Browser is able to call servers in different domains. For that configuration, the `JSONRPCSite` generates the `path` and `base_url` variables from `SERVER_NAME`, `APPLICATION_ROOT`, and `PREFERRED_URL_SCHEME`. It is the first step to providing a Browse Schema to improve documentation and examples from API (JSON-RPC methods). Resolves: #388 See: #378, #377, #376, #374, #373, and #370
The expected behavior is that when using the modular way, the API Browser merges in one, instead of having one API Browser for each. Now, the server is aware of the `SERVER_NAME` Flask configuration, it is being used by API Browser to request the correct server, besides that, the API Browser is able to call servers in different domains. For that configuration, the `JSONRPCSite` generates the `path` and `base_url` variables from `SERVER_NAME`, `APPLICATION_ROOT`, and `PREFERRED_URL_SCHEME`. It is the first step to providing a Browse Schema to improve documentation and examples from API (JSON-RPC methods). Resolves: #388 See: #378, #377, #376, #374, #373, and #370
The expected behavior is that when using the modular way, the API Browser merges in one, instead of having one API Browser for each. Now, the server is aware of the `SERVER_NAME` Flask configuration, it is being used by API Browser to request the correct server, besides that, the API Browser is able to call servers in different domains. For that configuration, the `JSONRPCSite` generates the `path` and `base_url` variables from `SERVER_NAME`, `APPLICATION_ROOT`, and `PREFERRED_URL_SCHEME`. It is the first step to providing a Browse Schema to improve documentation and examples from API (JSON-RPC methods). Resolves: #388 See: #378, #377, #376, #374, #373, and #370
The expected behavior is that when using the modular way, the API Browser merges in one, instead of having one API Browser for each. Now, the server is aware of the `SERVER_NAME` Flask configuration, it is being used by API Browser to request the correct server, besides that, the API Browser is able to call servers in different domains. For that configuration, the `JSONRPCSite` generates the `path` and `base_url` variables from `SERVER_NAME`, `APPLICATION_ROOT`, and `PREFERRED_URL_SCHEME`. It is the first step to providing a Browse Schema to improve documentation and examples from API (JSON-RPC methods). Resolves: #388 See: #378, #377, #376, #374, #373, and #370
The expected behavior is that when using the modular way, the API Browser merges in one, instead of having one API Browser for each. Now, the server is aware of the `SERVER_NAME` Flask configuration, it is being used by API Browser to request the correct server, besides that, the API Browser is able to call servers in different domains. For that configuration, the `JSONRPCSite` generates the `path` and `base_url` variables from `SERVER_NAME`, `APPLICATION_ROOT`, and `PREFERRED_URL_SCHEME`. It is the first step to providing a Browse Schema to improve documentation and examples from API (JSON-RPC methods). Resolves: #388 See: #378, #377, #376, #374, #373, and #370
The expected behavior is that when using the modular way, the API Browser merges in one, instead of having one API Browser for each. Now, the server is aware of the `SERVER_NAME` Flask configuration, it is being used by API Browser to request the correct server, besides that, the API Browser is able to call servers in different domains. For that configuration, the `JSONRPCSite` generates the `path` and `base_url` variables from `SERVER_NAME`, `APPLICATION_ROOT`, and `PREFERRED_URL_SCHEME`. It is the first step to providing a Browse Schema to improve documentation and examples from API (JSON-RPC methods). Resolves: #388 See: #378, #377, #376, #374, #373, and #370
The expected behavior is that when using the modular way, the API Browser merges in one, instead of having one API Browser for each. Now, the server is aware of the `SERVER_NAME` Flask configuration, it is being used by API Browser to request the correct server, besides that, the API Browser is able to call servers in different domains. For that configuration, the `JSONRPCSite` generates the `path` and `base_url` variables from `SERVER_NAME`, `APPLICATION_ROOT`, and `PREFERRED_URL_SCHEME`. It is the first step to providing a Browse Schema to improve documentation and examples from API (JSON-RPC methods). Resolves: #388 See: #378, #377, #376, #374, #373, and #370
Not sure if this would be doable in Flask at all, but instead of having view with compex signatures using Unions / Optionals / Variants:
...we could have something like this, by introducing "aliases" (or some other term) to group overloads:
The text was updated successfully, but these errors were encountered: