diff --git a/src/_secureaccesstokenauthorizer/_storage_server.py b/src/_secureaccesstokenauthorizer/_storage_server.py index 46907a22240fc54992a807ba76f7a0cbd1d3f956..ed44a7e32c0c6f3fdcd4d31bf606bec16ffc0bd8 100644 --- a/src/_secureaccesstokenauthorizer/_storage_server.py +++ b/src/_secureaccesstokenauthorizer/_storage_server.py @@ -100,9 +100,14 @@ def add_arguments(schema, kwargs): new_kwargs.update(kwargs) modified_schema = RemoteMethodSchema(**new_kwargs) # Initialized from **new_kwargs, RemoteMethodSchema.argumentNames is in - # some arbitrary, probably-incorrect order. Fix it. + # some arbitrary, probably-incorrect order. This breaks user code which + # tries to use positional arguments. Put them back in the order they were + # in originally (in the input ``schema``), prepended with the newly added + # arguments. modified_schema.argumentNames = ( + # The new arguments list(argName for (argName, _) in kwargs) + + # The original arguments in the original order schema.argumentNames ) return modified_schema