From 4aef3de89dd16d0d96695078a4529132c24a270b Mon Sep 17 00:00:00 2001 From: "pavel.ma" Date: Thu, 4 Jun 2026 09:27:08 +0500 Subject: [PATCH 1/7] [add] enums variables names in swagger schema --- .../EnumNamesSchemaFilter.cs | 29 +++++++++++++++++++ .../SimplifyWebSwaggerExtensions.cs | 2 ++ .../Api/v1/Users/GetMultipleController.cs | 6 ++-- src/TesterApp/ViewModels/Users/UserRole.cs | 9 ++++++ .../ViewModels/Users/UserViewModel.cs | 1 + 5 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs create mode 100644 src/TesterApp/ViewModels/Users/UserRole.cs diff --git a/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs b/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs new file mode 100644 index 0000000..19e3e3d --- /dev/null +++ b/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs @@ -0,0 +1,29 @@ +using System; +using System.Linq; +using Microsoft.OpenApi.Any; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; + +namespace Simplify.Web.Swagger; + +/// +/// Adds x-enum-varnames extension and a human-readable description to enum schemas. +/// +public class EnumNamesSchemaFilter : ISchemaFilter +{ + /// + public void Apply(OpenApiSchema schema, SchemaFilterContext context) + { + if (!context.Type.IsEnum) + return; + + var names = Enum.GetNames(context.Type); + var values = Enum.GetValues(context.Type).Cast().ToArray(); + + var varnames = new OpenApiArray(); + foreach (var name in names) + varnames.Add(new OpenApiString(name)); + + schema.Extensions["names"] = varnames; + } +} diff --git a/src/Simplify.Web.Swagger/SimplifyWebSwaggerExtensions.cs b/src/Simplify.Web.Swagger/SimplifyWebSwaggerExtensions.cs index a5796e6..6e66d33 100644 --- a/src/Simplify.Web.Swagger/SimplifyWebSwaggerExtensions.cs +++ b/src/Simplify.Web.Swagger/SimplifyWebSwaggerExtensions.cs @@ -19,5 +19,7 @@ public static void AddSimplifyWebSwagger(this SwaggerGenOptions options, Simplif options.DocumentFilter(); else options.DocumentFilter(args); + + options.SchemaFilter(); } } \ No newline at end of file diff --git a/src/TesterApp/Controllers/Api/v1/Users/GetMultipleController.cs b/src/TesterApp/Controllers/Api/v1/Users/GetMultipleController.cs index 5c7fe89..f3c5977 100644 --- a/src/TesterApp/Controllers/Api/v1/Users/GetMultipleController.cs +++ b/src/TesterApp/Controllers/Api/v1/Users/GetMultipleController.cs @@ -19,12 +19,14 @@ public override ControllerResponse Invoke() new() { UserName = "User 1", - CreationTime = DateTime.Now + CreationTime = DateTime.Now, + Role = UserRole.Admin }, new() { UserName = "User 2", - CreationTime = DateTime.Now.Subtract(TimeSpan.FromDays(1)) + CreationTime = DateTime.Now.Subtract(TimeSpan.FromDays(1)), + Role = UserRole.User } }; diff --git a/src/TesterApp/ViewModels/Users/UserRole.cs b/src/TesterApp/ViewModels/Users/UserRole.cs new file mode 100644 index 0000000..6cdaedb --- /dev/null +++ b/src/TesterApp/ViewModels/Users/UserRole.cs @@ -0,0 +1,9 @@ +namespace TesterApp.ViewModels.Users; + +public enum UserRole +{ + Guest, + User, + Moderator, + Admin +} diff --git a/src/TesterApp/ViewModels/Users/UserViewModel.cs b/src/TesterApp/ViewModels/Users/UserViewModel.cs index 6c37462..f7b63f8 100644 --- a/src/TesterApp/ViewModels/Users/UserViewModel.cs +++ b/src/TesterApp/ViewModels/Users/UserViewModel.cs @@ -4,4 +4,5 @@ public class UserViewModel { public string UserName { get; set; } public DateTime CreationTime { get; set; } + public UserRole Role { get; set; } } \ No newline at end of file From 022b0f42490493c7f75c6cb83de31fe2acb9b281 Mon Sep 17 00:00:00 2001 From: "pavel.ma" Date: Thu, 4 Jun 2026 09:30:07 +0500 Subject: [PATCH 2/7] [edit] lib version --- .../Simplify.Web.Swagger.csproj | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj b/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj index a677e3a..22faecb 100644 --- a/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj +++ b/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj @@ -1,40 +1,40 @@  - - net9.0;net8.0 - latest - enable - nullable - true - true - snupkg - true + + net9.0;net8.0 + latest + enable + nullable + true + true + snupkg + true - 1.2 + 1.3 - Swagger extensions for Simplify.Web web-framework - Simplify - Simplify community - Licensed under LGPL - LICENSE.txt - https://web.simplifynet.dev - icon.png - true - README.md - .NET web-framework Swagger + Swagger extensions for Simplify.Web web-framework + Simplify + Simplify community + Licensed under LGPL + LICENSE.txt + https://web.simplifynet.dev + icon.png + true + README.md + .NET web-framework Swagger - See https://github.com/SimplifyNet/Simplify.Web.Swagger/tree/master/src/Simplify.Web.Swagger/CHANGELOG.md for details - - - - - - - - - - - - - - + See https://github.com/SimplifyNet/Simplify.Web.Swagger/tree/master/src/Simplify.Web.Swagger/CHANGELOG.md for details + + + + + + + + + + + + + + From c2afe2454becfe53c0f0cf0bafc884237bb07b51 Mon Sep 17 00:00:00 2001 From: lapych Date: Thu, 4 Jun 2026 10:14:19 +0500 Subject: [PATCH 3/7] [edit] summary change --- .../EnumNamesSchemaFilter.cs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs b/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs index 19e3e3d..75330cb 100644 --- a/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs +++ b/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs @@ -7,23 +7,23 @@ namespace Simplify.Web.Swagger; /// -/// Adds x-enum-varnames extension and a human-readable description to enum schemas. +/// Adds names extension and a human-readable description to enum schemas. /// public class EnumNamesSchemaFilter : ISchemaFilter { - /// - public void Apply(OpenApiSchema schema, SchemaFilterContext context) - { - if (!context.Type.IsEnum) - return; + /// + public void Apply(OpenApiSchema schema, SchemaFilterContext context) + { + if (!context.Type.IsEnum) + return; - var names = Enum.GetNames(context.Type); - var values = Enum.GetValues(context.Type).Cast().ToArray(); + var names = Enum.GetNames(context.Type); + var values = Enum.GetValues(context.Type).Cast().ToArray(); - var varnames = new OpenApiArray(); - foreach (var name in names) - varnames.Add(new OpenApiString(name)); + var varnames = new OpenApiArray(); + foreach (var name in names) + varnames.Add(new OpenApiString(name)); - schema.Extensions["names"] = varnames; - } + schema.Extensions["names"] = varnames; + } } From 536941680200674e41d79441991e1658841ad985 Mon Sep 17 00:00:00 2001 From: lapych Date: Thu, 4 Jun 2026 14:23:06 +0500 Subject: [PATCH 4/7] [edit] formatting --- .editorconfig | 162 ++++++++++++++++++ .../ControllerActionsFactory.cs | 2 +- .../EnumNamesSchemaFilter.cs | 26 +-- .../RequestBodyAttribute.cs | 2 +- src/TesterApp/ViewModels/Users/UserRole.cs | 2 +- 5 files changed, 178 insertions(+), 16 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..35c7ffe --- /dev/null +++ b/.editorconfig @@ -0,0 +1,162 @@ +root = true + +[*] +end_of_line = crlf +indent_style = tab +insert_final_newline = false +resharper_insert_final_newline = false +trim_trailing_whitespace = true + +[*.cs] +indent_size = 4 +tab_width = 4 + +# New-line preferences +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +# Indentation +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents_when_block = false + +# Spacing +csharp_space_after_cast = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false + +# Wrapping +csharp_preserve_single_line_statements = false +csharp_preserve_single_line_blocks = true + +# var preferences — use explicit type for clarity (Air Astana standard) +csharp_style_var_for_built_in_types = false:suggestion +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = false:suggestion + +# Expression-bodied members +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:suggestion +csharp_style_expression_bodied_indexers = true:suggestion +csharp_style_expression_bodied_accessors = true:suggestion +csharp_style_expression_bodied_lambdas = true:suggestion +csharp_style_expression_bodied_local_functions = false:silent + +# Pattern matching +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_prefer_switch_expression = true:suggestion +csharp_style_prefer_pattern_matching = true:suggestion +csharp_style_prefer_not_pattern = true:suggestion + +# Null checks +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion + +# Modifier preferences +csharp_prefer_static_local_function = true:suggestion +csharp_preferred_modifier_order = public, private, protected, internal, file, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, required, volatile, async:suggestion +dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion +dotnet_style_readonly_field = true:suggestion + +# using directives +dotnet_sort_system_directives_first = true +dotnet_separate_import_directive_groups = false +csharp_using_directive_placement = outside_namespace:warning + +# Namespace style +csharp_style_namespace_declarations = file_scoped:warning + +# Object initializers +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion + +# Tuple / anonymous types +dotnet_style_prefer_auto_properties = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion + +# Miscellaneous +csharp_prefer_braces = when_multiline:silent +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent + +# Naming rules — Air Astana: PascalCase public, _camelCase private fields +dotnet_naming_rule.private_fields_should_be_camel_case.severity = warning +dotnet_naming_rule.private_fields_should_be_camel_case.symbols = private_fields +dotnet_naming_rule.private_fields_should_be_camel_case.style = underscore_camel_case_style + +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private + +dotnet_naming_style.underscore_camel_case_style.capitalization = camel_case +dotnet_naming_style.underscore_camel_case_style.required_prefix = _ + +dotnet_naming_rule.interfaces_should_start_with_i.severity = warning +dotnet_naming_rule.interfaces_should_start_with_i.symbols = interfaces +dotnet_naming_rule.interfaces_should_start_with_i.style = i_prefix_pascal_case_style + +dotnet_naming_symbols.interfaces.applicable_kinds = interface +dotnet_naming_style.i_prefix_pascal_case_style.capitalization = pascal_case +dotnet_naming_style.i_prefix_pascal_case_style.required_prefix = I + +dotnet_naming_rule.public_members_pascal_case.severity = warning +dotnet_naming_rule.public_members_pascal_case.symbols = public_members +dotnet_naming_rule.public_members_pascal_case.style = pascal_case_style + +dotnet_naming_symbols.public_members.applicable_kinds = property, method, field, event +dotnet_naming_symbols.public_members.applicable_accessibilities = public, internal, protected, protected_internal +dotnet_naming_style.pascal_case_style.capitalization = pascal_case + +# Roslyn analyzer severities +dotnet_diagnostic.CA1822.severity = suggestion # Mark members as static +dotnet_diagnostic.CA1848.severity = none # Use LoggerMessage delegates (too verbose for this stack) +dotnet_diagnostic.CA2007.severity = none # ConfigureAwait (not needed in ASP.NET Core) +dotnet_diagnostic.CS8618.severity = warning # Non-nullable field uninitialized +dotnet_diagnostic.CS8600.severity = warning # Converting null literal +dotnet_diagnostic.CS8601.severity = warning # Possible null reference assignment +dotnet_diagnostic.CS8602.severity = warning # Dereference of possibly null reference +dotnet_diagnostic.CS8603.severity = warning # Possible null reference return +dotnet_diagnostic.IDE0005.severity = warning # Remove unnecessary using +dotnet_diagnostic.IDE0055.severity = warning # Fix formatting +dotnet_diagnostic.IDE0160.severity = none # Namespace style (handled by csharp_style_namespace_declarations) + +[*.{json,yaml,yml}] +indent_size = 2 + +[*.xml] +indent_size = 2 + +[*.{csproj,props,targets}] +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/src/Simplify.Web.Swagger/ControllerActionsFactory.cs b/src/Simplify.Web.Swagger/ControllerActionsFactory.cs index e57220d..d172eb2 100644 --- a/src/Simplify.Web.Swagger/ControllerActionsFactory.cs +++ b/src/Simplify.Web.Swagger/ControllerActionsFactory.cs @@ -164,4 +164,4 @@ private static OpenApiResponse CreateResponse(ProducesResponseAttribute produces return response; } -} +} \ No newline at end of file diff --git a/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs b/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs index 75330cb..7d49d5b 100644 --- a/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs +++ b/src/Simplify.Web.Swagger/EnumNamesSchemaFilter.cs @@ -11,19 +11,19 @@ namespace Simplify.Web.Swagger; /// public class EnumNamesSchemaFilter : ISchemaFilter { - /// - public void Apply(OpenApiSchema schema, SchemaFilterContext context) - { - if (!context.Type.IsEnum) - return; + /// + public void Apply(OpenApiSchema schema, SchemaFilterContext context) + { + if (!context.Type.IsEnum) + return; - var names = Enum.GetNames(context.Type); - var values = Enum.GetValues(context.Type).Cast().ToArray(); + var names = Enum.GetNames(context.Type); + var values = Enum.GetValues(context.Type).Cast().ToArray(); - var varnames = new OpenApiArray(); - foreach (var name in names) - varnames.Add(new OpenApiString(name)); + var varnames = new OpenApiArray(); + foreach (var name in names) + varnames.Add(new OpenApiString(name)); - schema.Extensions["names"] = varnames; - } -} + schema.Extensions["names"] = varnames; + } +} \ No newline at end of file diff --git a/src/Simplify.Web.Swagger/RequestBodyAttribute.cs b/src/Simplify.Web.Swagger/RequestBodyAttribute.cs index 656848e..1defc38 100644 --- a/src/Simplify.Web.Swagger/RequestBodyAttribute.cs +++ b/src/Simplify.Web.Swagger/RequestBodyAttribute.cs @@ -29,4 +29,4 @@ public class RequestBodyAttribute(Type model, string contentType = "application/ /// The type of the content. /// public string ContentType { get; private set; } = contentType; -} +} \ No newline at end of file diff --git a/src/TesterApp/ViewModels/Users/UserRole.cs b/src/TesterApp/ViewModels/Users/UserRole.cs index 6cdaedb..ef90a39 100644 --- a/src/TesterApp/ViewModels/Users/UserRole.cs +++ b/src/TesterApp/ViewModels/Users/UserRole.cs @@ -6,4 +6,4 @@ public enum UserRole User, Moderator, Admin -} +} \ No newline at end of file From ecbfe04026fc199cbc8411def9ad8c0f1f560f07 Mon Sep 17 00:00:00 2001 From: lapych Date: Thu, 4 Jun 2026 14:24:50 +0500 Subject: [PATCH 5/7] [edit] formatting --- .../Simplify.Web.Swagger.csproj | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj b/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj index 22faecb..f6cad09 100644 --- a/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj +++ b/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj @@ -1,40 +1,40 @@  - - net9.0;net8.0 - latest - enable - nullable - true - true - snupkg - true + + net9.0;net8.0 + latest + enable + nullable + true + true + snupkg + true - 1.3 + 1.3 - Swagger extensions for Simplify.Web web-framework - Simplify - Simplify community - Licensed under LGPL - LICENSE.txt - https://web.simplifynet.dev - icon.png - true - README.md - .NET web-framework Swagger + Swagger extensions for Simplify.Web web-framework + Simplify + Simplify community + Licensed under LGPL + LICENSE.txt + https://web.simplifynet.dev + icon.png + true + README.md + .NET web-framework Swagger - See https://github.com/SimplifyNet/Simplify.Web.Swagger/tree/master/src/Simplify.Web.Swagger/CHANGELOG.md for details - - - - - - - - - - - - - - + See https://github.com/SimplifyNet/Simplify.Web.Swagger/tree/master/src/Simplify.Web.Swagger/CHANGELOG.md for details + + + + + + + + + + + + + + From 5223d15a97fbe0c760336d7197e2990ee2914988 Mon Sep 17 00:00:00 2001 From: lapych Date: Thu, 4 Jun 2026 14:25:50 +0500 Subject: [PATCH 6/7] Revert "[edit] formatting" This reverts commit ecbfe04026fc199cbc8411def9ad8c0f1f560f07. --- .../Simplify.Web.Swagger.csproj | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj b/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj index f6cad09..22faecb 100644 --- a/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj +++ b/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj @@ -1,40 +1,40 @@  - - net9.0;net8.0 - latest - enable - nullable - true - true - snupkg - true + + net9.0;net8.0 + latest + enable + nullable + true + true + snupkg + true - 1.3 + 1.3 - Swagger extensions for Simplify.Web web-framework - Simplify - Simplify community - Licensed under LGPL - LICENSE.txt - https://web.simplifynet.dev - icon.png - true - README.md - .NET web-framework Swagger + Swagger extensions for Simplify.Web web-framework + Simplify + Simplify community + Licensed under LGPL + LICENSE.txt + https://web.simplifynet.dev + icon.png + true + README.md + .NET web-framework Swagger - See https://github.com/SimplifyNet/Simplify.Web.Swagger/tree/master/src/Simplify.Web.Swagger/CHANGELOG.md for details - - - - - - - - - - - - - - + See https://github.com/SimplifyNet/Simplify.Web.Swagger/tree/master/src/Simplify.Web.Swagger/CHANGELOG.md for details + + + + + + + + + + + + + + From 171f657f9207ed65207aa3ee6ad46901ba146e06 Mon Sep 17 00:00:00 2001 From: lapych Date: Thu, 4 Jun 2026 14:27:03 +0500 Subject: [PATCH 7/7] [edit] formatting --- .editorconfig | 162 ------------------ .../Simplify.Web.Swagger.csproj | 70 ++++---- 2 files changed, 35 insertions(+), 197 deletions(-) delete mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 35c7ffe..0000000 --- a/.editorconfig +++ /dev/null @@ -1,162 +0,0 @@ -root = true - -[*] -end_of_line = crlf -indent_style = tab -insert_final_newline = false -resharper_insert_final_newline = false -trim_trailing_whitespace = true - -[*.cs] -indent_size = 4 -tab_width = 4 - -# New-line preferences -csharp_new_line_before_open_brace = all -csharp_new_line_before_else = true -csharp_new_line_before_catch = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_members_in_anonymous_types = true -csharp_new_line_between_query_expression_clauses = true - -# Indentation -csharp_indent_case_contents = true -csharp_indent_switch_labels = true -csharp_indent_labels = flush_left -csharp_indent_block_contents = true -csharp_indent_braces = false -csharp_indent_case_contents_when_block = false - -# Spacing -csharp_space_after_cast = false -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_parentheses = false -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_around_binary_operators = before_and_after -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_between_method_call_empty_parameter_list_parentheses = false - -# Wrapping -csharp_preserve_single_line_statements = false -csharp_preserve_single_line_blocks = true - -# var preferences — use explicit type for clarity (Air Astana standard) -csharp_style_var_for_built_in_types = false:suggestion -csharp_style_var_when_type_is_apparent = true:suggestion -csharp_style_var_elsewhere = false:suggestion - -# Expression-bodied members -csharp_style_expression_bodied_methods = false:silent -csharp_style_expression_bodied_constructors = false:silent -csharp_style_expression_bodied_operators = false:silent -csharp_style_expression_bodied_properties = true:suggestion -csharp_style_expression_bodied_indexers = true:suggestion -csharp_style_expression_bodied_accessors = true:suggestion -csharp_style_expression_bodied_lambdas = true:suggestion -csharp_style_expression_bodied_local_functions = false:silent - -# Pattern matching -csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion -csharp_style_pattern_matching_over_as_with_null_check = true:suggestion -csharp_style_prefer_switch_expression = true:suggestion -csharp_style_prefer_pattern_matching = true:suggestion -csharp_style_prefer_not_pattern = true:suggestion - -# Null checks -csharp_style_throw_expression = true:suggestion -csharp_style_conditional_delegate_call = true:suggestion -dotnet_style_null_propagation = true:suggestion -dotnet_style_coalesce_expression = true:suggestion -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion - -# Modifier preferences -csharp_prefer_static_local_function = true:suggestion -csharp_preferred_modifier_order = public, private, protected, internal, file, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, required, volatile, async:suggestion -dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion -dotnet_style_readonly_field = true:suggestion - -# using directives -dotnet_sort_system_directives_first = true -dotnet_separate_import_directive_groups = false -csharp_using_directive_placement = outside_namespace:warning - -# Namespace style -csharp_style_namespace_declarations = file_scoped:warning - -# Object initializers -dotnet_style_object_initializer = true:suggestion -dotnet_style_collection_initializer = true:suggestion - -# Tuple / anonymous types -dotnet_style_prefer_auto_properties = true:suggestion -dotnet_style_explicit_tuple_names = true:suggestion -dotnet_style_prefer_inferred_tuple_names = true:suggestion -dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion - -# Miscellaneous -csharp_prefer_braces = when_multiline:silent -csharp_prefer_simple_default_expression = true:suggestion -csharp_style_deconstructed_variable_declaration = true:suggestion -csharp_style_inlined_variable_declaration = true:suggestion -csharp_style_prefer_local_over_anonymous_function = true:suggestion -csharp_style_prefer_index_operator = true:suggestion -csharp_style_prefer_range_operator = true:suggestion -csharp_style_unused_value_assignment_preference = discard_variable:suggestion -csharp_style_unused_value_expression_statement_preference = discard_variable:silent - -# Naming rules — Air Astana: PascalCase public, _camelCase private fields -dotnet_naming_rule.private_fields_should_be_camel_case.severity = warning -dotnet_naming_rule.private_fields_should_be_camel_case.symbols = private_fields -dotnet_naming_rule.private_fields_should_be_camel_case.style = underscore_camel_case_style - -dotnet_naming_symbols.private_fields.applicable_kinds = field -dotnet_naming_symbols.private_fields.applicable_accessibilities = private - -dotnet_naming_style.underscore_camel_case_style.capitalization = camel_case -dotnet_naming_style.underscore_camel_case_style.required_prefix = _ - -dotnet_naming_rule.interfaces_should_start_with_i.severity = warning -dotnet_naming_rule.interfaces_should_start_with_i.symbols = interfaces -dotnet_naming_rule.interfaces_should_start_with_i.style = i_prefix_pascal_case_style - -dotnet_naming_symbols.interfaces.applicable_kinds = interface -dotnet_naming_style.i_prefix_pascal_case_style.capitalization = pascal_case -dotnet_naming_style.i_prefix_pascal_case_style.required_prefix = I - -dotnet_naming_rule.public_members_pascal_case.severity = warning -dotnet_naming_rule.public_members_pascal_case.symbols = public_members -dotnet_naming_rule.public_members_pascal_case.style = pascal_case_style - -dotnet_naming_symbols.public_members.applicable_kinds = property, method, field, event -dotnet_naming_symbols.public_members.applicable_accessibilities = public, internal, protected, protected_internal -dotnet_naming_style.pascal_case_style.capitalization = pascal_case - -# Roslyn analyzer severities -dotnet_diagnostic.CA1822.severity = suggestion # Mark members as static -dotnet_diagnostic.CA1848.severity = none # Use LoggerMessage delegates (too verbose for this stack) -dotnet_diagnostic.CA2007.severity = none # ConfigureAwait (not needed in ASP.NET Core) -dotnet_diagnostic.CS8618.severity = warning # Non-nullable field uninitialized -dotnet_diagnostic.CS8600.severity = warning # Converting null literal -dotnet_diagnostic.CS8601.severity = warning # Possible null reference assignment -dotnet_diagnostic.CS8602.severity = warning # Dereference of possibly null reference -dotnet_diagnostic.CS8603.severity = warning # Possible null reference return -dotnet_diagnostic.IDE0005.severity = warning # Remove unnecessary using -dotnet_diagnostic.IDE0055.severity = warning # Fix formatting -dotnet_diagnostic.IDE0160.severity = none # Namespace style (handled by csharp_style_namespace_declarations) - -[*.{json,yaml,yml}] -indent_size = 2 - -[*.xml] -indent_size = 2 - -[*.{csproj,props,targets}] -indent_size = 2 - -[*.md] -trim_trailing_whitespace = false diff --git a/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj b/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj index 22faecb..f6cad09 100644 --- a/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj +++ b/src/Simplify.Web.Swagger/Simplify.Web.Swagger.csproj @@ -1,40 +1,40 @@  - - net9.0;net8.0 - latest - enable - nullable - true - true - snupkg - true + + net9.0;net8.0 + latest + enable + nullable + true + true + snupkg + true - 1.3 + 1.3 - Swagger extensions for Simplify.Web web-framework - Simplify - Simplify community - Licensed under LGPL - LICENSE.txt - https://web.simplifynet.dev - icon.png - true - README.md - .NET web-framework Swagger + Swagger extensions for Simplify.Web web-framework + Simplify + Simplify community + Licensed under LGPL + LICENSE.txt + https://web.simplifynet.dev + icon.png + true + README.md + .NET web-framework Swagger - See https://github.com/SimplifyNet/Simplify.Web.Swagger/tree/master/src/Simplify.Web.Swagger/CHANGELOG.md for details - - - - - - - - - - - - - - + See https://github.com/SimplifyNet/Simplify.Web.Swagger/tree/master/src/Simplify.Web.Swagger/CHANGELOG.md for details + + + + + + + + + + + + + +