From a2f6198dd295fbe950e4f98c6edf7370f578432c Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Mon, 2 Oct 2023 20:01:24 +1100 Subject: [PATCH 01/10] remove some trailing whitespace --- .../Extensions/CommandExtensions.cs | 2 +- .../Formatters/PowerShellFormatter.cs | 2 +- src/Microsoft.OpenApi.Hidi/Logger.cs | 2 +- src/Microsoft.OpenApi.Hidi/OpenApiService.cs | 6 +++--- .../Options/FilterOptions.cs | 4 ++-- src/Microsoft.OpenApi.Hidi/Options/HidiOptions.cs | 2 +- src/Microsoft.OpenApi.Hidi/StatsVisitor.cs | 2 +- .../Utilities/SettingsUtilities.cs | 2 +- .../Exceptions/OpenApiReaderException.cs | 2 +- .../OpenApiUnsupportedSpecVersionException.cs | 2 +- .../Interface/IDiagnostic.cs | 2 +- .../Interface/IOpenApiReader.cs | 2 +- .../Interface/IOpenApiVersionService.cs | 2 +- .../Interface/IStreamLoader.cs | 2 +- src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs | 2 +- .../OpenApiReaderSettings.cs | 14 +++++++------- .../OpenApiStringReader.cs | 2 +- .../OpenApiTextReaderReader.cs | 2 +- .../OpenApiYamlDocumentReader.cs | 2 +- .../ParseNodes/AnyFieldMap.cs | 2 +- .../ParseNodes/AnyFieldMapParameter.cs | 2 +- .../ParseNodes/AnyListFieldMap.cs | 2 +- .../ParseNodes/AnyListFieldMapParameter.cs | 2 +- .../ParseNodes/AnyMapFieldMap.cs | 2 +- .../ParseNodes/AnyMapFieldMapParameter.cs | 2 +- .../ParseNodes/FixedFieldMap.cs | 2 +- .../ParseNodes/JsonPointerExtensions.cs | 2 +- .../ParseNodes/ListNode.cs | 2 +- .../ParseNodes/MapNode.cs | 10 +++++----- .../ParseNodes/OpenApiAnyConverter.cs | 4 ++-- .../ParseNodes/ParseNode.cs | 2 +- .../ParseNodes/PatternFieldMap.cs | 2 +- .../ParseNodes/PropertyNode.cs | 2 +- .../ParseNodes/RootNode.cs | 2 +- .../ParseNodes/ValueNode.cs | 2 +- src/Microsoft.OpenApi.Readers/ParsingContext.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- src/Microsoft.OpenApi.Readers/ReadResult.cs | 2 +- .../Services/DefaultStreamLoader.cs | 2 +- .../Services/OpenApiRemoteReferenceCollector.cs | 6 +++--- .../Services/OpenApiWorkspaceLoader.cs | 2 +- .../V2/OpenApiContactDeserializer.cs | 2 +- .../V2/OpenApiDocumentDeserializer.cs | 4 ++-- .../V2/OpenApiExternalDocsDeserializer.cs | 2 +- .../V2/OpenApiHeaderDeserializer.cs | 8 ++++---- .../V2/OpenApiInfoDeserializer.cs | 2 +- .../V2/OpenApiLicenseDeserializer.cs | 2 +- .../V2/OpenApiOperationDeserializer.cs | 2 +- .../V2/OpenApiParameterDeserializer.cs | 2 +- .../V2/OpenApiPathItemDeserializer.cs | 2 +- .../V2/OpenApiPathsDeserializer.cs | 2 +- .../V2/OpenApiResponseDeserializer.cs | 4 ++-- .../V2/OpenApiSchemaDeserializer.cs | 2 +- .../V2/OpenApiSecurityRequirementDeserializer.cs | 2 +- .../V2/OpenApiSecuritySchemeDeserializer.cs | 2 +- .../V2/OpenApiTagDeserializer.cs | 2 +- .../V2/OpenApiV2Deserializer.cs | 2 +- .../V2/OpenApiV2VersionService.cs | 2 +- .../V2/OpenApiXmlDeserializer.cs | 2 +- .../V2/TempStorageKeys.cs | 2 +- .../V3/OpenApiCallbackDeserializer.cs | 2 +- .../V3/OpenApiComponentsDeserializer.cs | 2 +- .../V3/OpenApiContactDeserializer.cs | 2 +- .../V3/OpenApiDiscriminatorDeserializer.cs | 2 +- .../V3/OpenApiDocumentDeserializer.cs | 2 +- .../V3/OpenApiEncodingDeserializer.cs | 2 +- .../V3/OpenApiExampleDeserializer.cs | 2 +- .../V3/OpenApiExternalDocsDeserializer.cs | 2 +- .../V3/OpenApiHeaderDeserializer.cs | 2 +- .../V3/OpenApiInfoDeserializer.cs | 2 +- .../V3/OpenApiLicenseDeserializer.cs | 2 +- .../V3/OpenApiLinkDeserializer.cs | 2 +- .../V3/OpenApiMediaTypeDeserializer.cs | 2 +- .../V3/OpenApiOAuthFlowDeserializer.cs | 2 +- .../V3/OpenApiOAuthFlowsDeserializer.cs | 2 +- .../V3/OpenApiOperationDeserializer.cs | 2 +- .../V3/OpenApiParameterDeserializer.cs | 2 +- .../V3/OpenApiPathItemDeserializer.cs | 6 +++--- .../V3/OpenApiPathsDeserializer.cs | 2 +- .../V3/OpenApiRequestBodyDeserializer.cs | 2 +- .../V3/OpenApiResponseDeserializer.cs | 2 +- .../V3/OpenApiResponsesDeserializer.cs | 2 +- .../V3/OpenApiSchemaDeserializer.cs | 4 ++-- .../V3/OpenApiSecurityRequirementDeserializer.cs | 2 +- .../V3/OpenApiSecuritySchemeDeserializer.cs | 2 +- .../V3/OpenApiServerDeserializer.cs | 2 +- .../V3/OpenApiServerVariableDeserializer.cs | 2 +- .../V3/OpenApiTagDeserializer.cs | 2 +- .../V3/OpenApiV3Deserializer.cs | 2 +- .../V3/OpenApiV3VersionService.cs | 4 ++-- .../V3/OpenApiXmlDeserializer.cs | 2 +- src/Microsoft.OpenApi.Readers/YamlHelper.cs | 2 +- src/Microsoft.OpenApi.Workbench/App.xaml.cs | 2 +- src/Microsoft.OpenApi.Workbench/MainModel.cs | 6 +++--- src/Microsoft.OpenApi.Workbench/MainWindow.xaml.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- src/Microsoft.OpenApi.Workbench/StatsVisitor.cs | 2 +- src/Microsoft.OpenApi/Any/AnyType.cs | 2 +- src/Microsoft.OpenApi/Any/IOpenApiAny.cs | 2 +- src/Microsoft.OpenApi/Any/IOpenApiPrimitive.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiAnyCloneHelper.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiArray.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiBinary.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiBoolean.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiByte.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiDate.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiDateTime.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiDouble.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiFloat.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiInteger.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiLong.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiNull.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiObject.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiPassword.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiPrimitive.cs | 2 +- src/Microsoft.OpenApi/Any/OpenApiString.cs | 4 ++-- .../Attributes/DisplayAttribute.cs | 2 +- src/Microsoft.OpenApi/Error.cs | 2 +- .../Exceptions/OpenApiException.cs | 6 +++--- .../Exceptions/OpenApiWriterException.cs | 2 +- .../Expressions/BodyExpression.cs | 2 +- .../Expressions/CompositeExpression.cs | 2 +- .../Expressions/HeaderExpression.cs | 2 +- .../Expressions/MethodExpression.cs | 2 +- .../Expressions/PathExpression.cs | 2 +- .../Expressions/QueryExpression.cs | 2 +- .../Expressions/RequestExpression.cs | 2 +- .../Expressions/ResponseExpression.cs | 2 +- .../Expressions/RuntimeExpression.cs | 2 +- .../Expressions/SourceExpression.cs | 2 +- .../Expressions/StatusCodeExpression.cs | 2 +- src/Microsoft.OpenApi/Expressions/UrlExpression.cs | 2 +- src/Microsoft.OpenApi/Extensions/EnumExtensions.cs | 2 +- .../Extensions/OpenAPIWriterExtensions.cs | 2 +- .../Extensions/OpenApiElementExtensions.cs | 2 +- .../Extensions/OpenApiExtensibleExtensions.cs | 2 +- .../Extensions/OpenApiReferencableExtensions.cs | 2 +- .../Extensions/OpenApiSerializableExtensions.cs | 4 ++-- .../Extensions/OpenApiTypeMapper.cs | 6 +++--- src/Microsoft.OpenApi/Interfaces/IEffective.cs | 6 +++--- .../Interfaces/IOpenApiElement.cs | 2 +- .../Interfaces/IOpenApiExtensible.cs | 2 +- .../Interfaces/IOpenApiExtension.cs | 2 +- .../Interfaces/IOpenApiReferenceable.cs | 2 +- .../Interfaces/IOpenApiSerializable.cs | 2 +- src/Microsoft.OpenApi/JsonPointer.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiCallback.cs | 4 ++-- src/Microsoft.OpenApi/Models/OpenApiComponents.cs | 4 ++-- src/Microsoft.OpenApi/Models/OpenApiConstants.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiContact.cs | 2 +- .../Models/OpenApiDiscriminator.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiDocument.cs | 14 +++++++------- src/Microsoft.OpenApi/Models/OpenApiEncoding.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiError.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiExample.cs | 4 ++-- .../Models/OpenApiExtensibleDictionary.cs | 4 ++-- .../Models/OpenApiExternalDocs.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiHeader.cs | 4 ++-- src/Microsoft.OpenApi/Models/OpenApiInfo.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiLicense.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiLink.cs | 4 ++-- src/Microsoft.OpenApi/Models/OpenApiMediaType.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiOAuthFlow.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiOAuthFlows.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiOperation.cs | 4 ++-- src/Microsoft.OpenApi/Models/OpenApiParameter.cs | 10 +++++----- src/Microsoft.OpenApi/Models/OpenApiPathItem.cs | 8 ++++---- src/Microsoft.OpenApi/Models/OpenApiPaths.cs | 4 ++-- src/Microsoft.OpenApi/Models/OpenApiReference.cs | 4 ++-- src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs | 6 +++--- src/Microsoft.OpenApi/Models/OpenApiResponse.cs | 4 ++-- src/Microsoft.OpenApi/Models/OpenApiResponses.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiSchema.cs | 8 ++++---- .../Models/OpenApiSecurityRequirement.cs | 2 +- .../Models/OpenApiSecurityScheme.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiServer.cs | 2 +- .../Models/OpenApiServerVariable.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiTag.cs | 2 +- src/Microsoft.OpenApi/Models/OpenApiXml.cs | 2 +- src/Microsoft.OpenApi/Models/OperationType.cs | 2 +- src/Microsoft.OpenApi/Models/ParameterLocation.cs | 2 +- src/Microsoft.OpenApi/Models/ParameterStyle.cs | 2 +- src/Microsoft.OpenApi/Models/ReferenceType.cs | 2 +- .../Models/RuntimeExpressionAnyWrapper.cs | 2 +- src/Microsoft.OpenApi/Models/SecuritySchemeType.cs | 2 +- src/Microsoft.OpenApi/OpenApiFormat.cs | 2 +- src/Microsoft.OpenApi/OpenApiSpecVersion.cs | 4 ++-- src/Microsoft.OpenApi/Properties/AssemblyInfo.cs | 2 +- .../Services/OpenApiReferenceError.cs | 2 +- .../Services/OpenApiReferenceResolver.cs | 2 +- .../Services/OpenApiUrlTreeNode.cs | 4 ++-- .../Services/OpenApiVisitorBase.cs | 4 ++-- src/Microsoft.OpenApi/Services/OpenApiWalker.cs | 4 ++-- src/Microsoft.OpenApi/Services/OpenApiWorkspace.cs | 8 ++++---- .../Validations/IValidationContext.cs | 4 ++-- .../Validations/OpenApiValidatiorWarning.cs | 2 +- .../Validations/OpenApiValidator.cs | 4 ++-- .../Validations/OpenApiValidatorError.cs | 2 +- .../Validations/Rules/OpenApiComponentsRules.cs | 2 +- .../Validations/Rules/OpenApiContactRules.cs | 2 +- .../Validations/Rules/OpenApiDocumentRules.cs | 2 +- .../Validations/Rules/OpenApiExtensionRules.cs | 2 +- .../Validations/Rules/OpenApiExternalDocsRules.cs | 2 +- .../Validations/Rules/OpenApiHeaderRules.cs | 2 +- .../Validations/Rules/OpenApiInfoRules.cs | 2 +- .../Validations/Rules/OpenApiLicenseRules.cs | 2 +- .../Validations/Rules/OpenApiMediaTypeRules.cs | 2 +- .../Validations/Rules/OpenApiOAuthFlowRules.cs | 2 +- .../Validations/Rules/OpenApiParameterRules.cs | 6 +++--- .../Validations/Rules/OpenApiPathsRules.cs | 2 +- .../Validations/Rules/OpenApiResponseRules.cs | 2 +- .../Validations/Rules/OpenApiResponsesRules.cs | 2 +- .../Validations/Rules/OpenApiSchemaRules.cs | 2 +- .../Validations/Rules/OpenApiServerRules.cs | 2 +- .../Validations/Rules/OpenApiTagRules.cs | 2 +- .../Validations/Rules/RuleHelpers.cs | 2 +- .../Validations/ValidationExtensions.cs | 2 +- .../Validations/ValidationRule.cs | 2 +- .../Validations/ValidationRuleSet.cs | 2 +- .../Writers/FormattingStreamWriter.cs | 2 +- src/Microsoft.OpenApi/Writers/IOpenApiWriter.cs | 2 +- src/Microsoft.OpenApi/Writers/OpenApiJsonWriter.cs | 2 +- .../Writers/OpenApiWriterAnyExtensions.cs | 2 +- src/Microsoft.OpenApi/Writers/OpenApiWriterBase.cs | 6 +++--- .../Writers/OpenApiWriterExtensions.cs | 2 +- .../Writers/OpenApiWriterSettings.cs | 4 ++-- src/Microsoft.OpenApi/Writers/OpenApiYamlWriter.cs | 8 ++++---- src/Microsoft.OpenApi/Writers/Scope.cs | 2 +- .../Writers/SpecialCharacterStringExtensions.cs | 8 ++++---- src/Microsoft.OpenApi/Writers/WriterConstants.cs | 2 +- .../UtilityFiles/OpenApiDocumentMock.cs | 2 +- .../DefaultSettingsFixture.cs | 2 +- .../DefaultSettingsFixtureCollection.cs | 2 +- .../OpenApiReaderTests/OpenApiDiagnosticTests.cs | 2 +- .../UnsupportedSpecVersionTests.cs | 2 +- .../OpenApiWorkspaceStreamTests.cs | 2 +- .../ParseNodeTests.cs | 2 +- .../ParseNodes/OpenApiAnyConverterTests.cs | 2 +- .../ParseNodes/OpenApiAnyTests.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../ConvertToOpenApiReferenceV2Tests.cs | 2 +- .../ConvertToOpenApiReferenceV3Tests.cs | 2 +- .../ReferenceService/TryLoadReferenceV2Tests.cs | 2 +- .../TestCustomExtension.cs | 2 +- test/Microsoft.OpenApi.Readers.Tests/TestHelper.cs | 2 +- .../V2Tests/ComparisonTests.cs | 2 +- .../V2Tests/OpenApiContactTests.cs | 2 +- .../V2Tests/OpenApiDocumentTests.cs | 2 +- .../V2Tests/OpenApiHeaderTests.cs | 2 +- .../V2Tests/OpenApiOperationTests.cs | 2 +- .../V2Tests/OpenApiParameterTests.cs | 2 +- .../V2Tests/OpenApiPathItemTests.cs | 2 +- .../V2Tests/OpenApiSchemaTests.cs | 2 +- .../V2Tests/OpenApiSecuritySchemeTests.cs | 2 +- .../V3Tests/OpenApiCallbackTests.cs | 2 +- .../V3Tests/OpenApiContactTests.cs | 2 +- .../V3Tests/OpenApiDiscriminatorTests.cs | 2 +- .../V3Tests/OpenApiDocumentTests.cs | 2 +- .../V3Tests/OpenApiEncodingTests.cs | 2 +- .../V3Tests/OpenApiExampleTests.cs | 2 +- .../V3Tests/OpenApiInfoTests.cs | 2 +- .../V3Tests/OpenApiMediaTypeTests.cs | 2 +- .../V3Tests/OpenApiOperationTests.cs | 2 +- .../V3Tests/OpenApiParameterTests.cs | 2 +- .../V3Tests/OpenApiSchemaTests.cs | 2 +- .../V3Tests/OpenApiSecuritySchemeTests.cs | 2 +- .../V3Tests/OpenApiXmlTests.cs | 2 +- test/Microsoft.OpenApi.SmokeTests/ApiGurus.cs | 2 +- .../DefaultSettingsFixture.cs | 2 +- .../DefaultSettingsFixtureCollection.cs | 2 +- .../Extensions/OpenApiTypeMapperTests.cs | 4 ++-- .../Models/OpenApiCallbackTests.cs | 2 +- .../Models/OpenApiComponentsTests.cs | 2 +- .../Models/OpenApiContactTests.cs | 2 +- .../Models/OpenApiDocumentTests.cs | 10 +++++----- .../Models/OpenApiEncodingTests.cs | 2 +- .../Models/OpenApiExampleTests.cs | 2 +- .../Models/OpenApiExternalDocsTests.cs | 2 +- .../Models/OpenApiHeaderTests.cs | 2 +- .../Models/OpenApiInfoTests.cs | 2 +- .../Models/OpenApiLicenseTests.cs | 2 +- .../Models/OpenApiLinkTests.cs | 2 +- .../Models/OpenApiMediaTypeTests.cs | 2 +- .../Models/OpenApiOAuthFlowTests.cs | 2 +- .../Models/OpenApiOAuthFlowsTests.cs | 2 +- .../Models/OpenApiOperationTests.cs | 2 +- .../Models/OpenApiParameterTests.cs | 4 ++-- .../Models/OpenApiReferenceTests.cs | 2 +- .../Models/OpenApiRequestBodyTests.cs | 2 +- .../Models/OpenApiResponseTests.cs | 2 +- .../Models/OpenApiSchemaTests.cs | 4 ++-- .../Models/OpenApiSecurityRequirementTests.cs | 2 +- .../Models/OpenApiSecuritySchemeTests.cs | 6 +++--- .../Models/OpenApiServerTests.cs | 2 +- .../Models/OpenApiServerVariableTests.cs | 2 +- .../Models/OpenApiTagTests.cs | 2 +- .../Models/OpenApiXmlTests.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 +- .../Services/OpenApiValidatorTests.cs | 2 +- test/Microsoft.OpenApi.Tests/StringExtensions.cs | 2 +- .../OpenApiComponentsValidationTests.cs | 2 +- .../Validations/OpenApiContactValidationTests.cs | 2 +- .../OpenApiExternalDocsValidationTests.cs | 2 +- .../Validations/OpenApiHeaderValidationTests.cs | 2 +- .../Validations/OpenApiInfoValidationTests.cs | 2 +- .../Validations/OpenApiLicenseValidationTests.cs | 2 +- .../Validations/OpenApiMediaTypeValidationTests.cs | 2 +- .../Validations/OpenApiOAuthFlowValidationTests.cs | 2 +- .../Validations/OpenApiParameterValidationTests.cs | 2 +- .../Validations/OpenApiReferenceValidationTests.cs | 2 +- .../Validations/OpenApiResponseValidationTests.cs | 2 +- .../Validations/OpenApiSchemaValidationTests.cs | 6 +++--- .../Validations/OpenApiServerValidationTests.cs | 2 +- .../Validations/OpenApiTagValidationTests.cs | 2 +- .../Walkers/WalkerLocationTests.cs | 2 +- .../Workspaces/OpenApiReferencableTests.cs | 2 +- .../Writers/OpenApiJsonWriterTests.cs | 2 +- .../Writers/OpenApiWriterAnyExtensionsTests.cs | 4 ++-- .../Writers/OpenApiWriterSpecialCharacterTests.cs | 2 +- .../Writers/OpenApiYamlWriterTests.cs | 2 +- 320 files changed, 415 insertions(+), 415 deletions(-) diff --git a/src/Microsoft.OpenApi.Hidi/Extensions/CommandExtensions.cs b/src/Microsoft.OpenApi.Hidi/Extensions/CommandExtensions.cs index 9d5077432..5b83212d5 100644 --- a/src/Microsoft.OpenApi.Hidi/Extensions/CommandExtensions.cs +++ b/src/Microsoft.OpenApi.Hidi/Extensions/CommandExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.CommandLine; diff --git a/src/Microsoft.OpenApi.Hidi/Formatters/PowerShellFormatter.cs b/src/Microsoft.OpenApi.Hidi/Formatters/PowerShellFormatter.cs index 4db55a05e..260119188 100644 --- a/src/Microsoft.OpenApi.Hidi/Formatters/PowerShellFormatter.cs +++ b/src/Microsoft.OpenApi.Hidi/Formatters/PowerShellFormatter.cs @@ -24,7 +24,7 @@ static PowerShellFormatter() { // Add singularization exclusions. // Enhancement: Read exclusions from a user provided file. - Vocabularies.Default.AddSingular("(drive)s$", "$1"); // drives does not properly singularize to drive. + Vocabularies.Default.AddSingular("(drive)s$", "$1"); // drives does not properly singularize to drive. Vocabularies.Default.AddSingular("(data)$", "$1"); // exclude the following from singularization. Vocabularies.Default.AddSingular("(delta)$", "$1"); Vocabularies.Default.AddSingular("(quota)$", "$1"); diff --git a/src/Microsoft.OpenApi.Hidi/Logger.cs b/src/Microsoft.OpenApi.Hidi/Logger.cs index 717ca1a41..dec4a5f8e 100644 --- a/src/Microsoft.OpenApi.Hidi/Logger.cs +++ b/src/Microsoft.OpenApi.Hidi/Logger.cs @@ -21,7 +21,7 @@ public static ILoggerFactory ConfigureLogger(LogLevel logLevel) { c.IncludeScopes = true; }) -#if DEBUG +#if DEBUG .AddDebug() #endif .SetMinimumLevel(logLevel); diff --git a/src/Microsoft.OpenApi.Hidi/OpenApiService.cs b/src/Microsoft.OpenApi.Hidi/OpenApiService.cs index d698bd5b2..fc70d409b 100644 --- a/src/Microsoft.OpenApi.Hidi/OpenApiService.cs +++ b/src/Microsoft.OpenApi.Hidi/OpenApiService.cs @@ -154,7 +154,7 @@ private static OpenApiDocument ApplyFilters(HidiOptions options, ILogger logger, requestUrls = EnumerateJsonDocument(postmanCollection.RootElement, new()); logger.LogTrace("Finished fetching the list of paths and Http methods defined in the Postman collection."); } - else + else { requestUrls = new(); logger.LogTrace("No filter options provided."); @@ -211,7 +211,7 @@ private static void WriteOpenApi(HidiOptions options, OpenApiFormat openApiForma } } - // Get OpenAPI document either from OpenAPI or CSDL + // Get OpenAPI document either from OpenAPI or CSDL private static async Task GetOpenApi(HidiOptions options, ILogger logger, CancellationToken cancellationToken, string? metadataVersion = null) { @@ -285,7 +285,7 @@ private static async Task GetOpenApi(HidiOptions options, ILogg private static Dictionary> GetRequestUrlsFromManifest(ApiDependency apiDependency) { - // Get the request URLs from the API Dependencies in the API manifest + // Get the request URLs from the API Dependencies in the API manifest var requests = apiDependency .Requests.Where(static r => !r.Exclude && !string.IsNullOrEmpty(r.UriTemplate) && !string.IsNullOrEmpty(r.Method)) .Select(static r => new { UriTemplate = r.UriTemplate!, Method = r.Method! }) diff --git a/src/Microsoft.OpenApi.Hidi/Options/FilterOptions.cs b/src/Microsoft.OpenApi.Hidi/Options/FilterOptions.cs index d82a064f7..1abf5a6bf 100644 --- a/src/Microsoft.OpenApi.Hidi/Options/FilterOptions.cs +++ b/src/Microsoft.OpenApi.Hidi/Options/FilterOptions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Hidi.Options { @@ -8,6 +8,6 @@ internal class FilterOptions public string? FilterByOperationIds { get; internal set; } public string? FilterByTags { get; internal set; } public string? FilterByCollection { get; internal set; } - public string? FilterByApiManifest { get; internal set; } + public string? FilterByApiManifest { get; internal set; } } } diff --git a/src/Microsoft.OpenApi.Hidi/Options/HidiOptions.cs b/src/Microsoft.OpenApi.Hidi/Options/HidiOptions.cs index 9f5a109f7..9b12b73f3 100644 --- a/src/Microsoft.OpenApi.Hidi/Options/HidiOptions.cs +++ b/src/Microsoft.OpenApi.Hidi/Options/HidiOptions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.CommandLine.Parsing; using System.IO; diff --git a/src/Microsoft.OpenApi.Hidi/StatsVisitor.cs b/src/Microsoft.OpenApi.Hidi/StatsVisitor.cs index 871f88dca..b6af07778 100644 --- a/src/Microsoft.OpenApi.Hidi/StatsVisitor.cs +++ b/src/Microsoft.OpenApi.Hidi/StatsVisitor.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Hidi/Utilities/SettingsUtilities.cs b/src/Microsoft.OpenApi.Hidi/Utilities/SettingsUtilities.cs index 6264270a6..6ec32f488 100644 --- a/src/Microsoft.OpenApi.Hidi/Utilities/SettingsUtilities.cs +++ b/src/Microsoft.OpenApi.Hidi/Utilities/SettingsUtilities.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.Extensions.Configuration; using Microsoft.OpenApi.OData; diff --git a/src/Microsoft.OpenApi.Readers/Exceptions/OpenApiReaderException.cs b/src/Microsoft.OpenApi.Readers/Exceptions/OpenApiReaderException.cs index e90137ad3..36db10127 100644 --- a/src/Microsoft.OpenApi.Readers/Exceptions/OpenApiReaderException.cs +++ b/src/Microsoft.OpenApi.Readers/Exceptions/OpenApiReaderException.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Exceptions; diff --git a/src/Microsoft.OpenApi.Readers/Exceptions/OpenApiUnsupportedSpecVersionException.cs b/src/Microsoft.OpenApi.Readers/Exceptions/OpenApiUnsupportedSpecVersionException.cs index 705b212d0..2d125c259 100644 --- a/src/Microsoft.OpenApi.Readers/Exceptions/OpenApiUnsupportedSpecVersionException.cs +++ b/src/Microsoft.OpenApi.Readers/Exceptions/OpenApiUnsupportedSpecVersionException.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Globalization; diff --git a/src/Microsoft.OpenApi.Readers/Interface/IDiagnostic.cs b/src/Microsoft.OpenApi.Readers/Interface/IDiagnostic.cs index da3381f7e..65511ce11 100644 --- a/src/Microsoft.OpenApi.Readers/Interface/IDiagnostic.cs +++ b/src/Microsoft.OpenApi.Readers/Interface/IDiagnostic.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Readers.Interface { diff --git a/src/Microsoft.OpenApi.Readers/Interface/IOpenApiReader.cs b/src/Microsoft.OpenApi.Readers/Interface/IOpenApiReader.cs index 39724b3c6..8991c9b59 100644 --- a/src/Microsoft.OpenApi.Readers/Interface/IOpenApiReader.cs +++ b/src/Microsoft.OpenApi.Readers/Interface/IOpenApiReader.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/Interface/IOpenApiVersionService.cs b/src/Microsoft.OpenApi.Readers/Interface/IOpenApiVersionService.cs index a7a98d781..a3b3c7fa5 100644 --- a/src/Microsoft.OpenApi.Readers/Interface/IOpenApiVersionService.cs +++ b/src/Microsoft.OpenApi.Readers/Interface/IOpenApiVersionService.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Interfaces; diff --git a/src/Microsoft.OpenApi.Readers/Interface/IStreamLoader.cs b/src/Microsoft.OpenApi.Readers/Interface/IStreamLoader.cs index b93c69f39..b3c0c4613 100644 --- a/src/Microsoft.OpenApi.Readers/Interface/IStreamLoader.cs +++ b/src/Microsoft.OpenApi.Readers/Interface/IStreamLoader.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.IO; diff --git a/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs b/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs index 0ffac77e7..1c70db887 100644 --- a/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs +++ b/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs b/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs index 25bcbca6f..71a18e137 100644 --- a/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs +++ b/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs @@ -80,7 +80,7 @@ public class OpenApiReaderSettings /// from an object. /// public bool LeaveStreamOpen { get; set; } - + /// /// Adds parsers for Microsoft OpenAPI extensions: /// - @@ -93,17 +93,17 @@ public class OpenApiReaderSettings /// public void AddMicrosoftExtensionParsers() { - if (!ExtensionParsers.ContainsKey(OpenApiPagingExtension.Name)) + if (!ExtensionParsers.ContainsKey(OpenApiPagingExtension.Name)) ExtensionParsers.Add(OpenApiPagingExtension.Name, static (i, _) => OpenApiPagingExtension.Parse(i)); - if (!ExtensionParsers.ContainsKey(OpenApiEnumValuesDescriptionExtension.Name)) + if (!ExtensionParsers.ContainsKey(OpenApiEnumValuesDescriptionExtension.Name)) ExtensionParsers.Add(OpenApiEnumValuesDescriptionExtension.Name, static (i, _ ) => OpenApiEnumValuesDescriptionExtension.Parse(i)); - if (!ExtensionParsers.ContainsKey(OpenApiPrimaryErrorMessageExtension.Name)) + if (!ExtensionParsers.ContainsKey(OpenApiPrimaryErrorMessageExtension.Name)) ExtensionParsers.Add(OpenApiPrimaryErrorMessageExtension.Name, static (i, _ ) => OpenApiPrimaryErrorMessageExtension.Parse(i)); - if (!ExtensionParsers.ContainsKey(OpenApiDeprecationExtension.Name)) + if (!ExtensionParsers.ContainsKey(OpenApiDeprecationExtension.Name)) ExtensionParsers.Add(OpenApiDeprecationExtension.Name, static (i, _ ) => OpenApiDeprecationExtension.Parse(i)); - if (!ExtensionParsers.ContainsKey(OpenApiReservedParameterExtension.Name)) + if (!ExtensionParsers.ContainsKey(OpenApiReservedParameterExtension.Name)) ExtensionParsers.Add(OpenApiReservedParameterExtension.Name, static (i, _ ) => OpenApiReservedParameterExtension.Parse(i)); - if (!ExtensionParsers.ContainsKey(OpenApiEnumFlagsExtension.Name)) + if (!ExtensionParsers.ContainsKey(OpenApiEnumFlagsExtension.Name)) ExtensionParsers.Add(OpenApiEnumFlagsExtension.Name, static (i, _ ) => OpenApiEnumFlagsExtension.Parse(i)); } } diff --git a/src/Microsoft.OpenApi.Readers/OpenApiStringReader.cs b/src/Microsoft.OpenApi.Readers/OpenApiStringReader.cs index 0cb9605dd..0d2dbd241 100644 --- a/src/Microsoft.OpenApi.Readers/OpenApiStringReader.cs +++ b/src/Microsoft.OpenApi.Readers/OpenApiStringReader.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using Microsoft.OpenApi.Interfaces; diff --git a/src/Microsoft.OpenApi.Readers/OpenApiTextReaderReader.cs b/src/Microsoft.OpenApi.Readers/OpenApiTextReaderReader.cs index d6722d440..74566fd58 100644 --- a/src/Microsoft.OpenApi.Readers/OpenApiTextReaderReader.cs +++ b/src/Microsoft.OpenApi.Readers/OpenApiTextReaderReader.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using System.Linq; diff --git a/src/Microsoft.OpenApi.Readers/OpenApiYamlDocumentReader.cs b/src/Microsoft.OpenApi.Readers/OpenApiYamlDocumentReader.cs index 5537366d0..4f9dee12c 100644 --- a/src/Microsoft.OpenApi.Readers/OpenApiYamlDocumentReader.cs +++ b/src/Microsoft.OpenApi.Readers/OpenApiYamlDocumentReader.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyFieldMap.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyFieldMap.cs index a135f7f02..479417bdb 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyFieldMap.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyFieldMap.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyFieldMapParameter.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyFieldMapParameter.cs index 30aa0dbca..515a6e174 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyFieldMapParameter.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyFieldMapParameter.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Any; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyListFieldMap.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyListFieldMap.cs index dbc9eabeb..dcec81bb6 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyListFieldMap.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyListFieldMap.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyListFieldMapParameter.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyListFieldMapParameter.cs index cfa1c3702..aed34cf60 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyListFieldMapParameter.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyListFieldMapParameter.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyMapFieldMap.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyMapFieldMap.cs index abd4f4466..e6b2a7b08 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyMapFieldMap.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyMapFieldMap.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyMapFieldMapParameter.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyMapFieldMapParameter.cs index 1aa899978..49fc65dcb 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/AnyMapFieldMapParameter.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/AnyMapFieldMapParameter.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/FixedFieldMap.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/FixedFieldMap.cs index 50cc5e4b7..4364cf1df 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/FixedFieldMap.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/FixedFieldMap.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/JsonPointerExtensions.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/JsonPointerExtensions.cs index d30863955..39e53933a 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/JsonPointerExtensions.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/JsonPointerExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using SharpYaml.Serialization; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs index d11ff4c04..bbc9e30b8 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs index 92c49726b..ee92938c4 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections; @@ -67,7 +67,7 @@ public override Dictionary CreateMap(Func map) var nodes = yamlMap.Select( n => { - + var key = n.Key.GetScalarValue(); T value; try @@ -76,7 +76,7 @@ public override Dictionary CreateMap(Func map) value = n.Value as YamlMappingNode == null ? default(T) : map(new MapNode(Context, n.Value as YamlMappingNode)); - } + } finally { Context.EndObject(); @@ -93,7 +93,7 @@ public override Dictionary CreateMap(Func map) public override Dictionary CreateMapWithReference( ReferenceType referenceType, - Func map) + Func map) { var yamlMap = _node; if (yamlMap == null) @@ -141,7 +141,7 @@ public override Dictionary CreateSimpleMap(Func map) { var yamlMap = _node; if (yamlMap == null) - { + { throw new OpenApiReaderException($"Expected map while parsing {typeof(T).Name}", Context); } diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/OpenApiAnyConverter.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/OpenApiAnyConverter.cs index 01aef7652..f17cf251c 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/OpenApiAnyConverter.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/OpenApiAnyConverter.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Globalization; @@ -260,7 +260,7 @@ public static IOpenApiAny GetSpecificOpenApiAny(IOpenApiAny openApiAny, OpenApiS } // If data conflicts with the given type, return a string. - // This converter is used in the parser, so it does not perform any validations, + // This converter is used in the parser, so it does not perform any validations, // but the validator can be used to validate whether the data and given type conflicts. return openApiAny; } diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/ParseNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/ParseNode.cs index 295b02bf3..174f5a2cf 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/ParseNode.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/ParseNode.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/PatternFieldMap.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/PatternFieldMap.cs index bbd153688..8fb28bc5e 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/PatternFieldMap.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/PatternFieldMap.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/PropertyNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/PropertyNode.cs index 2dd2c7e8a..b53c1d405 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/PropertyNode.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/PropertyNode.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/RootNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/RootNode.cs index 42909bee6..d9f18603f 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/RootNode.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/RootNode.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using SharpYaml.Serialization; diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/ValueNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/ValueNode.cs index bbce7a7d3..8b4de6c1a 100644 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/ValueNode.cs +++ b/src/Microsoft.OpenApi.Readers/ParseNodes/ValueNode.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Readers.Exceptions; diff --git a/src/Microsoft.OpenApi.Readers/ParsingContext.cs b/src/Microsoft.OpenApi.Readers/ParsingContext.cs index afc76bcf5..ffef15904 100644 --- a/src/Microsoft.OpenApi.Readers/ParsingContext.cs +++ b/src/Microsoft.OpenApi.Readers/ParsingContext.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/Properties/AssemblyInfo.cs b/src/Microsoft.OpenApi.Readers/Properties/AssemblyInfo.cs index b42e91bd1..554e1aad8 100644 --- a/src/Microsoft.OpenApi.Readers/Properties/AssemblyInfo.cs +++ b/src/Microsoft.OpenApi.Readers/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Runtime.CompilerServices; diff --git a/src/Microsoft.OpenApi.Readers/ReadResult.cs b/src/Microsoft.OpenApi.Readers/ReadResult.cs index 7479d345f..b1ddcb712 100644 --- a/src/Microsoft.OpenApi.Readers/ReadResult.cs +++ b/src/Microsoft.OpenApi.Readers/ReadResult.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/Services/DefaultStreamLoader.cs b/src/Microsoft.OpenApi.Readers/Services/DefaultStreamLoader.cs index 09f16632b..10d8d1d93 100644 --- a/src/Microsoft.OpenApi.Readers/Services/DefaultStreamLoader.cs +++ b/src/Microsoft.OpenApi.Readers/Services/DefaultStreamLoader.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.IO; diff --git a/src/Microsoft.OpenApi.Readers/Services/OpenApiRemoteReferenceCollector.cs b/src/Microsoft.OpenApi.Readers/Services/OpenApiRemoteReferenceCollector.cs index 9a5ba9213..d7ee0ca13 100644 --- a/src/Microsoft.OpenApi.Readers/Services/OpenApiRemoteReferenceCollector.cs +++ b/src/Microsoft.OpenApi.Readers/Services/OpenApiRemoteReferenceCollector.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Interfaces; @@ -31,7 +31,7 @@ public IEnumerable References } /// - /// Collect reference for each reference + /// Collect reference for each reference /// /// public override void Visit(IOpenApiReferenceable referenceable) @@ -54,6 +54,6 @@ private void AddReference(OpenApiReference reference) } } } - } + } } } diff --git a/src/Microsoft.OpenApi.Readers/Services/OpenApiWorkspaceLoader.cs b/src/Microsoft.OpenApi.Readers/Services/OpenApiWorkspaceLoader.cs index 79f6206d0..b98982f8c 100644 --- a/src/Microsoft.OpenApi.Readers/Services/OpenApiWorkspaceLoader.cs +++ b/src/Microsoft.OpenApi.Readers/Services/OpenApiWorkspaceLoader.cs @@ -11,7 +11,7 @@ namespace Microsoft.OpenApi.Readers.Services { - internal class OpenApiWorkspaceLoader + internal class OpenApiWorkspaceLoader { private OpenApiWorkspace _workspace; private IStreamLoader _loader; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiContactDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiContactDeserializer.cs index 99bc4451a..c25f5d0c8 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiContactDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiContactDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiDocumentDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiDocumentDeserializer.cs index 806c96877..4e4f000d6 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiDocumentDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiDocumentDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -300,7 +300,7 @@ private static void FixRequestBodyReferences(OpenApiDocument doc) private static bool IsHostValid(string host) { - //Check if the host contains :// + //Check if the host contains :// if (host.Contains(Uri.SchemeDelimiter)) { return false; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiExternalDocsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiExternalDocsDeserializer.cs index eea726777..b773fd784 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiExternalDocsDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiExternalDocsDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiHeaderDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiHeaderDeserializer.cs index 5d6cc2ff3..821e08a26 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiHeaderDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiHeaderDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Globalization; @@ -140,10 +140,10 @@ internal static partial class OpenApiV2Deserializer OpenApiConstants.Default, new AnyFieldMapParameter( p => p.Schema?.Default, - (p, v) => + (p, v) => { if(p.Schema == null) return; - p.Schema.Default = v; + p.Schema.Default = v; }, p => p.Schema) } @@ -159,7 +159,7 @@ internal static partial class OpenApiV2Deserializer (p, v) => { if(p.Schema == null) return; - p.Schema.Enum = v; + p.Schema.Enum = v; }, p => p.Schema) }, diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiInfoDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiInfoDeserializer.cs index 5854672d3..0da2034ec 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiInfoDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiInfoDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiLicenseDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiLicenseDeserializer.cs index 4c4009f57..6a7445e73 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiLicenseDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiLicenseDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiOperationDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiOperationDeserializer.cs index cf54df8c3..e2be3ea6a 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiOperationDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiOperationDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiParameterDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiParameterDeserializer.cs index 5be08c71e..aea3b62df 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiParameterDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiParameterDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiPathItemDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiPathItemDeserializer.cs index d9db5a8d8..5b6222e27 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiPathItemDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiPathItemDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiPathsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiPathsDeserializer.cs index 2aa5de979..611eee485 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiPathsDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiPathsDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiResponseDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiResponseDeserializer.cs index 182def419..0f340c947 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiResponseDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiResponseDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Extensions; @@ -81,7 +81,7 @@ private static void ProcessProduces(MapNode mapNode, OpenApiResponse response, P foreach (var produce in produces) { - if (response.Content.TryGetValue(produce, out var produceValue)) + if (response.Content.TryGetValue(produce, out var produceValue)) { if (schema != null) { diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiSchemaDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiSchemaDeserializer.cs index 0878eda9a..2a0c71a72 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiSchemaDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiSchemaDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Globalization; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiSecurityRequirementDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiSecurityRequirementDeserializer.cs index c8384fb05..5197b6e1e 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiSecurityRequirementDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiSecurityRequirementDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Readers.ParseNodes; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs index b2aab773c..20de9c880 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiTagDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiTagDeserializer.cs index 12fae8660..ecd6c96c3 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiTagDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiTagDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiV2Deserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiV2Deserializer.cs index c3f26b896..6b7aea308 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiV2Deserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiV2Deserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs index 54b0a3776..cc59aebcb 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiXmlDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiXmlDeserializer.cs index ac7db2db6..47a321dbe 100644 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiXmlDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V2/OpenApiXmlDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Exceptions; diff --git a/src/Microsoft.OpenApi.Readers/V2/TempStorageKeys.cs b/src/Microsoft.OpenApi.Readers/V2/TempStorageKeys.cs index 5a216e086..c7b96f6ce 100644 --- a/src/Microsoft.OpenApi.Readers/V2/TempStorageKeys.cs +++ b/src/Microsoft.OpenApi.Readers/V2/TempStorageKeys.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Readers.V2 { diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiCallbackDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiCallbackDeserializer.cs index af1376580..c400e8b5b 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiCallbackDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiCallbackDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Expressions; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiComponentsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiComponentsDeserializer.cs index 30d711d33..91ad2bcd8 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiComponentsDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiComponentsDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiContactDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiContactDeserializer.cs index 151a12354..2dfddfb3b 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiContactDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiContactDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiDiscriminatorDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiDiscriminatorDeserializer.cs index 867057d32..ec3267883 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiDiscriminatorDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiDiscriminatorDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Readers.ParseNodes; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiDocumentDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiDocumentDeserializer.cs index d5c437148..b010f1e41 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiDocumentDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiDocumentDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Any; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs index fc2f990e7..d6d7a8844 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiExampleDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiExampleDeserializer.cs index 1e114ad73..264a1f8cc 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiExampleDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiExampleDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiExternalDocsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiExternalDocsDeserializer.cs index 920b84192..1ea16f616 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiExternalDocsDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiExternalDocsDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiHeaderDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiHeaderDeserializer.cs index 1616d67f0..f7cd90aca 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiHeaderDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiHeaderDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiInfoDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiInfoDeserializer.cs index d5de92852..8ccbf6d69 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiInfoDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiInfoDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiLicenseDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiLicenseDeserializer.cs index 3c38d8b9a..6a27b1286 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiLicenseDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiLicenseDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiLinkDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiLinkDeserializer.cs index 7bf4c650b..9eae96b72 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiLinkDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiLinkDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs index c8bd3d240..68b6a4895 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowDeserializer.cs index 2653ce631..1679cdf75 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowsDeserializer.cs index bd19f2716..9269048aa 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowsDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowsDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiOperationDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiOperationDeserializer.cs index d6cd2e387..dee61cef6 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiOperationDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiOperationDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiParameterDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiParameterDeserializer.cs index e8fad07a5..c291132ca 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiParameterDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiParameterDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Linq; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiPathItemDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiPathItemDeserializer.cs index 698fe64cc..8e97e1377 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiPathItemDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiPathItemDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; @@ -15,12 +15,12 @@ internal static partial class OpenApiV3Deserializer { private static readonly FixedFieldMap _pathItemFixedFields = new FixedFieldMap { - + { "$ref", (o,n) => { o.Reference = new OpenApiReference { ExternalResource = n.GetScalarValue() }; o.UnresolvedReference =true; - } + } }, { "summary", (o, n) => diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiPathsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiPathsDeserializer.cs index fcfad096c..5b0b9485b 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiPathsDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiPathsDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiRequestBodyDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiRequestBodyDeserializer.cs index a2633028e..c5c2fab91 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiRequestBodyDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiRequestBodyDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiResponseDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiResponseDeserializer.cs index 70ea0c9bf..73f20791a 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiResponseDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiResponseDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiResponsesDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiResponsesDeserializer.cs index 9fe4d075f..597e8a4b6 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiResponsesDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiResponsesDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiSchemaDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiSchemaDeserializer.cs index e5482e22f..993195709 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiSchemaDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiSchemaDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Extensions; @@ -27,7 +27,7 @@ internal static partial class OpenApiV3Deserializer { "multipleOf", (o, n) => { - o.MultipleOf = decimal.Parse(n.GetScalarValue(), NumberStyles.Float, CultureInfo.InvariantCulture); + o.MultipleOf = decimal.Parse(n.GetScalarValue(), NumberStyles.Float, CultureInfo.InvariantCulture); } }, { diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiSecurityRequirementDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiSecurityRequirementDeserializer.cs index ed8322622..4a609125e 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiSecurityRequirementDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiSecurityRequirementDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Readers.ParseNodes; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiSecuritySchemeDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiSecuritySchemeDeserializer.cs index dd6ad4751..a5f50eb3f 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiSecuritySchemeDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiSecuritySchemeDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiServerDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiServerDeserializer.cs index e278abc90..81e92b979 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiServerDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiServerDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiServerVariableDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiServerVariableDeserializer.cs index 9b6acbc8d..fa4d07d72 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiServerVariableDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiServerVariableDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiTagDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiTagDeserializer.cs index 6a987969b..9de8bf610 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiTagDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiTagDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiV3Deserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiV3Deserializer.cs index 9689c8fe1..ac3463167 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiV3Deserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiV3Deserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs index 60ce71c8a..a6cb41970 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -121,7 +121,7 @@ public OpenApiReference ConvertToOpenApiReference( if (type == null) { type = referencedType; - } + } else { if (type != referencedType) diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiXmlDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiXmlDeserializer.cs index dc05da1c2..95cc2a585 100644 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiXmlDeserializer.cs +++ b/src/Microsoft.OpenApi.Readers/V3/OpenApiXmlDeserializer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi.Readers/YamlHelper.cs b/src/Microsoft.OpenApi.Readers/YamlHelper.cs index 90794b080..7b78e968e 100644 --- a/src/Microsoft.OpenApi.Readers/YamlHelper.cs +++ b/src/Microsoft.OpenApi.Readers/YamlHelper.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using System.Linq; diff --git a/src/Microsoft.OpenApi.Workbench/App.xaml.cs b/src/Microsoft.OpenApi.Workbench/App.xaml.cs index d3fc6dcb7..de1f426f5 100644 --- a/src/Microsoft.OpenApi.Workbench/App.xaml.cs +++ b/src/Microsoft.OpenApi.Workbench/App.xaml.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Windows; diff --git a/src/Microsoft.OpenApi.Workbench/MainModel.cs b/src/Microsoft.OpenApi.Workbench/MainModel.cs index 0d0d689ec..cd1461462 100644 --- a/src/Microsoft.OpenApi.Workbench/MainModel.cs +++ b/src/Microsoft.OpenApi.Workbench/MainModel.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.ComponentModel; @@ -40,7 +40,7 @@ public class MainModel : INotifyPropertyChanged private string _renderTime; - + /// /// Default format. /// @@ -215,7 +215,7 @@ internal async Task ParseDocument() if (_inputFile.StartsWith("http")) { stream = await _httpClient.GetStreamAsync(_inputFile); - } + } else { stream = new FileStream(_inputFile, FileMode.Open); diff --git a/src/Microsoft.OpenApi.Workbench/MainWindow.xaml.cs b/src/Microsoft.OpenApi.Workbench/MainWindow.xaml.cs index 08bbb177d..0d2f74582 100644 --- a/src/Microsoft.OpenApi.Workbench/MainWindow.xaml.cs +++ b/src/Microsoft.OpenApi.Workbench/MainWindow.xaml.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Windows; diff --git a/src/Microsoft.OpenApi.Workbench/Properties/AssemblyInfo.cs b/src/Microsoft.OpenApi.Workbench/Properties/AssemblyInfo.cs index b9a41106f..0add485f6 100644 --- a/src/Microsoft.OpenApi.Workbench/Properties/AssemblyInfo.cs +++ b/src/Microsoft.OpenApi.Workbench/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Reflection; using System.Runtime.InteropServices; diff --git a/src/Microsoft.OpenApi.Workbench/StatsVisitor.cs b/src/Microsoft.OpenApi.Workbench/StatsVisitor.cs index 85faef630..226b873d3 100644 --- a/src/Microsoft.OpenApi.Workbench/StatsVisitor.cs +++ b/src/Microsoft.OpenApi.Workbench/StatsVisitor.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Any/AnyType.cs b/src/Microsoft.OpenApi/Any/AnyType.cs index d0addd808..3ac617e8a 100644 --- a/src/Microsoft.OpenApi/Any/AnyType.cs +++ b/src/Microsoft.OpenApi/Any/AnyType.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { diff --git a/src/Microsoft.OpenApi/Any/IOpenApiAny.cs b/src/Microsoft.OpenApi/Any/IOpenApiAny.cs index 26c5f4d87..ece675508 100644 --- a/src/Microsoft.OpenApi/Any/IOpenApiAny.cs +++ b/src/Microsoft.OpenApi/Any/IOpenApiAny.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Interfaces; diff --git a/src/Microsoft.OpenApi/Any/IOpenApiPrimitive.cs b/src/Microsoft.OpenApi/Any/IOpenApiPrimitive.cs index 0e286d1a4..039782852 100644 --- a/src/Microsoft.OpenApi/Any/IOpenApiPrimitive.cs +++ b/src/Microsoft.OpenApi/Any/IOpenApiPrimitive.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { diff --git a/src/Microsoft.OpenApi/Any/OpenApiAnyCloneHelper.cs b/src/Microsoft.OpenApi/Any/OpenApiAnyCloneHelper.cs index e34fb8cbf..5cfded2b6 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiAnyCloneHelper.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiAnyCloneHelper.cs @@ -27,7 +27,7 @@ public static IOpenApiAny CloneFromCopyConstructor(IOpenApiAny obj) { return (IOpenApiAny)ci.Invoke(new object[] { obj }); } - } + } } return obj; diff --git a/src/Microsoft.OpenApi/Any/OpenApiArray.cs b/src/Microsoft.OpenApi/Any/OpenApiArray.cs index 2c877d631..1a4edf3bb 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiArray.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiArray.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Writers; using System; diff --git a/src/Microsoft.OpenApi/Any/OpenApiBinary.cs b/src/Microsoft.OpenApi/Any/OpenApiBinary.cs index da1bedad8..9933159a1 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiBinary.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiBinary.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { diff --git a/src/Microsoft.OpenApi/Any/OpenApiBoolean.cs b/src/Microsoft.OpenApi/Any/OpenApiBoolean.cs index f531e0135..10595f606 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiBoolean.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiBoolean.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { diff --git a/src/Microsoft.OpenApi/Any/OpenApiByte.cs b/src/Microsoft.OpenApi/Any/OpenApiByte.cs index 5e91b888e..48e9708d8 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiByte.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiByte.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { diff --git a/src/Microsoft.OpenApi/Any/OpenApiDate.cs b/src/Microsoft.OpenApi/Any/OpenApiDate.cs index c285799b6..485029133 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiDate.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiDate.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; diff --git a/src/Microsoft.OpenApi/Any/OpenApiDateTime.cs b/src/Microsoft.OpenApi/Any/OpenApiDateTime.cs index 81b647288..5fdaacf7c 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiDateTime.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiDateTime.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; diff --git a/src/Microsoft.OpenApi/Any/OpenApiDouble.cs b/src/Microsoft.OpenApi/Any/OpenApiDouble.cs index 35711a191..f1adb6799 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiDouble.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiDouble.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { diff --git a/src/Microsoft.OpenApi/Any/OpenApiFloat.cs b/src/Microsoft.OpenApi/Any/OpenApiFloat.cs index 3a64fb04c..e9b810331 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiFloat.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiFloat.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { diff --git a/src/Microsoft.OpenApi/Any/OpenApiInteger.cs b/src/Microsoft.OpenApi/Any/OpenApiInteger.cs index a0aa88fe8..7f7a32253 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiInteger.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiInteger.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { diff --git a/src/Microsoft.OpenApi/Any/OpenApiLong.cs b/src/Microsoft.OpenApi/Any/OpenApiLong.cs index 30b42fbf3..4168b91bd 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiLong.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiLong.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { diff --git a/src/Microsoft.OpenApi/Any/OpenApiNull.cs b/src/Microsoft.OpenApi/Any/OpenApiNull.cs index f1772c3e4..b606d98e1 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiNull.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiNull.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Writers; diff --git a/src/Microsoft.OpenApi/Any/OpenApiObject.cs b/src/Microsoft.OpenApi/Any/OpenApiObject.cs index d7e56e341..c33cbb1c0 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiObject.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiObject.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Writers; diff --git a/src/Microsoft.OpenApi/Any/OpenApiPassword.cs b/src/Microsoft.OpenApi/Any/OpenApiPassword.cs index aaa56e72b..dab7e7979 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiPassword.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiPassword.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { diff --git a/src/Microsoft.OpenApi/Any/OpenApiPrimitive.cs b/src/Microsoft.OpenApi/Any/OpenApiPrimitive.cs index b8dcf097d..11c92ce96 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiPrimitive.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiPrimitive.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Text; diff --git a/src/Microsoft.OpenApi/Any/OpenApiString.cs b/src/Microsoft.OpenApi/Any/OpenApiString.cs index a899bd301..c71cbb840 100644 --- a/src/Microsoft.OpenApi/Any/OpenApiString.cs +++ b/src/Microsoft.OpenApi/Any/OpenApiString.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Any { @@ -19,7 +19,7 @@ public OpenApiString(string value) : this(value, false) { } - + /// /// Initializes the class. /// diff --git a/src/Microsoft.OpenApi/Attributes/DisplayAttribute.cs b/src/Microsoft.OpenApi/Attributes/DisplayAttribute.cs index db60448ea..a77b914cf 100644 --- a/src/Microsoft.OpenApi/Attributes/DisplayAttribute.cs +++ b/src/Microsoft.OpenApi/Attributes/DisplayAttribute.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; diff --git a/src/Microsoft.OpenApi/Error.cs b/src/Microsoft.OpenApi/Error.cs index d0c41780d..9ad76ce54 100644 --- a/src/Microsoft.OpenApi/Error.cs +++ b/src/Microsoft.OpenApi/Error.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Globalization; diff --git a/src/Microsoft.OpenApi/Exceptions/OpenApiException.cs b/src/Microsoft.OpenApi/Exceptions/OpenApiException.cs index cc6fc9d46..71404d1e0 100644 --- a/src/Microsoft.OpenApi/Exceptions/OpenApiException.cs +++ b/src/Microsoft.OpenApi/Exceptions/OpenApiException.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Properties; @@ -40,10 +40,10 @@ public OpenApiException(string message, Exception innerException) /// /// The reference pointer. This is a fragment identifier used to point to where the error occurred in the document. - /// If the document has been parsed as JSON/YAML then the identifier will be a + /// If the document has been parsed as JSON/YAML then the identifier will be a /// JSON Pointer as per https://tools.ietf.org/html/rfc6901 /// If the document fails to parse as JSON/YAML then the fragment will be based on - /// a text/plain pointer as defined in https://tools.ietf.org/html/rfc5147 + /// a text/plain pointer as defined in https://tools.ietf.org/html/rfc5147 /// Currently only line= is provided because using char= causes tests to break due to CR/LF and LF differences /// public string Pointer { get; set; } diff --git a/src/Microsoft.OpenApi/Exceptions/OpenApiWriterException.cs b/src/Microsoft.OpenApi/Exceptions/OpenApiWriterException.cs index 494608b1f..9e0540c53 100644 --- a/src/Microsoft.OpenApi/Exceptions/OpenApiWriterException.cs +++ b/src/Microsoft.OpenApi/Exceptions/OpenApiWriterException.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Properties; diff --git a/src/Microsoft.OpenApi/Expressions/BodyExpression.cs b/src/Microsoft.OpenApi/Expressions/BodyExpression.cs index cd5c86bd9..92344dbf7 100644 --- a/src/Microsoft.OpenApi/Expressions/BodyExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/BodyExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Expressions { diff --git a/src/Microsoft.OpenApi/Expressions/CompositeExpression.cs b/src/Microsoft.OpenApi/Expressions/CompositeExpression.cs index 7d5e32c7d..98c5e069c 100644 --- a/src/Microsoft.OpenApi/Expressions/CompositeExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/CompositeExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.OpenApi/Expressions/HeaderExpression.cs b/src/Microsoft.OpenApi/Expressions/HeaderExpression.cs index f6642cb08..4bb53f94c 100644 --- a/src/Microsoft.OpenApi/Expressions/HeaderExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/HeaderExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Expressions { diff --git a/src/Microsoft.OpenApi/Expressions/MethodExpression.cs b/src/Microsoft.OpenApi/Expressions/MethodExpression.cs index 865d9c7ff..13173f7e2 100644 --- a/src/Microsoft.OpenApi/Expressions/MethodExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/MethodExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Expressions { diff --git a/src/Microsoft.OpenApi/Expressions/PathExpression.cs b/src/Microsoft.OpenApi/Expressions/PathExpression.cs index a92c8a569..85ec5baac 100644 --- a/src/Microsoft.OpenApi/Expressions/PathExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/PathExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Expressions { diff --git a/src/Microsoft.OpenApi/Expressions/QueryExpression.cs b/src/Microsoft.OpenApi/Expressions/QueryExpression.cs index 3277233b3..53e86d4ba 100644 --- a/src/Microsoft.OpenApi/Expressions/QueryExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/QueryExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Expressions { diff --git a/src/Microsoft.OpenApi/Expressions/RequestExpression.cs b/src/Microsoft.OpenApi/Expressions/RequestExpression.cs index 7ebf77471..4aa923b8c 100644 --- a/src/Microsoft.OpenApi/Expressions/RequestExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/RequestExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Expressions { diff --git a/src/Microsoft.OpenApi/Expressions/ResponseExpression.cs b/src/Microsoft.OpenApi/Expressions/ResponseExpression.cs index b91370297..212282f2d 100644 --- a/src/Microsoft.OpenApi/Expressions/ResponseExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/ResponseExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Expressions { diff --git a/src/Microsoft.OpenApi/Expressions/RuntimeExpression.cs b/src/Microsoft.OpenApi/Expressions/RuntimeExpression.cs index 965572dfd..d4a116943 100644 --- a/src/Microsoft.OpenApi/Expressions/RuntimeExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/RuntimeExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Exceptions; diff --git a/src/Microsoft.OpenApi/Expressions/SourceExpression.cs b/src/Microsoft.OpenApi/Expressions/SourceExpression.cs index 3bc642473..2e55ece90 100644 --- a/src/Microsoft.OpenApi/Expressions/SourceExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/SourceExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Exceptions; using Microsoft.OpenApi.Properties; diff --git a/src/Microsoft.OpenApi/Expressions/StatusCodeExpression.cs b/src/Microsoft.OpenApi/Expressions/StatusCodeExpression.cs index 88a384781..d077c82ad 100644 --- a/src/Microsoft.OpenApi/Expressions/StatusCodeExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/StatusCodeExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Expressions { diff --git a/src/Microsoft.OpenApi/Expressions/UrlExpression.cs b/src/Microsoft.OpenApi/Expressions/UrlExpression.cs index 4dc10bb77..e8da5710f 100644 --- a/src/Microsoft.OpenApi/Expressions/UrlExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/UrlExpression.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Expressions { diff --git a/src/Microsoft.OpenApi/Extensions/EnumExtensions.cs b/src/Microsoft.OpenApi/Extensions/EnumExtensions.cs index d7c778c19..4e2e795d3 100644 --- a/src/Microsoft.OpenApi/Extensions/EnumExtensions.cs +++ b/src/Microsoft.OpenApi/Extensions/EnumExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Linq; diff --git a/src/Microsoft.OpenApi/Extensions/OpenAPIWriterExtensions.cs b/src/Microsoft.OpenApi/Extensions/OpenAPIWriterExtensions.cs index a32807ab6..672730339 100644 --- a/src/Microsoft.OpenApi/Extensions/OpenAPIWriterExtensions.cs +++ b/src/Microsoft.OpenApi/Extensions/OpenAPIWriterExtensions.cs @@ -14,7 +14,7 @@ internal static class OpenAPIWriterExtensions /// /// /// - internal static OpenApiWriterSettings GetSettings(this IOpenApiWriter openApiWriter) + internal static OpenApiWriterSettings GetSettings(this IOpenApiWriter openApiWriter) { if (openApiWriter is OpenApiWriterBase) { diff --git a/src/Microsoft.OpenApi/Extensions/OpenApiElementExtensions.cs b/src/Microsoft.OpenApi/Extensions/OpenApiElementExtensions.cs index a047c066d..38a53ecec 100644 --- a/src/Microsoft.OpenApi/Extensions/OpenApiElementExtensions.cs +++ b/src/Microsoft.OpenApi/Extensions/OpenApiElementExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.OpenApi/Extensions/OpenApiExtensibleExtensions.cs b/src/Microsoft.OpenApi/Extensions/OpenApiExtensibleExtensions.cs index 7656aad89..9cb3f21ed 100644 --- a/src/Microsoft.OpenApi/Extensions/OpenApiExtensibleExtensions.cs +++ b/src/Microsoft.OpenApi/Extensions/OpenApiExtensibleExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Exceptions; using Microsoft.OpenApi.Interfaces; diff --git a/src/Microsoft.OpenApi/Extensions/OpenApiReferencableExtensions.cs b/src/Microsoft.OpenApi/Extensions/OpenApiReferencableExtensions.cs index 11fcd7e9e..defe95636 100644 --- a/src/Microsoft.OpenApi/Extensions/OpenApiReferencableExtensions.cs +++ b/src/Microsoft.OpenApi/Extensions/OpenApiReferencableExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; diff --git a/src/Microsoft.OpenApi/Extensions/OpenApiSerializableExtensions.cs b/src/Microsoft.OpenApi/Extensions/OpenApiSerializableExtensions.cs index f60c5483b..c39e378f6 100755 --- a/src/Microsoft.OpenApi/Extensions/OpenApiSerializableExtensions.cs +++ b/src/Microsoft.OpenApi/Extensions/OpenApiSerializableExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Globalization; using System.IO; @@ -74,7 +74,7 @@ public static void Serialize( this T element, Stream stream, OpenApiSpecVersion specVersion, - OpenApiFormat format, + OpenApiFormat format, OpenApiWriterSettings settings) where T : IOpenApiSerializable { diff --git a/src/Microsoft.OpenApi/Extensions/OpenApiTypeMapper.cs b/src/Microsoft.OpenApi/Extensions/OpenApiTypeMapper.cs index 970b3a976..176762dc6 100644 --- a/src/Microsoft.OpenApi/Extensions/OpenApiTypeMapper.cs +++ b/src/Microsoft.OpenApi/Extensions/OpenApiTypeMapper.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -27,7 +27,7 @@ public static class OpenApiTypeMapper [typeof(DateTimeOffset)] = () => new OpenApiSchema { Type = "string", Format = "date-time" }, [typeof(Guid)] = () => new OpenApiSchema { Type = "string", Format = "uuid" }, [typeof(char)] = () => new OpenApiSchema { Type = "string" }, - + // Nullable types [typeof(bool?)] = () => new OpenApiSchema { Type = "boolean", Nullable = true }, [typeof(byte?)] = () => new OpenApiSchema { Type = "string", Format = "byte", Nullable = true }, @@ -123,7 +123,7 @@ public static Type MapOpenApiPrimitiveTypeToSimpleType(this OpenApiSchema schema ("boolean", null, true) => typeof(bool?), _ => typeof(string), }; - + return type; } } diff --git a/src/Microsoft.OpenApi/Interfaces/IEffective.cs b/src/Microsoft.OpenApi/Interfaces/IEffective.cs index b62ec12ab..b3ac0a37b 100644 --- a/src/Microsoft.OpenApi/Interfaces/IEffective.cs +++ b/src/Microsoft.OpenApi/Interfaces/IEffective.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Models; @@ -9,8 +9,8 @@ namespace Microsoft.OpenApi.Interfaces /// OpenApiElements that implement IEffective indicate that their description is not self-contained. /// External elements affect the effective description. /// - /// Currently this will only be used for accessing external references. - /// In the next major version, this will be the approach accessing all referenced elements. + /// Currently this will only be used for accessing external references. + /// In the next major version, this will be the approach accessing all referenced elements. /// This will enable us to support merging properties that are peers of the $ref /// Type of OpenApi Element that is being referenced. public interface IEffective where T : class,IOpenApiElement diff --git a/src/Microsoft.OpenApi/Interfaces/IOpenApiElement.cs b/src/Microsoft.OpenApi/Interfaces/IOpenApiElement.cs index 45f7bad11..d66939532 100644 --- a/src/Microsoft.OpenApi/Interfaces/IOpenApiElement.cs +++ b/src/Microsoft.OpenApi/Interfaces/IOpenApiElement.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Interfaces { diff --git a/src/Microsoft.OpenApi/Interfaces/IOpenApiExtensible.cs b/src/Microsoft.OpenApi/Interfaces/IOpenApiExtensible.cs index 7abd1bfdd..8fc4e8051 100644 --- a/src/Microsoft.OpenApi/Interfaces/IOpenApiExtensible.cs +++ b/src/Microsoft.OpenApi/Interfaces/IOpenApiExtensible.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Any; diff --git a/src/Microsoft.OpenApi/Interfaces/IOpenApiExtension.cs b/src/Microsoft.OpenApi/Interfaces/IOpenApiExtension.cs index a9ea04a39..ad6f2c0e5 100644 --- a/src/Microsoft.OpenApi/Interfaces/IOpenApiExtension.cs +++ b/src/Microsoft.OpenApi/Interfaces/IOpenApiExtension.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Writers; diff --git a/src/Microsoft.OpenApi/Interfaces/IOpenApiReferenceable.cs b/src/Microsoft.OpenApi/Interfaces/IOpenApiReferenceable.cs index c790e1fda..e5d0b73b4 100644 --- a/src/Microsoft.OpenApi/Interfaces/IOpenApiReferenceable.cs +++ b/src/Microsoft.OpenApi/Interfaces/IOpenApiReferenceable.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Writers; diff --git a/src/Microsoft.OpenApi/Interfaces/IOpenApiSerializable.cs b/src/Microsoft.OpenApi/Interfaces/IOpenApiSerializable.cs index 582bd49cd..6f5b1bd09 100644 --- a/src/Microsoft.OpenApi/Interfaces/IOpenApiSerializable.cs +++ b/src/Microsoft.OpenApi/Interfaces/IOpenApiSerializable.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Writers; diff --git a/src/Microsoft.OpenApi/JsonPointer.cs b/src/Microsoft.OpenApi/JsonPointer.cs index c2aec5097..1ff843031 100644 --- a/src/Microsoft.OpenApi/JsonPointer.cs +++ b/src/Microsoft.OpenApi/JsonPointer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Linq; diff --git a/src/Microsoft.OpenApi/Models/OpenApiCallback.cs b/src/Microsoft.OpenApi/Models/OpenApiCallback.cs index e6aa5d075..62c8f560f 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiCallback.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiCallback.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Expressions; @@ -103,7 +103,7 @@ public void SerializeAsV3(IOpenApiWriter writer) } /// - /// Returns an effective OpenApiCallback object based on the presence of a $ref + /// Returns an effective OpenApiCallback object based on the presence of a $ref /// /// The host OpenApiDocument that contains the reference. /// OpenApiCallback diff --git a/src/Microsoft.OpenApi/Models/OpenApiComponents.cs b/src/Microsoft.OpenApi/Models/OpenApiComponents.cs index a6bfef594..5a653aa2a 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiComponents.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiComponents.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; @@ -117,7 +117,7 @@ public void SerializeAsV3(IOpenApiWriter writer) }); } writer.WriteEndObject(); - return; + return; } writer.WriteStartObject(); diff --git a/src/Microsoft.OpenApi/Models/OpenApiConstants.cs b/src/Microsoft.OpenApi/Models/OpenApiConstants.cs index 553844764..eccf3a616 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiConstants.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiConstants.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; diff --git a/src/Microsoft.OpenApi/Models/OpenApiContact.cs b/src/Microsoft.OpenApi/Models/OpenApiContact.cs index 93cb11bca..2550f866b 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiContact.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiContact.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Models/OpenApiDiscriminator.cs b/src/Microsoft.OpenApi/Models/OpenApiDiscriminator.cs index 9ae7f0e6a..c1b4d913c 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiDiscriminator.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiDiscriminator.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Interfaces; diff --git a/src/Microsoft.OpenApi/Models/OpenApiDocument.cs b/src/Microsoft.OpenApi/Models/OpenApiDocument.cs index d2d9cf893..c19de5e84 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiDocument.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiDocument.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -187,7 +187,7 @@ public void SerializeAsV2(IOpenApiWriter writer) } else { - // Serialize each referenceable object as full object without reference if the reference in the object points to itself. + // Serialize each referenceable object as full object without reference if the reference in the object points to itself. // If the reference exists but points to other objects, the object is serialized to just that reference. // definitions writer.WriteOptionalMap( @@ -208,8 +208,8 @@ public void SerializeAsV2(IOpenApiWriter writer) }); } // parameters - var parameters = Components?.Parameters != null - ? new Dictionary(Components.Parameters) + var parameters = Components?.Parameters != null + ? new Dictionary(Components.Parameters) : new Dictionary(); if (Components?.RequestBodies != null) @@ -309,7 +309,7 @@ private static void WriteHostInfoV2(IOpenApiWriter writer, IList return; } - // Arbitrarily choose the first server given that V2 only allows + // Arbitrarily choose the first server given that V2 only allows // one host, port, and base path. var serverUrl = ParseServerUrl(servers.First()); @@ -323,7 +323,7 @@ private static void WriteHostInfoV2(IOpenApiWriter writer, IList writer.WriteProperty( OpenApiConstants.Host, firstServerUrl.GetComponents(UriComponents.Host | UriComponents.Port, UriFormat.SafeUnescaped)); - + // basePath if (firstServerUrl.AbsolutePath != "/") { @@ -407,7 +407,7 @@ public IOpenApiReferenceable ResolveReference(OpenApiReference reference) } /// - /// Takes in an OpenApi document instance and generates its hash value + /// Takes in an OpenApi document instance and generates its hash value /// /// The OpenAPI description to hash. /// The hash value. diff --git a/src/Microsoft.OpenApi/Models/OpenApiEncoding.cs b/src/Microsoft.OpenApi/Models/OpenApiEncoding.cs index 13b6e3a0a..d5b0a2057 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiEncoding.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiEncoding.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Extensions; diff --git a/src/Microsoft.OpenApi/Models/OpenApiError.cs b/src/Microsoft.OpenApi/Models/OpenApiError.cs index 82f2a14df..54b98a067 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiError.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiError.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Exceptions; diff --git a/src/Microsoft.OpenApi/Models/OpenApiExample.cs b/src/Microsoft.OpenApi/Models/OpenApiExample.cs index 4d091a361..018a46729 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiExample.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiExample.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Any; @@ -101,7 +101,7 @@ public void SerializeAsV3(IOpenApiWriter writer) } /// - /// Returns an effective OpenApiExample object based on the presence of a $ref + /// Returns an effective OpenApiExample object based on the presence of a $ref /// /// The host OpenApiDocument that contains the reference. /// OpenApiExample diff --git a/src/Microsoft.OpenApi/Models/OpenApiExtensibleDictionary.cs b/src/Microsoft.OpenApi/Models/OpenApiExtensibleDictionary.cs index 40c26d429..02945e0f9 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiExtensibleDictionary.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiExtensibleDictionary.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Interfaces; @@ -31,7 +31,7 @@ protected OpenApiExtensibleDictionary( IDictionary extensions = null) : base (dictionary) { Extensions = extensions != null ? new Dictionary(extensions) : null; - } + } /// /// This object MAY be extended with Specification Extensions. diff --git a/src/Microsoft.OpenApi/Models/OpenApiExternalDocs.cs b/src/Microsoft.OpenApi/Models/OpenApiExternalDocs.cs index 345f07d59..3bcdbc07b 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiExternalDocs.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiExternalDocs.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Models/OpenApiHeader.cs b/src/Microsoft.OpenApi/Models/OpenApiHeader.cs index fb4411478..ad6b3d91f 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiHeader.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiHeader.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Any; @@ -141,7 +141,7 @@ public void SerializeAsV3(IOpenApiWriter writer) } /// - /// Returns an effective OpenApiHeader object based on the presence of a $ref + /// Returns an effective OpenApiHeader object based on the presence of a $ref /// /// The host OpenApiDocument that contains the reference. /// OpenApiHeader diff --git a/src/Microsoft.OpenApi/Models/OpenApiInfo.cs b/src/Microsoft.OpenApi/Models/OpenApiInfo.cs index df0aa0a49..ecba7a6d7 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiInfo.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiInfo.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Models/OpenApiLicense.cs b/src/Microsoft.OpenApi/Models/OpenApiLicense.cs index 866515835..a02b50756 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiLicense.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiLicense.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Models/OpenApiLink.cs b/src/Microsoft.OpenApi/Models/OpenApiLink.cs index b682744e9..54713c242 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiLink.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiLink.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Any; @@ -111,7 +111,7 @@ public void SerializeAsV3(IOpenApiWriter writer) } /// - /// Returns an effective OpenApiLink object based on the presence of a $ref + /// Returns an effective OpenApiLink object based on the presence of a $ref /// /// The host OpenApiDocument that contains the reference. /// OpenApiLink diff --git a/src/Microsoft.OpenApi/Models/OpenApiMediaType.cs b/src/Microsoft.OpenApi/Models/OpenApiMediaType.cs index 63a58cd02..cebfa995c 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiMediaType.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiMediaType.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Any; diff --git a/src/Microsoft.OpenApi/Models/OpenApiOAuthFlow.cs b/src/Microsoft.OpenApi/Models/OpenApiOAuthFlow.cs index 9c12fb5a9..fc92f7bac 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiOAuthFlow.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiOAuthFlow.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Models/OpenApiOAuthFlows.cs b/src/Microsoft.OpenApi/Models/OpenApiOAuthFlows.cs index 8443e6730..c7b73f22d 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiOAuthFlows.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiOAuthFlows.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Any; diff --git a/src/Microsoft.OpenApi/Models/OpenApiOperation.cs b/src/Microsoft.OpenApi/Models/OpenApiOperation.cs index 9336662d8..808e50aa0 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiOperation.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiOperation.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -314,7 +314,7 @@ public void SerializeAsV2(IOpenApiWriter writer) // schemes // All schemes in the Servers are extracted, regardless of whether the host matches - // the host defined in the outermost Swagger object. This is due to the + // the host defined in the outermost Swagger object. This is due to the // inaccessibility of information for that host in the context of an inner object like this Operation. if (Servers != null) { diff --git a/src/Microsoft.OpenApi/Models/OpenApiParameter.cs b/src/Microsoft.OpenApi/Models/OpenApiParameter.cs index 06e5749e6..ace76ae4b 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiParameter.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiParameter.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -78,7 +78,7 @@ public class OpenApiParameter : IOpenApiSerializable, IOpenApiReferenceable, IEf /// for cookie - form. /// public ParameterStyle? Style - { + { get => _style ?? SetDefaultStyleValue(); set => _style = value; } @@ -190,7 +190,7 @@ public void SerializeAsV3(IOpenApiWriter writer) { Reference.SerializeAsV3(writer); return; - } + } else { target = this.GetEffective(Reference.HostDocument); @@ -201,7 +201,7 @@ public void SerializeAsV3(IOpenApiWriter writer) } /// - /// Returns an effective OpenApiParameter object based on the presence of a $ref + /// Returns an effective OpenApiParameter object based on the presence of a $ref /// /// The host OpenApiDocument that contains the reference. /// OpenApiParameter @@ -289,7 +289,7 @@ public void SerializeAsV2(IOpenApiWriter writer) { Reference.SerializeAsV2(writer); return; - } + } else { target = this.GetEffective(Reference.HostDocument); diff --git a/src/Microsoft.OpenApi/Models/OpenApiPathItem.cs b/src/Microsoft.OpenApi/Models/OpenApiPathItem.cs index ddd358dc2..2f4568e7d 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiPathItem.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiPathItem.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Extensions; @@ -102,7 +102,7 @@ public void SerializeAsV3(IOpenApiWriter writer) { Reference.SerializeAsV3(writer); return; - } + } else { target = GetEffective(Reference.HostDocument); @@ -112,7 +112,7 @@ public void SerializeAsV3(IOpenApiWriter writer) } /// - /// Returns an effective OpenApiPathItem object based on the presence of a $ref + /// Returns an effective OpenApiPathItem object based on the presence of a $ref /// /// The host OpenApiDocument that contains the reference. /// OpenApiPathItem @@ -146,7 +146,7 @@ public void SerializeAsV2(IOpenApiWriter writer) { Reference.SerializeAsV2(writer); return; - } + } else { target = this.GetEffective(Reference.HostDocument); diff --git a/src/Microsoft.OpenApi/Models/OpenApiPaths.cs b/src/Microsoft.OpenApi/Models/OpenApiPaths.cs index 8aae74883..014b37a1a 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiPaths.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiPaths.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Models { @@ -17,6 +17,6 @@ public OpenApiPaths() {} /// Initializes a copy of object /// /// The . - public OpenApiPaths(OpenApiPaths paths) : base(dictionary: paths) { } + public OpenApiPaths(OpenApiPaths paths) : base(dictionary: paths) { } } } diff --git a/src/Microsoft.OpenApi/Models/OpenApiReference.cs b/src/Microsoft.OpenApi/Models/OpenApiReference.cs index e8798cc64..17055a93e 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiReference.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiReference.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Interfaces; @@ -205,7 +205,7 @@ private string GetExternalReferenceV3() { return ExternalResource + "#" + Id; } - + return ExternalResource + "#/components/" + Type.GetDisplayName() + "/"+ Id; } diff --git a/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs b/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs index 70f1f742a..27b48909a 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -93,7 +93,7 @@ public void SerializeAsV3(IOpenApiWriter writer) } /// - /// Returns an effective OpenApiRequestBody object based on the presence of a $ref + /// Returns an effective OpenApiRequestBody object based on the presence of a $ref /// /// The host OpenApiDocument that contains the reference. /// OpenApiRequestBody @@ -187,7 +187,7 @@ internal IEnumerable ConvertToFormDataParameters() Description = property.Value.Description, Name = property.Key, Schema = property.Value, - Required = Content.First().Value.Schema.Required.Contains(property.Key) + Required = Content.First().Value.Schema.Required.Contains(property.Key) }; } } diff --git a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs index a173f6c1a..e15e81aaf 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; @@ -98,7 +98,7 @@ public void SerializeAsV3(IOpenApiWriter writer) } /// - /// Returns an effective OpenApiRequestBody object based on the presence of a $ref + /// Returns an effective OpenApiRequestBody object based on the presence of a $ref /// /// The host OpenApiDocument that contains the reference. /// OpenApiResponse diff --git a/src/Microsoft.OpenApi/Models/OpenApiResponses.cs b/src/Microsoft.OpenApi/Models/OpenApiResponses.cs index aa7a8c984..483524044 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiResponses.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiResponses.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Models { diff --git a/src/Microsoft.OpenApi/Models/OpenApiSchema.cs b/src/Microsoft.OpenApi/Models/OpenApiSchema.cs index b0ac2dbac..303f3ee31 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiSchema.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiSchema.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; @@ -487,7 +487,7 @@ public void SerializeAsV2WithoutReference(IOpenApiWriter writer) } /// - /// Serialize to Open Api v2.0 and handles not marking the provided property + /// Serialize to Open Api v2.0 and handles not marking the provided property /// as readonly if its included in the provided list of required properties of parent schema. /// /// The open api writer. @@ -545,7 +545,7 @@ internal void SerializeAsV2( } /// - /// Serialize to OpenAPI V2 document without using reference and handles not marking the provided property + /// Serialize to OpenAPI V2 document without using reference and handles not marking the provided property /// as readonly if its included in the provided list of required properties of parent schema. /// /// The open api writer. @@ -771,7 +771,7 @@ internal void WriteAsSchemaProperties( } /// - /// Returns an effective OpenApiSchema object based on the presence of a $ref + /// Returns an effective OpenApiSchema object based on the presence of a $ref /// /// The host OpenApiDocument that contains the reference. /// OpenApiSchema diff --git a/src/Microsoft.OpenApi/Models/OpenApiSecurityRequirement.cs b/src/Microsoft.OpenApi/Models/OpenApiSecurityRequirement.cs index d2564daf2..2ccb58a52 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiSecurityRequirement.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiSecurityRequirement.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Interfaces; diff --git a/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs b/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs index 616a6a022..20676ded6 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Models/OpenApiServer.cs b/src/Microsoft.OpenApi/Models/OpenApiServer.cs index a13a6fb2d..dcb2382a1 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiServer.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiServer.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Interfaces; diff --git a/src/Microsoft.OpenApi/Models/OpenApiServerVariable.cs b/src/Microsoft.OpenApi/Models/OpenApiServerVariable.cs index 70164bc59..92265a386 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiServerVariable.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiServerVariable.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Any; diff --git a/src/Microsoft.OpenApi/Models/OpenApiTag.cs b/src/Microsoft.OpenApi/Models/OpenApiTag.cs index ba4129142..2794fda8e 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiTag.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiTag.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Any; diff --git a/src/Microsoft.OpenApi/Models/OpenApiXml.cs b/src/Microsoft.OpenApi/Models/OpenApiXml.cs index c6719d85e..0a594c773 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiXml.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiXml.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Models/OperationType.cs b/src/Microsoft.OpenApi/Models/OperationType.cs index a85933d9b..ed3457353 100644 --- a/src/Microsoft.OpenApi/Models/OperationType.cs +++ b/src/Microsoft.OpenApi/Models/OperationType.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Attributes; diff --git a/src/Microsoft.OpenApi/Models/ParameterLocation.cs b/src/Microsoft.OpenApi/Models/ParameterLocation.cs index a729f314e..d223cad87 100644 --- a/src/Microsoft.OpenApi/Models/ParameterLocation.cs +++ b/src/Microsoft.OpenApi/Models/ParameterLocation.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Attributes; diff --git a/src/Microsoft.OpenApi/Models/ParameterStyle.cs b/src/Microsoft.OpenApi/Models/ParameterStyle.cs index a1df27962..2534b2859 100644 --- a/src/Microsoft.OpenApi/Models/ParameterStyle.cs +++ b/src/Microsoft.OpenApi/Models/ParameterStyle.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Attributes; diff --git a/src/Microsoft.OpenApi/Models/ReferenceType.cs b/src/Microsoft.OpenApi/Models/ReferenceType.cs index 9d8984c96..acbb22a9a 100644 --- a/src/Microsoft.OpenApi/Models/ReferenceType.cs +++ b/src/Microsoft.OpenApi/Models/ReferenceType.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Attributes; diff --git a/src/Microsoft.OpenApi/Models/RuntimeExpressionAnyWrapper.cs b/src/Microsoft.OpenApi/Models/RuntimeExpressionAnyWrapper.cs index 1a1f12a18..43af59f5b 100644 --- a/src/Microsoft.OpenApi/Models/RuntimeExpressionAnyWrapper.cs +++ b/src/Microsoft.OpenApi/Models/RuntimeExpressionAnyWrapper.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Expressions; diff --git a/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs b/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs index d75524bd6..f5136ab19 100644 --- a/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs +++ b/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Attributes; diff --git a/src/Microsoft.OpenApi/OpenApiFormat.cs b/src/Microsoft.OpenApi/OpenApiFormat.cs index 8f4c55b68..8005d7d62 100644 --- a/src/Microsoft.OpenApi/OpenApiFormat.cs +++ b/src/Microsoft.OpenApi/OpenApiFormat.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi { diff --git a/src/Microsoft.OpenApi/OpenApiSpecVersion.cs b/src/Microsoft.OpenApi/OpenApiSpecVersion.cs index 20e49af80..48666ab79 100644 --- a/src/Microsoft.OpenApi/OpenApiSpecVersion.cs +++ b/src/Microsoft.OpenApi/OpenApiSpecVersion.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi { @@ -15,7 +15,7 @@ public enum OpenApiSpecVersion /// /// Represents all patches of OpenAPI V3.0 spec (e.g. 3.0.0, 3.0.1) - /// + /// OpenApi3_0 } } diff --git a/src/Microsoft.OpenApi/Properties/AssemblyInfo.cs b/src/Microsoft.OpenApi/Properties/AssemblyInfo.cs index 159c979dd..559c86738 100644 --- a/src/Microsoft.OpenApi/Properties/AssemblyInfo.cs +++ b/src/Microsoft.OpenApi/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Runtime.CompilerServices; diff --git a/src/Microsoft.OpenApi/Services/OpenApiReferenceError.cs b/src/Microsoft.OpenApi/Services/OpenApiReferenceError.cs index 7e2ebdcac..7984b6c58 100644 --- a/src/Microsoft.OpenApi/Services/OpenApiReferenceError.cs +++ b/src/Microsoft.OpenApi/Services/OpenApiReferenceError.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Services/OpenApiReferenceResolver.cs b/src/Microsoft.OpenApi/Services/OpenApiReferenceResolver.cs index dc0fb1c8d..88621a382 100644 --- a/src/Microsoft.OpenApi/Services/OpenApiReferenceResolver.cs +++ b/src/Microsoft.OpenApi/Services/OpenApiReferenceResolver.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs b/src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs index 9f4ccb8be..d43e728fd 100644 --- a/src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs +++ b/src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs @@ -268,7 +268,7 @@ public void WriteMermaid(TextWriter writer) { "DELETE", new MermaidNodeStyle("Tomato", MermaidNodeShape.Rhombus) }, { "OTHER", new MermaidNodeStyle("White", MermaidNodeShape.SquareCornerRectangle) }, }; - + private static void ProcessNode(OpenApiUrlTreeNode node, TextWriter writer) { var path = string.IsNullOrEmpty(node.Path) ? "/" : SanitizeMermaidNode(node.Path); @@ -329,7 +329,7 @@ private static string SanitizeMermaidNode(string token) .Replace(".", "_") .Replace("(", "_") .Replace(")", "_") - .Replace(";", "_") + .Replace(";", "_") .Replace("-", "_") .Replace("graph", "gra_ph") // graph is a reserved word .Replace("default", "def_ault"); // default is a reserved word for classes diff --git a/src/Microsoft.OpenApi/Services/OpenApiVisitorBase.cs b/src/Microsoft.OpenApi/Services/OpenApiVisitorBase.cs index c9679381a..1628ccd00 100644 --- a/src/Microsoft.OpenApi/Services/OpenApiVisitorBase.cs +++ b/src/Microsoft.OpenApi/Services/OpenApiVisitorBase.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -22,7 +22,7 @@ public abstract class OpenApiVisitorBase public CurrentKeys CurrentKeys { get; } = new CurrentKeys(); /// - /// Allow Rule to indicate validation error occured at a deeper context level. + /// Allow Rule to indicate validation error occured at a deeper context level. /// /// Identifier for context public virtual void Enter(string segment) diff --git a/src/Microsoft.OpenApi/Services/OpenApiWalker.cs b/src/Microsoft.OpenApi/Services/OpenApiWalker.cs index 1da6cc9cf..87db2b844 100644 --- a/src/Microsoft.OpenApi/Services/OpenApiWalker.cs +++ b/src/Microsoft.OpenApi/Services/OpenApiWalker.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -297,7 +297,7 @@ internal void Walk(IOpenApiExtensible openApiExtensible) } /// - /// Visits + /// Visits /// internal void Walk(IOpenApiExtension extension) { diff --git a/src/Microsoft.OpenApi/Services/OpenApiWorkspace.cs b/src/Microsoft.OpenApi/Services/OpenApiWorkspace.cs index 7827a50c1..f8920efd4 100644 --- a/src/Microsoft.OpenApi/Services/OpenApiWorkspace.cs +++ b/src/Microsoft.OpenApi/Services/OpenApiWorkspace.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -29,7 +29,7 @@ public IEnumerable Documents { get { return _documents.Values; } - } + } /// /// A list of document fragments that are contained in the workspace @@ -69,7 +69,7 @@ public OpenApiWorkspace() public OpenApiWorkspace(OpenApiWorkspace workspace){} /// - /// Verify if workspace contains a document based on its URL. + /// Verify if workspace contains a document based on its URL. /// /// A relative or absolute URL of the file. Use file:// for folder locations. /// Returns true if a matching document is found. @@ -95,7 +95,7 @@ public void AddDocument(string location, OpenApiDocument document) /// /// /// - /// Not sure how this is going to work. Does the reference just point to the fragment as a whole, or do we need to + /// Not sure how this is going to work. Does the reference just point to the fragment as a whole, or do we need to /// to be able to point into the fragment. Keeping it private until we figure it out. /// public void AddFragment(string location, IOpenApiReferenceable fragment) diff --git a/src/Microsoft.OpenApi/Validations/IValidationContext.cs b/src/Microsoft.OpenApi/Validations/IValidationContext.cs index 7ab4d08e7..2858a239a 100644 --- a/src/Microsoft.OpenApi/Validations/IValidationContext.cs +++ b/src/Microsoft.OpenApi/Validations/IValidationContext.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Validations { @@ -21,7 +21,7 @@ public interface IValidationContext void AddWarning(OpenApiValidatorWarning warning); /// - /// Allow Rule to indicate validation error occured at a deeper context level. + /// Allow Rule to indicate validation error occured at a deeper context level. /// /// Identifier for context void Enter(string segment); diff --git a/src/Microsoft.OpenApi/Validations/OpenApiValidatiorWarning.cs b/src/Microsoft.OpenApi/Validations/OpenApiValidatiorWarning.cs index 77480584d..33e088b09 100644 --- a/src/Microsoft.OpenApi/Validations/OpenApiValidatiorWarning.cs +++ b/src/Microsoft.OpenApi/Validations/OpenApiValidatiorWarning.cs @@ -5,7 +5,7 @@ using Microsoft.OpenApi.Models; namespace Microsoft.OpenApi.Validations -{ +{ /// /// Warnings detected when validating an OpenAPI Element /// diff --git a/src/Microsoft.OpenApi/Validations/OpenApiValidator.cs b/src/Microsoft.OpenApi/Validations/OpenApiValidator.cs index a0aee12e7..5fb37ad92 100644 --- a/src/Microsoft.OpenApi/Validations/OpenApiValidator.cs +++ b/src/Microsoft.OpenApi/Validations/OpenApiValidator.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -300,7 +300,7 @@ private void Validate(T item) } /// - /// This overload allows applying rules based on actual object type, rather than matched interface. This is + /// This overload allows applying rules based on actual object type, rather than matched interface. This is /// needed for validating extensions. /// private void Validate(object item, Type type) diff --git a/src/Microsoft.OpenApi/Validations/OpenApiValidatorError.cs b/src/Microsoft.OpenApi/Validations/OpenApiValidatorError.cs index c24d48fe3..216b688a5 100644 --- a/src/Microsoft.OpenApi/Validations/OpenApiValidatorError.cs +++ b/src/Microsoft.OpenApi/Validations/OpenApiValidatorError.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiComponentsRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiComponentsRules.cs index 60267a26d..468e97447 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiComponentsRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiComponentsRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Text.RegularExpressions; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiContactRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiContactRules.cs index f518453f7..d71db1822 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiContactRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiContactRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiDocumentRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiDocumentRules.cs index e5193b4c2..7d01f1319 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiDocumentRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiDocumentRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiExtensionRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiExtensionRules.cs index c44983ffb..c95477c87 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiExtensionRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiExtensionRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Interfaces; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiExternalDocsRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiExternalDocsRules.cs index a54651073..8556eaa32 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiExternalDocsRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiExternalDocsRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiHeaderRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiHeaderRules.cs index 9ffbc38f4..cf9200917 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiHeaderRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiHeaderRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiInfoRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiInfoRules.cs index e02f019e2..f3ddbfa28 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiInfoRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiInfoRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiLicenseRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiLicenseRules.cs index d854268c6..89b88ca9d 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiLicenseRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiLicenseRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiMediaTypeRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiMediaTypeRules.cs index 21ad4ef72..f4cc4b2ab 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiMediaTypeRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiMediaTypeRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiOAuthFlowRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiOAuthFlowRules.cs index 7d900e1b4..95444fb9a 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiOAuthFlowRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiOAuthFlowRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiParameterRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiParameterRules.cs index d38bd7f9e..878e2db10 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiParameterRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiParameterRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; @@ -97,13 +97,13 @@ public static class OpenApiParameterRules }); /// - /// Validate that a path parameter should always appear in the path + /// Validate that a path parameter should always appear in the path /// public static ValidationRule PathParameterShouldBeInThePath => new ValidationRule( (context, parameter) => { - if (parameter.In == ParameterLocation.Path && + if (parameter.In == ParameterLocation.Path && !(context.PathString.Contains("{" + parameter.Name + "}") || context.PathString.Contains("#/components"))) { context.Enter("in"); diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiPathsRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiPathsRules.cs index 7ac374b62..669e27bb0 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiPathsRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiPathsRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Properties; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiResponseRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiResponseRules.cs index 6aae427d1..11b228e74 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiResponseRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiResponseRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiResponsesRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiResponsesRules.cs index d05a1229c..5df74c2e9 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiResponsesRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiResponsesRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Linq; using System.Text.RegularExpressions; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs index a8ed2e93c..6753a3e65 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Properties; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiServerRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiServerRules.cs index 93f0f581f..67fc5eef2 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiServerRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiServerRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiTagRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiTagRules.cs index cc4d1f97f..9dac45966 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiTagRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiTagRules.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Models; diff --git a/src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs b/src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs index 630dc8e65..25372d575 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Any; diff --git a/src/Microsoft.OpenApi/Validations/ValidationExtensions.cs b/src/Microsoft.OpenApi/Validations/ValidationExtensions.cs index 195df89cd..ed889febd 100644 --- a/src/Microsoft.OpenApi/Validations/ValidationExtensions.cs +++ b/src/Microsoft.OpenApi/Validations/ValidationExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/src/Microsoft.OpenApi/Validations/ValidationRule.cs b/src/Microsoft.OpenApi/Validations/ValidationRule.cs index fdbf5c330..5b79a9be2 100644 --- a/src/Microsoft.OpenApi/Validations/ValidationRule.cs +++ b/src/Microsoft.OpenApi/Validations/ValidationRule.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using Microsoft.OpenApi.Interfaces; diff --git a/src/Microsoft.OpenApi/Validations/ValidationRuleSet.cs b/src/Microsoft.OpenApi/Validations/ValidationRuleSet.cs index eca7bc8de..a01c4a4bc 100644 --- a/src/Microsoft.OpenApi/Validations/ValidationRuleSet.cs +++ b/src/Microsoft.OpenApi/Validations/ValidationRuleSet.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Linq; diff --git a/src/Microsoft.OpenApi/Writers/FormattingStreamWriter.cs b/src/Microsoft.OpenApi/Writers/FormattingStreamWriter.cs index b6db3d1e0..ea4f33f63 100644 --- a/src/Microsoft.OpenApi/Writers/FormattingStreamWriter.cs +++ b/src/Microsoft.OpenApi/Writers/FormattingStreamWriter.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.IO; diff --git a/src/Microsoft.OpenApi/Writers/IOpenApiWriter.cs b/src/Microsoft.OpenApi/Writers/IOpenApiWriter.cs index 8fcbf10ed..9ea04b400 100644 --- a/src/Microsoft.OpenApi/Writers/IOpenApiWriter.cs +++ b/src/Microsoft.OpenApi/Writers/IOpenApiWriter.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Writers { diff --git a/src/Microsoft.OpenApi/Writers/OpenApiJsonWriter.cs b/src/Microsoft.OpenApi/Writers/OpenApiJsonWriter.cs index 10049974b..86bacb558 100644 --- a/src/Microsoft.OpenApi/Writers/OpenApiJsonWriter.cs +++ b/src/Microsoft.OpenApi/Writers/OpenApiJsonWriter.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; diff --git a/src/Microsoft.OpenApi/Writers/OpenApiWriterAnyExtensions.cs b/src/Microsoft.OpenApi/Writers/OpenApiWriterAnyExtensions.cs index 361da3b2a..2c8fc7d68 100644 --- a/src/Microsoft.OpenApi/Writers/OpenApiWriterAnyExtensions.cs +++ b/src/Microsoft.OpenApi/Writers/OpenApiWriterAnyExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using Microsoft.OpenApi.Any; diff --git a/src/Microsoft.OpenApi/Writers/OpenApiWriterBase.cs b/src/Microsoft.OpenApi/Writers/OpenApiWriterBase.cs index 4d7f11032..cc88b0582 100644 --- a/src/Microsoft.OpenApi/Writers/OpenApiWriterBase.cs +++ b/src/Microsoft.OpenApi/Writers/OpenApiWriterBase.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.Writers /// public abstract class OpenApiWriterBase : IOpenApiWriter { - + /// /// Settings for controlling how the OpenAPI document will be written out. /// @@ -49,7 +49,7 @@ public OpenApiWriterBase(TextWriter textWriter) : this(textWriter, null) /// /// /// - public OpenApiWriterBase(TextWriter textWriter, OpenApiWriterSettings settings) + public OpenApiWriterBase(TextWriter textWriter, OpenApiWriterSettings settings) { Writer = textWriter; Writer.NewLine = "\n"; diff --git a/src/Microsoft.OpenApi/Writers/OpenApiWriterExtensions.cs b/src/Microsoft.OpenApi/Writers/OpenApiWriterExtensions.cs index 537273cac..518936b11 100644 --- a/src/Microsoft.OpenApi/Writers/OpenApiWriterExtensions.cs +++ b/src/Microsoft.OpenApi/Writers/OpenApiWriterExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections; diff --git a/src/Microsoft.OpenApi/Writers/OpenApiWriterSettings.cs b/src/Microsoft.OpenApi/Writers/OpenApiWriterSettings.cs index 06fcd0246..6e503f5d6 100644 --- a/src/Microsoft.OpenApi/Writers/OpenApiWriterSettings.cs +++ b/src/Microsoft.OpenApi/Writers/OpenApiWriterSettings.cs @@ -39,8 +39,8 @@ public class OpenApiWriterSettings /// Indicates how references in the source document should be handled. /// [Obsolete("Use InlineLocalReference and InlineExternalReference settings instead")] - public ReferenceInlineSetting ReferenceInline { - get { return referenceInline; } + public ReferenceInlineSetting ReferenceInline { + get { return referenceInline; } set { referenceInline = value; switch(referenceInline) diff --git a/src/Microsoft.OpenApi/Writers/OpenApiYamlWriter.cs b/src/Microsoft.OpenApi/Writers/OpenApiYamlWriter.cs index 47afdcc31..be8794941 100644 --- a/src/Microsoft.OpenApi/Writers/OpenApiYamlWriter.cs +++ b/src/Microsoft.OpenApi/Writers/OpenApiYamlWriter.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; @@ -185,7 +185,7 @@ public override void WriteValue(string value) } Writer.Write("|"); - + WriteChompingIndicator(value); // Write indentation indicator when it starts with spaces @@ -193,7 +193,7 @@ public override void WriteValue(string value) { Writer.Write(IndentationString.Length); } - + Writer.WriteLine(); IncreaseIndentation(); @@ -207,7 +207,7 @@ public override void WriteValue(string value) firstLine = false; else Writer.WriteLine(); - + // Indentations for empty lines aren't needed. if (line.Length > 0) { diff --git a/src/Microsoft.OpenApi/Writers/Scope.cs b/src/Microsoft.OpenApi/Writers/Scope.cs index 37093cffc..3bfdb5ef8 100644 --- a/src/Microsoft.OpenApi/Writers/Scope.cs +++ b/src/Microsoft.OpenApi/Writers/Scope.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Writers { diff --git a/src/Microsoft.OpenApi/Writers/SpecialCharacterStringExtensions.cs b/src/Microsoft.OpenApi/Writers/SpecialCharacterStringExtensions.cs index 6e1ea2beb..02d30ec08 100644 --- a/src/Microsoft.OpenApi/Writers/SpecialCharacterStringExtensions.cs +++ b/src/Microsoft.OpenApi/Writers/SpecialCharacterStringExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Globalization; @@ -12,7 +12,7 @@ namespace Microsoft.OpenApi.Writers /// public static class SpecialCharacterStringExtensions { - // Plain style strings cannot start with indicators. + // Plain style strings cannot start with indicators. // http://www.yaml.org/spec/1.2/spec.html#indicator// private static readonly char[] _yamlIndicators = { @@ -170,9 +170,9 @@ internal static string GetYamlCompatibleString(this string input) return $"\"{input}\""; } - // If string + // If string // 1) includes a character forbidden in plain string, - // 2) starts with an indicator, OR + // 2) starts with an indicator, OR // 3) has trailing/leading white spaces, // wrap the string in single quote. // http://www.yaml.org/spec/1.2/spec.html#style/flow/plain diff --git a/src/Microsoft.OpenApi/Writers/WriterConstants.cs b/src/Microsoft.OpenApi/Writers/WriterConstants.cs index 5b4f2da91..13e6deabd 100644 --- a/src/Microsoft.OpenApi/Writers/WriterConstants.cs +++ b/src/Microsoft.OpenApi/Writers/WriterConstants.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. namespace Microsoft.OpenApi.Writers { diff --git a/test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/OpenApiDocumentMock.cs b/test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/OpenApiDocumentMock.cs index 3fc77fc01..c6f33d6f5 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/OpenApiDocumentMock.cs +++ b/test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/OpenApiDocumentMock.cs @@ -203,7 +203,7 @@ public static OpenApiDocument CreateOpenApiDocument() Type = "string" } } - } + } }, ["/users"] = new OpenApiPathItem { diff --git a/test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixture.cs b/test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixture.cs index 64e25fcfb..a694d17b0 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixture.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixture.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using FluentAssertions; diff --git a/test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixtureCollection.cs b/test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixtureCollection.cs index 1b9bd1107..d17520848 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixtureCollection.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/DefaultSettingsFixtureCollection.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Xunit; diff --git a/test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests/OpenApiDiagnosticTests.cs b/test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests/OpenApiDiagnosticTests.cs index 5b01e0444..0ab0f9bc7 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests/OpenApiDiagnosticTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests/OpenApiDiagnosticTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Threading.Tasks; diff --git a/test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests/UnsupportedSpecVersionTests.cs b/test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests/UnsupportedSpecVersionTests.cs index cd60aa630..44b5163e3 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests/UnsupportedSpecVersionTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/OpenApiReaderTests/UnsupportedSpecVersionTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using FluentAssertions; using Microsoft.OpenApi.Readers.Exceptions; diff --git a/test/Microsoft.OpenApi.Readers.Tests/OpenApiWorkspaceTests/OpenApiWorkspaceStreamTests.cs b/test/Microsoft.OpenApi.Readers.Tests/OpenApiWorkspaceTests/OpenApiWorkspaceStreamTests.cs index 869d43fab..7c3607a33 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/OpenApiWorkspaceTests/OpenApiWorkspaceStreamTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/OpenApiWorkspaceTests/OpenApiWorkspaceStreamTests.cs @@ -99,7 +99,7 @@ public Task LoadAsync(Uri uri) return null; } } - + public class ResourceLoader : IStreamLoader { diff --git a/test/Microsoft.OpenApi.Readers.Tests/ParseNodeTests.cs b/test/Microsoft.OpenApi.Readers.Tests/ParseNodeTests.cs index 2ece19537..7a4090c03 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/ParseNodeTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/ParseNodeTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using FluentAssertions; diff --git a/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/OpenApiAnyConverterTests.cs b/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/OpenApiAnyConverterTests.cs index 3875b77b0..ab61456ac 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/OpenApiAnyConverterTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/OpenApiAnyConverterTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Globalization; diff --git a/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/OpenApiAnyTests.cs b/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/OpenApiAnyTests.cs index 263c28fec..d089ccf24 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/OpenApiAnyTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/ParseNodes/OpenApiAnyTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using System.Linq; diff --git a/test/Microsoft.OpenApi.Readers.Tests/Properties/AssemblyInfo.cs b/test/Microsoft.OpenApi.Readers.Tests/Properties/AssemblyInfo.cs index c8a317893..62f4c0e52 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Properties/AssemblyInfo.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/Properties/AssemblyInfo.cs @@ -1,3 +1,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. diff --git a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV2Tests.cs b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV2Tests.cs index bd9600e4f..9bd42a0e3 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV2Tests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV2Tests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using FluentAssertions; using Microsoft.OpenApi.Models; diff --git a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV3Tests.cs b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV3Tests.cs index 6b94a161b..40d92075a 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV3Tests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/ConvertToOpenApiReferenceV3Tests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using FluentAssertions; using Microsoft.OpenApi.Models; diff --git a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/TryLoadReferenceV2Tests.cs b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/TryLoadReferenceV2Tests.cs index 9469de370..ff8285159 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/TryLoadReferenceV2Tests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/ReferenceService/TryLoadReferenceV2Tests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs b/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs index 89468229a..5ab83606e 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using FluentAssertions; using Microsoft.OpenApi.Any; diff --git a/test/Microsoft.OpenApi.Readers.Tests/TestHelper.cs b/test/Microsoft.OpenApi.Readers.Tests/TestHelper.cs index c97e35e9b..654be0858 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/TestHelper.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/TestHelper.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using System.Linq; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/ComparisonTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/ComparisonTests.cs index 1ae3678d6..0d91716a3 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/ComparisonTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/ComparisonTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using FluentAssertions; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiContactTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiContactTests.cs index 71489d39f..853c1efcb 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiContactTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiContactTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using FluentAssertions; using Microsoft.OpenApi.Models; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiDocumentTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiDocumentTests.cs index 4acdb583f..7926a062b 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiDocumentTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiDocumentTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Globalization; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiHeaderTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiHeaderTests.cs index eb3bb066c..ee9ad85c6 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiHeaderTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiHeaderTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.IO; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiOperationTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiOperationTests.cs index 76da8a763..30a32ed13 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiOperationTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiOperationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.IO; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiParameterTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiParameterTests.cs index 3f46f5a2b..7239139c1 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiParameterTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiParameterTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.IO; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiPathItemTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiPathItemTests.cs index c32c15ff4..88179b160 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiPathItemTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiPathItemTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.IO; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSchemaTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSchemaTests.cs index 9a75e5c8d..59ee452fb 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSchemaTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSchemaTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.IO; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSecuritySchemeTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSecuritySchemeTests.cs index 22f7d1633..e54dbaab3 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSecuritySchemeTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSecuritySchemeTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.IO; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiCallbackTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiCallbackTests.cs index 1a45006db..d396c471b 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiCallbackTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiCallbackTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using System.Linq; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiContactTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiContactTests.cs index be78f942b..5ce74bc3e 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiContactTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiContactTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using FluentAssertions; using Microsoft.OpenApi.Models; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDiscriminatorTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDiscriminatorTests.cs index 0768592b3..32160bcd9 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDiscriminatorTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDiscriminatorTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using System.Linq; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs index 85a686e49..c7684f8ce 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiDocumentTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiEncodingTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiEncodingTests.cs index 7f33491ff..ac6750901 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiEncodingTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiEncodingTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using System.Linq; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiExampleTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiExampleTests.cs index ead84f201..4ff4b0d42 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiExampleTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiExampleTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using System.Linq; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiInfoTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiInfoTests.cs index 29b23cb31..5bdad67a9 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiInfoTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiInfoTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.IO; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiMediaTypeTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiMediaTypeTests.cs index 47983a9a1..f9835bfbb 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiMediaTypeTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiMediaTypeTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using FluentAssertions; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiOperationTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiOperationTests.cs index 37053c2a4..b81e8d970 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiOperationTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiOperationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using System.Linq; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiParameterTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiParameterTests.cs index 3234195e5..13188dba1 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiParameterTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiParameterTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.IO; using FluentAssertions; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSchemaTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSchemaTests.cs index 54553d5a5..1f5483162 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSchemaTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSchemaTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.IO; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSecuritySchemeTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSecuritySchemeTests.cs index 9d7a27d72..e5f8e155e 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSecuritySchemeTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiSecuritySchemeTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.IO; diff --git a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiXmlTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiXmlTests.cs index a10d674a9..c9033832e 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiXmlTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V3Tests/OpenApiXmlTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.IO; diff --git a/test/Microsoft.OpenApi.SmokeTests/ApiGurus.cs b/test/Microsoft.OpenApi.SmokeTests/ApiGurus.cs index efba7b9b0..5466586d0 100644 --- a/test/Microsoft.OpenApi.SmokeTests/ApiGurus.cs +++ b/test/Microsoft.OpenApi.SmokeTests/ApiGurus.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/DefaultSettingsFixture.cs b/test/Microsoft.OpenApi.Tests/DefaultSettingsFixture.cs index 9bb685ddc..3a0b8aabe 100644 --- a/test/Microsoft.OpenApi.Tests/DefaultSettingsFixture.cs +++ b/test/Microsoft.OpenApi.Tests/DefaultSettingsFixture.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using FluentAssertions; diff --git a/test/Microsoft.OpenApi.Tests/DefaultSettingsFixtureCollection.cs b/test/Microsoft.OpenApi.Tests/DefaultSettingsFixtureCollection.cs index 4fdfe0b16..22f562c4d 100644 --- a/test/Microsoft.OpenApi.Tests/DefaultSettingsFixtureCollection.cs +++ b/test/Microsoft.OpenApi.Tests/DefaultSettingsFixtureCollection.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using Xunit; diff --git a/test/Microsoft.OpenApi.Tests/Extensions/OpenApiTypeMapperTests.cs b/test/Microsoft.OpenApi.Tests/Extensions/OpenApiTypeMapperTests.cs index c2b6d9597..a0fcb133a 100644 --- a/test/Microsoft.OpenApi.Tests/Extensions/OpenApiTypeMapperTests.cs +++ b/test/Microsoft.OpenApi.Tests/Extensions/OpenApiTypeMapperTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -29,7 +29,7 @@ public class OpenApiTypeMapperTests new object[] { new OpenApiSchema { Type = "number", Format = "float", Nullable = true }, typeof(float?) }, new object[] { new OpenApiSchema { Type = "string", Format = "date-time" }, typeof(DateTimeOffset) } }; - + [Theory] [MemberData(nameof(PrimitiveTypeData))] public void MapTypeToOpenApiPrimitiveTypeShouldSucceed(Type type, OpenApiSchema expected) diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.cs index 93b78e71b..5aabd5ef4 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiCallbackTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Globalization; using System.IO; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiComponentsTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiComponentsTests.cs index 46a6bb772..d6222f2a7 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiComponentsTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiComponentsTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiContactTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiContactTests.cs index 1a99241d1..0e4531551 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiContactTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiContactTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs index becc91d97..f19895569 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -1697,10 +1697,10 @@ public void SerializeV2DocumentWithNonArraySchemaTypeDoesNotWriteOutCollectionFo { Info = new OpenApiInfo(), Paths = new OpenApiPaths - { + { ["/foo"] = new OpenApiPathItem { - Operations = new Dictionary + Operations = new Dictionary { [OperationType.Get] = new OpenApiOperation { @@ -1730,7 +1730,7 @@ public void SerializeV2DocumentWithNonArraySchemaTypeDoesNotWriteOutCollectionFo expected = expected.MakeLineBreaksEnvironmentNeutral(); actual.Should().Be(expected); } - + [Fact] public void SerializeV2DocumentWithStyleAsNullDoesNotWriteOutStyleValue() { @@ -1818,6 +1818,6 @@ public void SerializeV2DocumentWithStyleAsNullDoesNotWriteOutStyleValue() actual = actual.MakeLineBreaksEnvironmentNeutral(); expected = expected.MakeLineBreaksEnvironmentNeutral(); actual.Should().Be(expected); - } + } } } diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiEncodingTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiEncodingTests.cs index 24bfca242..7a4b9de50 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiEncodingTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiEncodingTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using FluentAssertions; using Microsoft.OpenApi.Extensions; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.cs index e12a7d100..6d756fec5 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiExampleTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Globalization; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiExternalDocsTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiExternalDocsTests.cs index 7d37fc9a4..ab013e9a2 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiExternalDocsTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiExternalDocsTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using FluentAssertions; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.cs index d45bd0038..15f081c90 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiHeaderTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Globalization; using System.IO; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiInfoTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiInfoTests.cs index b2395a9ed..052c3264b 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiInfoTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiInfoTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiLicenseTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiLicenseTests.cs index 46717ecec..87937072e 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiLicenseTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiLicenseTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.cs index 4a10be0ae..6f06c947d 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiLinkTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Globalization; using System.IO; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiMediaTypeTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiMediaTypeTests.cs index c59da1e86..600958b97 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiMediaTypeTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiMediaTypeTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using FluentAssertions; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiOAuthFlowTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiOAuthFlowTests.cs index 80040f566..c16eccbef 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiOAuthFlowTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiOAuthFlowTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiOAuthFlowsTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiOAuthFlowsTests.cs index 7d4882bbb..4135e3e50 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiOAuthFlowsTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiOAuthFlowsTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs index 11d8dc517..b0394ccab 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.cs index 2a2c65202..a0214fdcd 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Globalization; @@ -54,7 +54,7 @@ public class OpenApiParameterTests OneOf = new List { new OpenApiSchema { Type = "number", Format = "double" }, - new OpenApiSchema { Type = "string" } + new OpenApiSchema { Type = "string" } } }, Examples = new Dictionary diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiReferenceTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiReferenceTests.cs index b9edd2a32..e4f1e8582 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiReferenceTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiReferenceTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using FluentAssertions; using Microsoft.OpenApi.Extensions; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.cs index 78fcd0d07..6b62e9fe8 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiRequestBodyTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Globalization; using System.IO; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs index 0010e8cb6..235da9955 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Globalization; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs index d59c026e3..82b65f015 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -430,7 +430,7 @@ public void SerializeAsV2ShouldSetFormatPropertyInParentSchemaIfPresentInChildre OneOf = new List { new OpenApiSchema - { + { Type = "number", Format = "decimal" }, diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecurityRequirementTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecurityRequirementTests.cs index 7d630c5f6..5087f71dc 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecurityRequirementTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecurityRequirementTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs index 44a388d90..91085e791 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -32,7 +32,7 @@ public class OpenApiSecuritySchemeTests { Description = "description1", Type = SecuritySchemeType.Http, - Scheme = OpenApiConstants.Basic + Scheme = OpenApiConstants.Basic }; @@ -311,7 +311,7 @@ public async Task SerializeReferencedSecuritySchemeAsV3JsonWorksAsync(bool produ var writer = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings { Terse = produceTerseOutput }); // Act - // Add dummy start object, value, and end object to allow SerializeAsV3 to output security scheme + // Add dummy start object, value, and end object to allow SerializeAsV3 to output security scheme // as property name. writer.WriteStartObject(); ReferencedSecurityScheme.SerializeAsV3(writer); diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiServerTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiServerTests.cs index e4d4f36fb..23e7fcc00 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiServerTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiServerTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using FluentAssertions; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiServerVariableTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiServerVariableTests.cs index 9d50f76f6..74f837aca 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiServerVariableTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiServerVariableTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using FluentAssertions; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs index 66c0dfd70..a2b49fe18 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Globalization; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiXmlTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiXmlTests.cs index 9e79c5211..a9744b668 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiXmlTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiXmlTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Properties/AssemblyInfo.cs b/test/Microsoft.OpenApi.Tests/Properties/AssemblyInfo.cs index c8a317893..62f4c0e52 100644 --- a/test/Microsoft.OpenApi.Tests/Properties/AssemblyInfo.cs +++ b/test/Microsoft.OpenApi.Tests/Properties/AssemblyInfo.cs @@ -1,3 +1,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. diff --git a/test/Microsoft.OpenApi.Tests/Services/OpenApiValidatorTests.cs b/test/Microsoft.OpenApi.Tests/Services/OpenApiValidatorTests.cs index 813cb9517..3d488c7db 100644 --- a/test/Microsoft.OpenApi.Tests/Services/OpenApiValidatorTests.cs +++ b/test/Microsoft.OpenApi.Tests/Services/OpenApiValidatorTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/StringExtensions.cs b/test/Microsoft.OpenApi.Tests/StringExtensions.cs index 5b01c97ac..b3b458683 100644 --- a/test/Microsoft.OpenApi.Tests/StringExtensions.cs +++ b/test/Microsoft.OpenApi.Tests/StringExtensions.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiComponentsValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiComponentsValidationTests.cs index 8188d6334..b6e187360 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiComponentsValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiComponentsValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiContactValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiContactValidationTests.cs index 221c245a5..7d371c12a 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiContactValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiContactValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiExternalDocsValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiExternalDocsValidationTests.cs index fee728f76..ab25b7c28 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiExternalDocsValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiExternalDocsValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiHeaderValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiHeaderValidationTests.cs index 429c460a4..aa7afe477 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiHeaderValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiHeaderValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiInfoValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiInfoValidationTests.cs index 1a58fff04..7793de94e 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiInfoValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiInfoValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiLicenseValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiLicenseValidationTests.cs index 8efb8715c..45bab5671 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiLicenseValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiLicenseValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiMediaTypeValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiMediaTypeValidationTests.cs index a68d91578..733a468bb 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiMediaTypeValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiMediaTypeValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiOAuthFlowValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiOAuthFlowValidationTests.cs index 02ab469ae..329727b2b 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiOAuthFlowValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiOAuthFlowValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiParameterValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiParameterValidationTests.cs index 24f28e4eb..1a3b5442b 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiParameterValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiParameterValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiReferenceValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiReferenceValidationTests.cs index 57f9f2cae..0c150cd5c 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiReferenceValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiReferenceValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiResponseValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiResponseValidationTests.cs index 5f4c29173..a3a84af95 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiResponseValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiResponseValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs index 3ea545af9..1760b000f 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -275,7 +275,7 @@ public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscrim // Arrange var components = new OpenApiComponents { - Schemas = + Schemas = { { "Person", @@ -309,7 +309,7 @@ public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscrim }, Reference = new OpenApiReference { Id = "Person" } } - } + } } }; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiServerValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiServerValidationTests.cs index bbc4c7e10..22b3d706f 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiServerValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiServerValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiTagValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiTagValidationTests.cs index a039b39c2..c917592c4 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiTagValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiTagValidationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Walkers/WalkerLocationTests.cs b/test/Microsoft.OpenApi.Tests/Walkers/WalkerLocationTests.cs index 58d4d3d4c..5898c1aff 100644 --- a/test/Microsoft.OpenApi.Tests/Walkers/WalkerLocationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Walkers/WalkerLocationTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Linq; diff --git a/test/Microsoft.OpenApi.Tests/Workspaces/OpenApiReferencableTests.cs b/test/Microsoft.OpenApi.Tests/Workspaces/OpenApiReferencableTests.cs index d3c44c29b..a9d2c6694 100644 --- a/test/Microsoft.OpenApi.Tests/Workspaces/OpenApiReferencableTests.cs +++ b/test/Microsoft.OpenApi.Tests/Workspaces/OpenApiReferencableTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; diff --git a/test/Microsoft.OpenApi.Tests/Writers/OpenApiJsonWriterTests.cs b/test/Microsoft.OpenApi.Tests/Writers/OpenApiJsonWriterTests.cs index 44d1be55b..e7980d1c2 100644 --- a/test/Microsoft.OpenApi.Tests/Writers/OpenApiJsonWriterTests.cs +++ b/test/Microsoft.OpenApi.Tests/Writers/OpenApiJsonWriterTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections; diff --git a/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterAnyExtensionsTests.cs b/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterAnyExtensionsTests.cs index d1839015d..6e6ab8ba3 100644 --- a/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterAnyExtensionsTests.cs +++ b/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterAnyExtensionsTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections.Generic; @@ -152,7 +152,7 @@ public static IEnumerable StringifiedDateTimes get { return - from input in new [] { + from input in new [] { "2017-1-2", "1999-01-02T12:10:22", "1999-01-03", diff --git a/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterSpecialCharacterTests.cs b/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterSpecialCharacterTests.cs index 6ac47d6c3..05bb6e909 100644 --- a/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterSpecialCharacterTests.cs +++ b/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterSpecialCharacterTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System.Collections.Generic; using System.Globalization; diff --git a/test/Microsoft.OpenApi.Tests/Writers/OpenApiYamlWriterTests.cs b/test/Microsoft.OpenApi.Tests/Writers/OpenApiYamlWriterTests.cs index 13f70f1e9..16395fd2b 100644 --- a/test/Microsoft.OpenApi.Tests/Writers/OpenApiYamlWriterTests.cs +++ b/test/Microsoft.OpenApi.Tests/Writers/OpenApiYamlWriterTests.cs @@ -1,5 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. +// Licensed under the MIT license. using System; using System.Collections; From eecda3493b6d6e3132c43ae46438c9196645ac16 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Mon, 2 Oct 2023 20:09:00 +1100 Subject: [PATCH 02/10] . --- .../Options/CommandOptions.cs | 2 +- .../Exceptions/OpenApiReaderException.cs | 1 - .../OpenApiTextReaderReader.cs | 1 - .../ParsingContext.cs | 1 - .../Services/DefaultStreamLoader.cs | 1 - .../V2/OpenApiDocumentDeserializer.cs | 2 - .../V2/OpenApiV2VersionService.cs | 2 - .../V3/OpenApiComponentsDeserializer.cs | 1 - .../V3/OpenApiMediaTypeDeserializer.cs | 1 - src/Microsoft.OpenApi.Workbench/MainModel.cs | 7 +- .../Exceptions/OpenApiException.cs | 1 - .../OpenApiSerializableExtensions.cs | 1 - .../Models/OpenApiCallback.cs | 1 - src/Microsoft.OpenApi/Models/OpenApiHeader.cs | 1 - src/Microsoft.OpenApi/Models/OpenApiLink.cs | 1 - .../Models/OpenApiParameter.cs | 4 +- src/Microsoft.OpenApi/Models/OpenApiSchema.cs | 6 +- .../Models/OpenApiSecurityScheme.cs | 1 - .../Services/OpenApiReferenceResolver.cs | 1 - .../Services/OpenApiVisitorBase.cs | 3 - .../Services/OpenApiWalker.cs | 5 +- .../Services/SearchResult.cs | 1 - .../Validations/IValidationContext.cs | 1 - .../Rules/OpenApiMediaTypeRules.cs | 1 - .../Validations/ValidationExtensions.cs | 1 - .../Writers/OpenApiWriterSettings.cs | 4 +- .../Services/OpenApiFilterServiceTests.cs | 1 - .../Services/OpenApiServiceTests.cs | 9 +- .../OpenApiWorkspaceStreamTests.cs | 5 - .../ParseNodes/OpenApiAnyConverterTests.cs | 2 - .../ConvertToOpenApiReferenceV3Tests.cs | 2 - .../V2Tests/OpenApiDocumentTests.cs | 6 - .../V2Tests/OpenApiPathItemTests.cs | 1 - .../V2Tests/OpenApiServerTests.cs | 1 - .../V3Tests/OpenApiDocumentTests.cs | 2 - .../V3Tests/OpenApiSchemaTests.cs | 1 - .../GraphTests.cs | 2 - .../Expressions/RuntimeExpressionTests.cs | 3 - .../OpenApiDeprecationExtensionTests.cs | 1 - .../Models/OpenApiDocumentTests.cs | 1 - .../Models/OpenApiReferenceTests.cs | 1 - .../Models/OpenApiSchemaTests.cs | 1 - .../Services/OpenApiValidatorTests.cs | 2 - .../OpenApiComponentsValidationTests.cs | 1 - .../OpenApiReferenceValidationTests.cs | 1 - .../Workspaces/OpenApiWorkspaceTests.cs | 186 +++++------------- .../Writers/OpenApiYamlWriterTests.cs | 3 - 47 files changed, 62 insertions(+), 222 deletions(-) diff --git a/src/Microsoft.OpenApi.Hidi/Options/CommandOptions.cs b/src/Microsoft.OpenApi.Hidi/Options/CommandOptions.cs index 735644970..6fee866cb 100644 --- a/src/Microsoft.OpenApi.Hidi/Options/CommandOptions.cs +++ b/src/Microsoft.OpenApi.Hidi/Options/CommandOptions.cs @@ -104,6 +104,6 @@ public IReadOnlyList