Skip to content

Commit

Permalink
Merge template/faithlife-build.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejball committed Jul 27, 2023
2 parents fa377dc + 5431511 commit 11c09c3
Show file tree
Hide file tree
Showing 36 changed files with 1,707 additions and 1,722 deletions.
101 changes: 98 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ resharper_string_literal_typo_highlighting = none
insert_final_newline = false

[*.cs]
indent_size = 4
indent_size = tab
indent_style = tab
tab_width = 4
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
Expand Down Expand Up @@ -75,22 +76,30 @@ csharp_style_expression_bodied_local_functions = true : suggestion
csharp_style_expression_bodied_methods = true : suggestion
csharp_style_expression_bodied_operators = true : suggestion
csharp_style_expression_bodied_properties = true : suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = true : suggestion
csharp_style_inlined_variable_declaration = true : suggestion
csharp_style_namespace_declarations = file_scoped : suggestion
csharp_style_pattern_local_over_anonymous_function = true : suggestion
csharp_style_pattern_matching_over_as_with_null_check = true : suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true : suggestion
csharp_style_prefer_extended_property_pattern = true : suggestion
csharp_style_prefer_index_operator = true : suggestion
csharp_style_prefer_local_over_anonymous_function = true : suggestion
csharp_style_prefer_not_pattern = true : suggestion
csharp_style_prefer_null_check_over_type_check = true : suggestion
csharp_style_prefer_pattern_matching = true : suggestion
csharp_style_prefer_range_operator = true : suggestion
csharp_style_prefer_switch_expression = true : suggestion
csharp_style_prefer_tuple_swap = true : warning
csharp_style_throw_expression = true : suggestion
csharp_style_unused_value_assignment_preference = discard_variable : suggestion
csharp_style_unused_value_assignment_preference = discard_variable : warning
csharp_style_unused_value_expression_statement_preference = discard_variable : none
csharp_style_var_elsewhere = true : suggestion
csharp_style_var_for_built_in_types = true : suggestion
csharp_style_var_when_type_is_apparent = true : suggestion
csharp_using_directive_placement = outside_namespace : warning
dotnet_analyzer_diagnostic.severity = warning
dotnet_code_quality_unused_parameters = all : suggestion
dotnet_diagnostic.CA1014.severity = none
dotnet_diagnostic.CA1030.severity = none
dotnet_diagnostic.CA1031.severity = suggestion
dotnet_diagnostic.CA1032.severity = suggestion
Expand All @@ -101,6 +110,8 @@ dotnet_diagnostic.CA1062.severity = suggestion
dotnet_diagnostic.CA1063.severity = none
dotnet_diagnostic.CA1303.severity = none
dotnet_diagnostic.CA1308.severity = suggestion
dotnet_diagnostic.CA1309.severity = suggestion
dotnet_diagnostic.CA1508.severity = suggestion
dotnet_diagnostic.CA1707.severity = none
dotnet_diagnostic.CA1716.severity = none
dotnet_diagnostic.CA1720.severity = suggestion
Expand All @@ -110,10 +121,89 @@ dotnet_diagnostic.CA1816.severity = none
dotnet_diagnostic.CA1819.severity = suggestion
dotnet_diagnostic.CA1822.severity = suggestion
dotnet_diagnostic.CA1826.severity = suggestion
dotnet_diagnostic.CA1848.severity = suggestion
dotnet_diagnostic.CA2000.severity = none
dotnet_diagnostic.CA2227.severity = none
dotnet_diagnostic.CA2234.severity = none
dotnet_diagnostic.CA2237.severity = none
dotnet_diagnostic.CA2254.severity = none
dotnet_diagnostic.CA5351.severity = none
dotnet_diagnostic.IDE0001.severity = warning
dotnet_diagnostic.IDE0002.severity = warning
dotnet_diagnostic.IDE0003.severity = warning
dotnet_diagnostic.IDE0004.severity = warning
dotnet_diagnostic.IDE0005.severity = warning
dotnet_diagnostic.IDE0007.severity = suggestion
dotnet_diagnostic.IDE0008.severity = suggestion
dotnet_diagnostic.IDE0009.severity = warning
dotnet_diagnostic.IDE0010.severity = suggestion
dotnet_diagnostic.IDE0011.severity = suggestion
dotnet_diagnostic.IDE0016.severity = suggestion
dotnet_diagnostic.IDE0017.severity = suggestion
dotnet_diagnostic.IDE0018.severity = suggestion
dotnet_diagnostic.IDE0019.severity = suggestion
dotnet_diagnostic.IDE0020.severity = suggestion
dotnet_diagnostic.IDE0021.severity = suggestion
dotnet_diagnostic.IDE0022.severity = suggestion
dotnet_diagnostic.IDE0023.severity = suggestion
dotnet_diagnostic.IDE0024.severity = suggestion
dotnet_diagnostic.IDE0025.severity = suggestion
dotnet_diagnostic.IDE0026.severity = suggestion
dotnet_diagnostic.IDE0027.severity = suggestion
dotnet_diagnostic.IDE0028.severity = suggestion
dotnet_diagnostic.IDE0029.severity = warning
dotnet_diagnostic.IDE0030.severity = warning
dotnet_diagnostic.IDE0031.severity = suggestion
dotnet_diagnostic.IDE0032.severity = suggestion
dotnet_diagnostic.IDE0033.severity = warning
dotnet_diagnostic.IDE0034.severity = suggestion
dotnet_diagnostic.IDE0035.severity = warning
dotnet_diagnostic.IDE0036.severity = warning
dotnet_diagnostic.IDE0037.severity = suggestion
dotnet_diagnostic.IDE0038.severity = suggestion
dotnet_diagnostic.IDE0039.severity = suggestion
dotnet_diagnostic.IDE0040.severity = warning
dotnet_diagnostic.IDE0041.severity = suggestion
dotnet_diagnostic.IDE0042.severity = suggestion
dotnet_diagnostic.IDE0044.severity = warning
dotnet_diagnostic.IDE0045.severity = suggestion
dotnet_diagnostic.IDE0046.severity = none
dotnet_diagnostic.IDE0047.severity = suggestion
dotnet_diagnostic.IDE0048.severity = suggestion
dotnet_diagnostic.IDE0049.severity = warning
dotnet_diagnostic.IDE0051.severity = warning
dotnet_diagnostic.IDE0052.severity = warning
dotnet_diagnostic.IDE0053.severity = suggestion
dotnet_diagnostic.IDE0054.severity = suggestion
dotnet_diagnostic.IDE0056.severity = suggestion
dotnet_diagnostic.IDE0057.severity = suggestion
dotnet_diagnostic.IDE0058.severity = none
dotnet_diagnostic.IDE0059.severity = warning
dotnet_diagnostic.IDE0060.severity = suggestion
dotnet_diagnostic.IDE0061.severity = suggestion
dotnet_diagnostic.IDE0062.severity = suggestion
dotnet_diagnostic.IDE0063.severity = suggestion
dotnet_diagnostic.IDE0065.severity = warning
dotnet_diagnostic.IDE0066.severity = suggestion
dotnet_diagnostic.IDE0070.severity = suggestion
dotnet_diagnostic.IDE0071.severity = suggestion
dotnet_diagnostic.IDE0072.severity = suggestion
dotnet_diagnostic.IDE0074.severity = suggestion
dotnet_diagnostic.IDE0075.severity = warning
dotnet_diagnostic.IDE0078.severity = suggestion
dotnet_diagnostic.IDE0080.severity = suggestion
dotnet_diagnostic.IDE0082.severity = warning
dotnet_diagnostic.IDE0083.severity = suggestion
dotnet_diagnostic.IDE0090.severity = suggestion
dotnet_diagnostic.IDE0100.severity = warning
dotnet_diagnostic.IDE0110.severity = warning
dotnet_diagnostic.IDE0130.severity = warning
dotnet_diagnostic.IDE0150.severity = suggestion
dotnet_diagnostic.IDE0160.severity = suggestion
dotnet_diagnostic.IDE0161.severity = suggestion
dotnet_diagnostic.IDE0170.severity = suggestion
dotnet_diagnostic.IDE0180.severity = warning
dotnet_diagnostic.IDE1005.severity = suggestion
dotnet_diagnostic.SA0001.severity = none
dotnet_diagnostic.SA1003.severity = none
dotnet_diagnostic.SA1008.severity = none
Expand Down Expand Up @@ -161,6 +251,8 @@ dotnet_diagnostic.SA1633.severity = none
dotnet_diagnostic.SA1642.severity = none
dotnet_diagnostic.SA1643.severity = none
dotnet_diagnostic.SX1101.severity = warning
dotnet_diagnostic.SYSLIB1045.severity = suggestion
dotnet_diagnostic.SYSLIB1054.severity = none
dotnet_naming_rule.local_functions_rule.severity = warning
dotnet_naming_rule.local_functions_rule.style = upper_camel_case_style
dotnet_naming_rule.local_functions_rule.symbols = local_functions_symbols
Expand Down Expand Up @@ -201,6 +293,7 @@ dotnet_sort_system_directives_first = true
dotnet_style_coalesce_expression = true : warning
dotnet_style_collection_initializer = true : suggestion
dotnet_style_explicit_tuple_names = true : warning
dotnet_style_namespace_match_folder = true : warning
dotnet_style_null_propagation = true : suggestion
dotnet_style_object_initializer = true : suggestion
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity : none
Expand All @@ -216,6 +309,8 @@ dotnet_style_prefer_conditional_expression_over_return = true : none
dotnet_style_prefer_inferred_anonymous_type_member_names = true : suggestion
dotnet_style_prefer_inferred_tuple_names = true : suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true : suggestion
dotnet_style_prefer_simplified_boolean_expressions = true : warning
dotnet_style_prefer_simplified_interpolation = true : suggestion
dotnet_style_qualification_for_event = false : warning
dotnet_style_qualification_for_field = false : warning
dotnet_style_qualification_for_method = false : warning
Expand Down
10 changes: 6 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NeutralLanguage>en-US</NeutralLanguage>
<NoWarn>$(NoWarn);1591;1998;NU5105;CA1014;CA1508;CA1852</NoWarn>
<NoWarn>$(NoWarn);1591;1998;NU5105</NoWarn>
<DebugType>embedded</DebugType>
<GitHubOrganization>FacilityApi</GitHubOrganization>
<RepositoryName>FacilitySwagger</RepositoryName>
Expand All @@ -21,6 +21,8 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
Expand All @@ -31,13 +33,13 @@
</PropertyGroup>

<PropertyGroup>
<FacilityVersion>2.9.0</FacilityVersion>
<FacilityVersion>2.10.1</FacilityVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Faithlife.Analyzers" Version="1.3.1" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
<PackageReference Include="Faithlife.Analyzers" Version="1.4.0" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Name | Description | NuGet
Facility.Definition.Swagger | Converts OpenAPI 2.0 (Swagger) to/from a Facility Service Definition. | [![NuGet](https://img.shields.io/nuget/v/Facility.Definition.Swagger.svg)](https://www.nuget.org/packages/Facility.Definition.Swagger)
fsdgenswagger | A tool that converts OpenAPI 2.0 (Swagger) to/from a Facility Service Definition. | [![NuGet](https://img.shields.io/nuget/v/fsdgenswagger.svg)](https://www.nuget.org/packages/fsdgenswagger)

[Documentation](https://facilityapi.github.io/) | [Release Notes](ReleaseNotes.md) | [Contributing](CONTRIBUTING.md)
[Documentation](https://facilityapi.github.io/) | [Release Notes](https://github.com/FacilityApi/FacilitySwagger/blob/master/ReleaseNotes.md) | [Contributing](https://github.com/FacilityApi/FacilitySwagger/blob/master/CONTRIBUTING.md)
18 changes: 0 additions & 18 deletions dotnet-tools.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
<Description>Used to interpret Swagger (OpenAPI) 2.0 definitions.</Description>
<PackageTags>Facility FSD Swagger OpenAPI Definition</PackageTags>
<IsPackable>true</IsPackable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Facility.Definition" Version="$(FacilityVersion)" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="YamlDotNet" Version="12.3.1" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
48 changes: 22 additions & 26 deletions src/Facility.Definition.Swagger/ISwaggerSchema.cs
Original file line number Diff line number Diff line change
@@ -1,50 +1,46 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

#pragma warning disable 1591
namespace Facility.Definition.Swagger;

namespace Facility.Definition.Swagger
public interface ISwaggerSchema
{
public interface ISwaggerSchema
{
string? Ref { get; set; } // parameters, schema
string? Ref { get; set; } // parameters, schema

string? Description { get; set; } // parameters, headers, schema
string? Description { get; set; } // parameters, headers, schema

string? Type { get; set; } // parameters (non-body), headers, schema
string? Type { get; set; } // parameters (non-body), headers, schema

string? Format { get; set; } // parameters (non-body), headers, schema
string? Format { get; set; } // parameters (non-body), headers, schema

SwaggerSchema? Items { get; set; } // parameters (non-body), headers, schema
SwaggerSchema? Items { get; set; } // parameters (non-body), headers, schema

JToken? Default { get; set; } // parameters (non-body), headers, schema
JToken? Default { get; set; } // parameters (non-body), headers, schema

double? Maximum { get; set; } // parameters (non-body), headers, schema
double? Maximum { get; set; } // parameters (non-body), headers, schema

bool? ExclusiveMaximum { get; set; } // parameters (non-body), headers, schema
bool? ExclusiveMaximum { get; set; } // parameters (non-body), headers, schema

double? Minimum { get; set; } // parameters (non-body), headers, schema
double? Minimum { get; set; } // parameters (non-body), headers, schema

bool? ExclusiveMinimum { get; set; } // parameters (non-body), headers, schema
bool? ExclusiveMinimum { get; set; } // parameters (non-body), headers, schema

int? MaxLength { get; set; } // parameters (non-body), headers, schema
int? MaxLength { get; set; } // parameters (non-body), headers, schema

int? MinLength { get; set; } // parameters (non-body), headers, schema
int? MinLength { get; set; } // parameters (non-body), headers, schema

string? Pattern { get; set; } // parameters (non-body), headers, schema
string? Pattern { get; set; } // parameters (non-body), headers, schema

int? MaxItems { get; set; } // parameters (non-body), headers, schema
int? MaxItems { get; set; } // parameters (non-body), headers, schema

int? MinItems { get; set; } // parameters (non-body), headers, schema
int? MinItems { get; set; } // parameters (non-body), headers, schema

bool? UniqueItems { get; set; } // parameters (non-body), headers, schema
bool? UniqueItems { get; set; } // parameters (non-body), headers, schema

IList<JToken>? Enum { get; set; } // parameters (non-body), headers, schema
IList<JToken>? Enum { get; set; } // parameters (non-body), headers, schema

double? MultipleOf { get; set; } // parameters (non-body), headers, schema
double? MultipleOf { get; set; } // parameters (non-body), headers, schema

string? Identifier { get; set; } // parameters, headers, schema
string? Identifier { get; set; } // parameters, headers, schema

bool? Obsolete { get; set; } // parameters, headers, schema
}
bool? Obsolete { get; set; } // parameters, headers, schema
}
13 changes: 5 additions & 8 deletions src/Facility.Definition.Swagger/SwaggerContact.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#pragma warning disable 1591
namespace Facility.Definition.Swagger;

namespace Facility.Definition.Swagger
public class SwaggerContact
{
public class SwaggerContact
{
public string? Name { get; set; }
public string? Name { get; set; }

public string? Url { get; set; }
public string? Url { get; set; }

public string? Email { get; set; }
}
public string? Email { get; set; }
}
Loading

0 comments on commit 11c09c3

Please sign in to comment.