Obsolote warnings when upgrading from v11 to v12
See original GitHub issueHello,
I had this piece of code:
app.UseSwaggerUi3(
typeof(ControllerBase).GetAllAssignable()
, (settings) =>
{
settings.GeneratorSettings.DefaultEnumHandling = NJsonSchema.EnumHandling.String;
settings.GeneratorSettings.Title = "XYZ API v1";
settings.GeneratorSettings.Version = "1.0";
settings.GeneratorSettings.DefaultPropertyNameHandling = NJsonSchema.PropertyNameHandling.CamelCase;
}
, new NSwag.SwaggerGeneration.SwaggerJsonSchemaGenerator(new NJsonSchema.Generation.JsonSchemaGeneratorSettings())
);
Now I am getting obsolote warning on settings.GeneratorSettings.DefaultEnumHandling
and settings.GeneratorSettings.DefaultPropertyNameHandling
. But the warning message makes no sense to me.
Severity Code Description Project File Line Suppression State Warning CS0618 ‘JsonSchemaGeneratorSettings.DefaultEnumHandling’ is obsolete: ‘Use SerializerSettings directly instead. In NSwag.AspNetCore the property is set automatically.’ ClientService
Please provide an example.
.Net Framework 4.7 NSwag.SwaggerGeneration.WebApi: 12.0.5.0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Obsolote warnings when upgrading from v11 to v12
Hello,. I had this piece of code: app.UseSwaggerUi3( typeof(ControllerBase).GetAllAssignable() , (settings) => { settings.GeneratorSettings.
Read more >Updating from v11 to v12 | Discord.js Guide
Once you got Node up-to-date, you can install v12 by running npm install ... WARNING. clientOptions.disableEveryone was removed and replaced ...
Read more >V12 Upgrade failure: service missing on host
I've tried to edit, then rescan servers, and encountered the warning: one or more veeam components is not up to date. Skipping host....
Read more >[V12] System Requirements for our 2022 release - Page 3
When we upgraded to v10, we encountered a number of issues that didn't exist in 9.5. After bouncing around with Veeam support, the...
Read more >Migration failed: Incompatible peer dependencies found - ...
I can choose to use the --force option to ignore incompatible peer dependencies and address these warnings later.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It should look like this:
or just assign the settings from ASP.NET so that the configs match…
Hi @RicoSuter I am using .Net Framework 4.7, NSwag.Generation.WebApi v 13.10.8 to have swagger in OWIN based WebApi. I want to have Exception type as camelcased and got the actual response as camelCase but Swagger documentation is still having PascalCase only for Exception object despite having the following setting with IgnoreSerializableInterface enabled.
Please advise if there is any other setting to be added. Thanks.