pyramid_openapi3 icon indicating copy to clipboard operation
pyramid_openapi3 copied to clipboard

Fix for #104, adding support for mounted apps

Open goodwillcoding opened this issue 1 year ago • 4 comments

goodwillcoding avatar May 08 '24 07:05 goodwillcoding

@zupo this is the fix I mentioned in #104 ... let me know if it looks ok to you and if you'd want it and I'll add tests

goodwillcoding avatar May 08 '24 07:05 goodwillcoding

Can you please add a functional test for this?

zupo avatar May 08 '24 15:05 zupo

Hi @zupo. I cleaned up the fix and updated the existing test for test_relative_app_request which tests path_pattern and it looks like that's the only test that needed to be done.

The PR checks above fail on pyupgrade run and I have not been able to reproduce that locally either via pyupgrade or pre-commit run. Not sure what to do there.

goodwillcoding avatar May 09 '24 05:05 goodwillcoding

The PR checks above fail on pyupgrade run and I have not been able to reproduce that locally either via pyupgrade or pre-commit run. Not sure what to do there.

I'll have a look.

zupo avatar May 09 '24 09:05 zupo

Without realizing this PR was here I think I just reimplemented the same fix that @goodwillcoding had done in this PR over at https://github.com/Pylons/pyramid_openapi3/pull/263.

Mine is slightly different in that I didn't use self.request.path because the existing self.request.path_info is properly relative to script_name so you can just add script_name to everything which I think is simpler.

mmerickel avatar Dec 07 '24 01:12 mmerickel