cenobites / flask-jsonrpc

Basic JSON-RPC implementation for your Flask-powered sites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API browser does not support more complex type anotations

Talkless opened this issue · comments

For example if we have function using Unions, Optionals:

@jsonrpc_client.method('object.trip_stop')
@jwt_required()
def object__trip_stop(
        object_id: Union[int, List[int]],
        time_from: str,
        time_to: str,
        min_moving: Optional[int] = 1,
        min_stationary: Optional[int] = 10,
        zones: Optional[List[int]] = [0],
        time_ranges: Optional[List[List[Union[int, str, str]]]] = [],
        zones_only: Optional[bool] = False,
        trip_mode: Optional[int] = 3,
        trips_stops: Optional[int] = 3
) -> Optional[str]:

We get documentation with just Objects:
image