-
Notifications
You must be signed in to change notification settings - Fork 77
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
Allow to exclude nested namespaces #1586
Comments
I'm all for it, if it's simple to implement then it shouldn't be a big deal to @Baccata either I assume |
PR away :) |
@Baccata how flexible do you think this should be? Accept arbitrary regex, or just wildcards (if so, only trailing/leading or everywhere?) |
just wildcards (glob patterns) would be fine. Whatever you can find a concise implementation for. |
I can have a look into it. But first I would like to clarify the behavior.
Exact namespaces can be excluded with But the
Not sure which is more preferable here. I like the first solution more, as it feels more precise. But can be cumbersome too, if I want to exclude all the shapes from |
IMO
I don't think we have a need for so I guess I'm just proposing prefix-based exclusion/inclusion, with the special case of "no asterisk" which is an exact match |
Had a brief look, looks like alloy will also have to be involved https://github.com/disneystreaming/alloy/blob/6ac81f362362ea48165c07589021181e484f10ec/modules/openapi/src/alloy/openapi/package.scala#L33 I wonder why it only takes the |
No particular reason, probably just an oversight |
When generating scala classes from smithy model we often need to exclude certain namespaces due to various reasons.
For that we were using
--exclude-ns
option in smithy4s-cli. However, recently we did some small refactoring that moved some of the shapes from the top namespace that was excluded (e.g.a.b
) into sub-namespaces (e.g.a.b.c
anda.b.d
).This cause issues in the generated code as those nested namespaces were not excluded.
Would it be possible to allow excluding namespaces in a more convenient way? e.g.
--exclude-ns a.b.*
would exclude.a.b
as well as any other namespace that starts witha.b
The text was updated successfully, but these errors were encountered: