Skip to content

[REQ][Python-flask] Option to remove docstrings / noqa / comments #13807

@nmoreaud

Description

@nmoreaud

Would it be possible to add a option that removes all non-required text in generated model files?
Ex replace this:

class ConnectionInfo(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, name=None):  # noqa: E501
        """ConnectionInfo - a model defined in OpenAPI

        :param name: The name of this ConnectionInfo.  # noqa: E501
        :type name: str
        """
        self.openapi_types = {
            'name': str
        }

        self.attribute_map = {
            'name': 'name'
        }

        self.name = name

    @property
    def name(self):
        """Gets the name of this ConnectionInfo.

        Human-readable name of the connection.  # noqa: E501

        :return: The name of this ConnectionInfo.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ConnectionInfo.

        Human-readable name of the connection.  # noqa: E501

        :param name: The name of this ConnectionInfo.
        :type name: str
        """

        self._name = name

with this:

class ConnectionInfo(Model):

    def __init__(self, name=None): 
        self.openapi_types = {
            'name': str
        }

        self.attribute_map = {
            'name': 'name'
        }

        self.name = name

    @property
    def name(self):
        return self._name

    @name.setter
    def name(self, name):
        self._name = name

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions