asyrjasalo / RESTinstance

Robot Framework library for RESTful JSON APIs
https://pypi.org/project/RESTinstance
GNU Lesser General Public License v3.0
205 stars 84 forks source link

Keep splash ending from input url #52

Closed vinhntb closed 5 years ago

vinhntb commented 5 years ago

Some in case API will be different with splash ending like that /api/foo/ and /api/foo. So that we should be keep original url from input.

asyrjasalo commented 5 years ago

Yes, this is possible. Merging, crediting and releasing next RC to PyPI straight away.

After some Googling, there is no single correct answer to this. Anyway, cannot think what this would break. There is a possibility that separate schemas will be generated, if both are used interchangeably in tests. Quite an easy fix to a seemingly rare case.

vinhntb commented 5 years ago

In my case that is Django project, I apply this library to testing API. https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-APPEND_SLASH

asyrjasalo commented 5 years ago

Released: https://pypi.org/project/RESTinstance.

Thank You!

SergeySerj commented 5 years ago

+1 to this fix. We also have Django project and trailing slash is mandatory for some URLs.