Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support global type overrides #1064

Closed
ubogdan opened this issue Nov 28, 2021 · 1 comment
Closed

support global type overrides #1064

ubogdan opened this issue Nov 28, 2021 · 1 comment

Comments

@ubogdan
Copy link
Contributor

ubogdan commented Nov 28, 2021

Is your feature request related to a problem? Please describe.
When using references from generated files (such as from sqlboiler) we encountered a situation where we wanted to override a type (e.g. have null.String, a struct with custom json marshal/unmarshalers, show up in the swagger docs as string instead of as a struct with a string and a bool) but could not use the swaggertype struct tag overrides, as sqlboiler does not allow you to customize those on a per-type basis.

Describe the solution you'd like
It would be nice to have a simple dot file in the same way git has".gitingore". YAML/TOML is too heavy (the libraries are not light at all and it will introduce additional unwanted dependencies) and JSON is not so user-friendly when it comes to editing.

Eventually, we can add the feature to skip packages, without the need to update swag params in the CI pipeline.

Example swag dot file (.swag)

// replace a defintion 
replace database/sql.NullInt64 int64

// skip parsing a package
skip github.com/grpc/grpc-go

Describe alternatives you've considered
NONE

Additional context
#1059

@ubogdan
Copy link
Contributor Author

ubogdan commented Nov 30, 2021

the feature will be available since v1.7.7

@ubogdan ubogdan closed this as completed Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant