Skip to content

Added initial TagAttribute and Filter implementation#699

Merged
domaindrivendev merged 7 commits intodomaindrivendev:elaborate-annotationsfrom
esbenbach:elaborate-annotations
Apr 21, 2018
Merged

Added initial TagAttribute and Filter implementation#699
domaindrivendev merged 7 commits intodomaindrivendev:elaborate-annotationsfrom
esbenbach:elaborate-annotations

Conversation

@esbenbach
Copy link
Contributor

Added initial TagAttribute and Filter implementation

@esbenbach
Copy link
Contributor Author

This still needs some work.

But basically just wanted to determine if the approach of having a DocumentFilter is the right way to go?

@esbenbach
Copy link
Contributor Author

Yet another question. Is the idea that adding the TagAttribute to a controller should override the Tags on all the operations, or should it add to the existing operation tags. How about the default "ControllerName" tag that is added, should it be preserved?

Copy link
Owner

@domaindrivendev domaindrivendev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The common use case we’re trying to solve for here is adding additional metadata to the default tag that’s assigned to each operation (controller name but can be overridden via TagActionsBy). So, I would avoid the additional operation filter as it adds complexity and could be a little confusing. Otherwise this looks awesome. Also, you might want to take a quick look at the XmlCommentsDocumentFilter in the SwaggerGen project. It’s doing something very similar.

@esbenbach
Copy link
Contributor Author

I removed the operation filter. Took another look at the XmlCommentsDocumentFilter, and as far as i can tell it does things in a very similar matter as well. If you prefer I can change my implementation to follow the style of that filter, but personally i prefer the way I have arranged the code (but as always its just a matter of taste.)

@domaindrivendev domaindrivendev merged commit 897ce3b into domaindrivendev:elaborate-annotations Apr 21, 2018
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

Successfully merging this pull request may close these issues.

2 participants