Swashbuckle.aspnetcore: Swashbuckle 3.0 SwaggerOperationAttribute missing?

Created on 9 Jul 2018  路  5Comments  路  Source: domaindrivendev/Swashbuckle.AspNetCore

I just updated nuget packages to 3.0... and now I"m getting an error that SwaggerOperationAttribute cannot be found. I can't find it anywhere and can't find anything that looks similar that might have replaced it and the documentation hasn't changed either.

Where did it go and/or what's the replacement?

Most helpful comment

Ok, great, but it isn't included in the meta package....

And adding it allows VS.net to see it but build fails.

All 5 comments

Same with SwaggerResponseAttribute. There is a new Lib Swashbuckle.AspNetCore.Annotations

Ok, great, but it isn't included in the meta package....

And adding it allows VS.net to see it but build fails.

@JohnGalt1717 apologies for the inconvenience. This is one of several breaking changes as part of the latest major version update (as per semver.org). The documentation _has_ changed but I haven't gotten round to adding an explicit section to call out breaking changes - I'm trying to find some time for this today. Here's the relevant readme updates ...

https://github.com/domaindrivendev/Swashbuckle.AspNetCore#additional-packages
https://github.com/domaindrivendev/Swashbuckle.AspNetCore#swashbuckleaspnetcoreannotations

AND the rationale for this change ...

https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/694

Just as a fyi for anyone else stumbling over this ... the Namespace for the SwaggerOperationAttribute has also changed to Swashbuckle.AspNetCore.Annotations - so that change is required besides adding the new Annotations package to make it build again.

FYI - just added a "breaking changes" banner with a link to details in the release notes

Was this page helpful?
0 / 5 - 0 ratings