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

Group does not work for endpoints without classes #26

Closed fizaashraf37 closed 1 year ago

fizaashraf37 commented 1 year ago

If endpoints are defined inside a class as in below example. Then proper tag is assigned to endpoint for grouping.

class TestView(BaseApi):
        @app.route('/objects/<int:object_id>', methods=['PUT'])
        def update_object(object_id):
                return jsonify({'id': 1, 'name': 'test_object_name'}), 201

In this case Tag "TestView" is assigned to '/objects/' route.

But if the endpoint is defined without any class, then no Tag is assigned to the endpoint. It comes under None category. In this case user should have the option to define tag for the route.

fizaashraf37 commented 1 year ago

I have created a feature branch for this and also created PR#27