Skip to content

Add excluding file and placeholder file support #879

Open
@smiletrl

Description

@smiletrl

Is your feature request related to a problem? Please describe.
The project might include api endpoints for different ports. For example, one port for mobile, and one port for desktop. In this case, pkg/user might include pkg/user/api_mobile.go and pkg/user/api_desktop.go, and each file includes the port's own endpoints.

The feature is to allow mobile version api doc to exclude all api_desktop.go file or *_desktop.go.

Describe the solution you'd like
Use command like swag init --exclude api_desktop.go or swag init --exclude *_desktop.go to exclude files api_desktop.go or endpoints_desktop.go inside this project dir for doc generating.

Describe alternatives you've considered
I was thinking the current option --exclude should achieve this already, but it is only excluding path now, but not specific file.

Additional context
Maybe the final goal could be ignoring files like what .gitignore does for git repository ^?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions