coding-kitties / flask-swagger-generator

A simple to use flask swagger generator working with the Flask web framework.
MIT License
6 stars 6 forks source link

Issue#22 - generate-swagger destination-path parameter issue #23

Closed fizaashraf37 closed 2 years ago

fizaashraf37 commented 2 years ago

The issue was due to the below line of code in Generator class line 53

self.file = open(destination_path, 'w')

If user does not provides the destination path parameter then it is None and line 46 and 47 set self.destination_path to current directory path if it is None. This line should be as below to fix this.

self.file = open(self.destination_path, 'w')

fizaashraf37 commented 2 years ago

I am first time contributor to this project. I request maintainers to approve running workflow for my PR and allow me to do contribution to this project.

MDUYN commented 2 years ago

Thanks @fizaashraf37. I think you should now be maintainer of the repo. Maybe you can add this to the develop branch and add some tests

fizaashraf37 commented 2 years ago

I have also added test cases. But these are failing on Git although these are running without issues locally.

fizaashraf37 commented 2 years ago

I have fixed this. Had to update the reference file as previous merged PR related to nested schemas was adding examples in schemas in generated file. So reference and generated files were mismatching.