| 741 | |
| 742 | |
| 743 | class Endpoint(object): |
| 744 | def __init__( |
| 745 | self, |
| 746 | settings=None, |
| 747 | params_map=None, |
| 748 | root_map=None, |
| 749 | headers_map=None, |
| 750 | api_client=None, |
| 751 | callable=None, |
| 752 | ): |
| 753 | """Creates an endpoint |
| 754 | |
| 755 | Args: |
| 756 | settings (dict): see below key value pairs |
| 757 | 'response_type' (tuple/None): response type |
| 758 | 'auth' (list): a list of auth type keys |
| 759 | 'endpoint_path' (str): the endpoint path |
| 760 | 'operation_id' (str): endpoint string identifier |
| 761 | 'http_method' (str): POST/PUT/PATCH/GET etc |
| 762 | 'servers' (list): list of str servers that this endpoint is at |
| 763 | params_map (dict): see below key value pairs |
| 764 | 'all' (list): list of str endpoint parameter names |
| 765 | 'required' (list): list of required parameter names |
| 766 | 'nullable' (list): list of nullable parameter names |
| 767 | 'enum' (list): list of parameters with enum values |
| 768 | 'validation' (list): list of parameters with validations |
| 769 | root_map |
| 770 | 'validations' (dict): the dict mapping endpoint parameter tuple |
| 771 | paths to their validation dictionaries |
| 772 | 'allowed_values' (dict): the dict mapping endpoint parameter |
| 773 | tuple paths to their allowed_values (enum) dictionaries |
| 774 | 'openapi_types' (dict): param_name to openapi type |
| 775 | 'attribute_map' (dict): param_name to camelCase name |
| 776 | 'location_map' (dict): param_name to 'body', 'file', 'form', |
| 777 | 'header', 'path', 'query' |
| 778 | collection_format_map (dict): param_name to `csv` etc. |
| 779 | headers_map (dict): see below key value pairs |
| 780 | 'accept' (list): list of Accept header strings |
| 781 | 'content_type' (list): list of Content-Type header strings |
| 782 | api_client (ApiClient) api client instance |
| 783 | callable (function): the function which is invoked when the |
| 784 | Endpoint is called |
| 785 | """ |
| 786 | self.settings = settings |
| 787 | self.params_map = params_map |
| 788 | self.params_map["all"].extend( |
| 789 | [ |
| 790 | "async_req", |
| 791 | "_host_index", |
| 792 | "_preload_content", |
| 793 | "_request_timeout", |
| 794 | "_return_http_data_only", |
| 795 | "_check_input_type", |
| 796 | "_check_return_type", |
| 797 | "_content_type", |
| 798 | "_spec_property_naming", |
| 799 | "_request_auths", |
| 800 | ] |
nothing calls this directly
no outgoing calls
no test coverage detected