You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
recently there was resource name mangling added to add_resource() method which blocks usingn this lib for third-party API with resource names with hyphens.
from simple_rest_client.api import API
api = API('http://some-rest-api/')
api.add_resource(resource_name='resource-name')
api.get_resource_list()
# ['resource_name']
api.resource_name.list()
# Error on GET for url 'http://some-rest-api/resource_name'
I understand why it was done,
but this completely breaks compatibility of this lib with any ext API which uses such resource names.
So maybe this mechanics should be converted into an additional helper - add "sanitized" attribute only if there is no such already?