-
Couldn't load subscription status.
- Fork 12
.net core 3.1 upgrade #33
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
base: master
Are you sure you want to change the base?
Conversation
…l helper + remove mvcoption references which are now removed in 3.0
|
|
||
| if (!apiOptions.DisableVersioning) | ||
| { | ||
| builder.AddMvcOptions(options => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not work in 3.0
| namespace Digipolis.Web.Swagger | ||
| { | ||
| // This filter is necessary to correct the $Ref in the swagger for response types that are generic types. | ||
| public class ValidRefUri : IOperationFilter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is still needed with new swashbuckle version
| [HttpGet()] | ||
| [ProducesResponseType(typeof(PagedResult<ValueDto>), 200)] | ||
| [AllowAnonymous] | ||
| [Versions(Versions.V1, Versions.V2)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
versioning is currently probably broken
| { | ||
| // Add framework services. | ||
| services.AddMvc() | ||
| .AddNewtonsoftJson(options => options.SerializerSettings.Initialize()) // set default Digipolis json serializer settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thisi s a workaround for not being able to use MvcOptions anymore.
Making the initialize public, also lets the consumer hook on the JsonSerializerSettings with an action.
| settings.NullValueHandling = NullValueHandling.Ignore; | ||
| settings.Converters.Add(new TimeSpanConverter()); | ||
| settings.Converters.Add(new GuidConverter()); | ||
| settings.Converters.Add(new StringEnumConverter()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swashbuckle now adheres at the general JsonSerializerSettings.
DescribeEnumsAsString for SwaggerOptions is deprecated now.
| { | ||
| if (bindingContext.ModelMetadata.IsEnumerableType) | ||
| { | ||
| if (bindingContext == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always false
| { | ||
| protected override void Configuration(SwaggerGenOptions options) | ||
| { | ||
| options.DescribeAllEnumsAsStrings(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deprecated
|
|
||
| namespace Digipolis.Web.UnitTests.Startup | ||
| { | ||
| public class MvcBuilderExtensionsTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably needs to be deleted unless we can fix the MvcOptions problem
|
What's the status of this PR? |
|
Status? |
…l helper + remove mvcoption references which are now removed in 3.0