diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml new file mode 100644 index 000000000..1281acf0a --- /dev/null +++ b/.azure-pipelines/ci-build.yml @@ -0,0 +1,383 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r) +trigger: + branches: + include: + - main + - support/v1 + - support/v2 + tags: + include: + - 'v*' +pr: + branches: + include: + - main + - support/v1 + - support/v2 + +variables: + buildPlatform: 'Any CPU' + buildConfiguration: 'Release' + NuGetOrganizationName: 'openapinet' + privateFeedBaseUrl: 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public' + ProductBinPath: '$(Build.SourcesDirectory)\src\Microsoft.OpenApi\bin\$(BuildConfiguration)' + +resources: + repositories: + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + pool: + name: Azure-Pipelines-1ESPT-ExDShared + image: windows-2022 + os: windows + customBuildTags: + - ES365AIMigrationTooling + stages: + - stage: build + jobs: + - job: build + templateContext: + outputs: + - output: pipelineArtifact + displayName: 'Publish Artifact: Nugets' + artifactName: Nugets + targetPath: '$(Build.ArtifactStagingDirectory)/Nugets' + steps: + - task: UseDotNet@2 + displayName: 'Use .NET 6' + inputs: + version: 6.x + + - task: UseDotNet@2 + displayName: 'Use .NET 8' + inputs: + version: 8.x + + - task: UseDotNet@2 + displayName: 'Use .NET 10' + inputs: + useGlobalJson: true + + # Install the nuget tool. + - task: NuGetToolInstaller@1 + displayName: 'Use NuGet >=6.11.0' + inputs: + versionSpec: '>=6.11.0' + checkLatest: true + + # Build the Product project + - task: NuGetAuthenticate@1 + displayName: 'Authenticate to Azure Artifacts' + + - pwsh: | + @" + + + + + + + + "@ | Set-Content -Path "$(Build.SourcesDirectory)/nuget.config" -Encoding UTF8 + displayName: 'Create nuget.config (central feed)' + - task: DotNetCoreCLI@2 + displayName: 'build' + inputs: + projects: '$(Build.SourcesDirectory)\Microsoft.OpenApi.slnx' + arguments: '--configuration $(BuildConfiguration) --no-incremental' + + # Run the Unit test + - pwsh: | + dotnet test "$(Build.SourcesDirectory)\Microsoft.OpenApi.slnx" ` + --configuration $(BuildConfiguration) ` + --no-build ` + -- ` + --report-azdo ` + --publish-azdo-test-results ` + --results-directory="$(Agent.TempDirectory)\TestResults" ` + --minimum-expected-tests 1 + displayName: 'test' + + - task: EsrpCodeSigning@6 + displayName: 'ESRP CodeSigning binaries' + inputs: + ConnectedServiceName: 'Federated DevX ESRP Managed Identity Connection' + AppRegistrationClientId: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + AppRegistrationTenantId: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' + AuthAKVName: 'akv-prod-eastus' + AuthCertName: 'ReferenceLibraryPrivateCert' + AuthSignCertName: 'ReferencePackagePublisherCertificate' + FolderPath: '$(Build.SourcesDirectory)\src' + signConfigType: 'inlineSignParams' + inlineOperation: | + [ + { + "keyCode": "CP-230012", + "operationSetCode": "SigntoolSign", + "parameters": [ + { + "parameterName": "OpusName", + "parameterValue": "Microsoft" + }, + { + "parameterName": "OpusInfo", + "parameterValue": "http://www.microsoft.com" + }, + { + "parameterName": "FileDigest", + "parameterValue": "/fd \"SHA256\"" + }, + { + "parameterName": "PageHash", + "parameterValue": "/NPH" + }, + { + "parameterName": "TimeStamp", + "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" + } + ], + "toolName": "sign", + "toolVersion": "1.0" + }, + { + "keyCode": "CP-230012", + "operationSetCode": "SigntoolVerify", + "parameters": [ ], + "toolName": "sign", + "toolVersion": "1.0" + } + ] + SessionTimeout: '20' + MaxConcurrency: '50' + MaxRetryAttempts: '5' + PendingAnalysisWaitTimeoutMinutes: '5' + + # Pack core lib + - pwsh: dotnet pack $(Build.SourcesDirectory)/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj -o $(Build.ArtifactStagingDirectory) --configuration $(BuildConfiguration) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg + displayName: 'pack OpenAPI' + + # Pack YamlReader + - pwsh: dotnet pack $(Build.SourcesDirectory)/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj -o $(Build.ArtifactStagingDirectory) --configuration $(BuildConfiguration) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg + displayName: 'pack YamlReader' + + - task: EsrpCodeSigning@6 + displayName: 'ESRP CodeSigning Nuget Packages' + inputs: + ConnectedServiceName: 'Federated DevX ESRP Managed Identity Connection' + AppRegistrationClientId: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + AppRegistrationTenantId: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' + AuthAKVName: 'akv-prod-eastus' + AuthCertName: 'ReferenceLibraryPrivateCert' + AuthSignCertName: 'ReferencePackagePublisherCertificate' + FolderPath: '$(Build.ArtifactStagingDirectory)' + Pattern: '*.nupkg' + signConfigType: 'inlineSignParams' + inlineOperation: | + [ + { + "keyCode": "CP-401405", + "operationSetCode": "NuGetSign", + "parameters": [ ], + "toolName": "sign", + "toolVersion": "1.0" + }, + { + "keyCode": "CP-401405", + "operationSetCode": "NuGetVerify", + "parameters": [ ], + "toolName": "sign", + "toolVersion": "1.0" + } + ] + SessionTimeout: '60' + MaxConcurrency: '50' + MaxRetryAttempts: '5' + PendingAnalysisWaitTimeoutMinutes: '5' + + - task: CopyFiles@2 + displayName: Prepare staging folder for upload + inputs: + targetFolder: $(Build.ArtifactStagingDirectory)/Nugets + sourceFolder: $(Build.ArtifactStagingDirectory) + Contents: | + *.nupkg + *.snupkg + + - task: CopyFiles@2 + displayName: 'Include version-check script in Nugets artifact' + inputs: + SourceFolder: '$(Build.SourcesDirectory)/scripts' + Contents: 'check-nuget-package-published.ps1' + TargetFolder: '$(Build.ArtifactStagingDirectory)/Nugets/scripts' + + - stage: deploy + condition: and(contains(variables['Build.SourceBranch'], 'refs/tags/v'), succeeded()) + dependsOn: build + pool: + name: Azure-Pipelines-1ESPT-ExDShared + os: linux + image: ubuntu-latest + jobs: + - deployment: deploy_lib + condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded()) + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + artifactName: Nugets + targetPath: '$(Pipeline.Workspace)' + dependsOn: [] + environment: nuget-org + strategy: + runOnce: + deploy: + pool: + vmImage: ubuntu-latest + steps: + - task: PowerShell@2 + displayName: 'Check whether NuGet package version already published (idempotent)' + inputs: + targetType: filePath + filePath: '$(Pipeline.Workspace)/scripts/check-nuget-package-published.ps1' + arguments: '-PackageId "Microsoft.OpenApi" -PackageDirectory "$(Pipeline.Workspace)" -NuGetServiceIndexUrl "$(privateFeedBaseUrl)/nuget/v3/index.json"' + pwsh: true + env: + FEED_ACCESS_TOKEN: $(System.AccessToken) + - task: CopyFiles@2 + displayName: 'Stage OpenAPI NuGet packages for ESRP release' + condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) + inputs: + SourceFolder: '$(Pipeline.Workspace)' + Contents: | + Microsoft.OpenApi.*.nupkg + Microsoft.OpenApi.*.snupkg + !Microsoft.OpenApi.YamlReader.* + TargetFolder: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/openapi' + CleanTargetFolder: true + - task: EsrpRelease@14 + displayName: 'ESRP Release - OpenAPI NuGet' + condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) + inputs: + connectedservicename: 'Federated DevX ESRP Managed Identity Connection' + usemanagedidentity: false + keyvaultname: 'akv-prod-eastus' + authcertname: 'ReferenceLibraryPrivateCert' + signcertname: 'ReferencePackagePublisherCertificate' + clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + intent: 'packagedistribution' + contenttype: 'NuGet' + organizationname: '$(NuGetOrganizationName)' + contentsource: 'Folder' + folderlocation: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/openapi' + waitforreleasecompletion: true + owners: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' + approvers: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' + serviceendpointurl: 'https://api.esrp.microsoft.com/' + mainpublisher: 'ESRPRELPACMAN' + domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' + + - deployment: deploy_yaml_reader + condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded()) + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + artifactName: Nugets + targetPath: '$(Pipeline.Workspace)' + dependsOn: deploy_lib + environment: nuget-org + strategy: + runOnce: + deploy: + pool: + vmImage: ubuntu-latest + steps: + - task: PowerShell@2 + displayName: 'Check whether NuGet package version already published (idempotent)' + inputs: + targetType: filePath + filePath: '$(Pipeline.Workspace)/scripts/check-nuget-package-published.ps1' + arguments: '-PackageId "Microsoft.OpenApi.YamlReader" -PackageDirectory "$(Pipeline.Workspace)" -NuGetServiceIndexUrl "$(privateFeedBaseUrl)/nuget/v3/index.json"' + pwsh: true + env: + FEED_ACCESS_TOKEN: $(System.AccessToken) + - task: CopyFiles@2 + displayName: 'Stage YAML reader NuGet packages for ESRP release' + condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) + inputs: + SourceFolder: '$(Pipeline.Workspace)' + Contents: | + Microsoft.OpenApi.YamlReader.*.nupkg + Microsoft.OpenApi.YamlReader.*.snupkg + TargetFolder: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/yaml-reader' + CleanTargetFolder: true + - task: EsrpRelease@14 + displayName: 'ESRP Release - YAML reader NuGet' + condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) + inputs: + connectedservicename: 'Federated DevX ESRP Managed Identity Connection' + usemanagedidentity: false + keyvaultname: 'akv-prod-eastus' + authcertname: 'ReferenceLibraryPrivateCert' + signcertname: 'ReferencePackagePublisherCertificate' + clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + intent: 'packagedistribution' + contenttype: 'NuGet' + organizationname: '$(NuGetOrganizationName)' + contentsource: 'Folder' + folderlocation: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/yaml-reader' + waitforreleasecompletion: true + owners: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' + approvers: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' + serviceendpointurl: 'https://api.esrp.microsoft.com/' + mainpublisher: 'ESRPRELPACMAN' + domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' + + - deployment: create_github_release + condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded()) + templateContext: + type: releaseJob + isProduction: true + inputs: + - input: pipelineArtifact + artifactName: Nugets + targetPath: '$(Pipeline.Workspace)' + dependsOn: [] + environment: kiota-github-releases + strategy: + runOnce: + deploy: + pool: + vmImage: ubuntu-latest + steps: + - pwsh: | + $artifactName = Get-ChildItem -Path $(Pipeline.Workspace) -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1 + $artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.", "" -replace ".nupkg", "" + #Set Variable $artifactName and $artifactVersion + Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false;]$artifactVersion" + echo "$artifactVersion" + displayName: 'Fetch Artifact Name' + - task: GitHubRelease@1 + displayName: 'GitHub release (edit)' + condition: succeededOrFailed() + inputs: + gitHubConnection: 'Github-MaggieKimani1' + action: edit + tagSource: userSpecifiedTag + tag: 'v$(artifactVersion)' + releaseNotesSource: inline + addChangeLog: false + +# once the nuget has been released, fill this form to get the public documentation updated. +# https://dev.azure.com/msft-skilling/Content/_workitems/create/User%20Story?templateId=39fb91e3-64a2-4c8a-83db-b2bdf3603dd3&ownerId=c4a28f90-17ae-4384-b514-7273392b082b +# https://learn.microsoft.com/en-us/dotnet/api/microsoft.openapi diff --git a/.config/1espt/PipelineAutobaseliningConfig.yml b/.config/1espt/PipelineAutobaseliningConfig.yml new file mode 100644 index 000000000..37a1a42bd --- /dev/null +++ b/.config/1espt/PipelineAutobaseliningConfig.yml @@ -0,0 +1,24 @@ +## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details. + +pipelines: + 107: + usedNonDefaultBranch: true + retail: + source: + credscan: + lastModifiedDate: 2024-09-13 + eslint: + lastModifiedDate: 2026-05-13 + psscriptanalyzer: + lastModifiedDate: 2026-05-13 + armory: + lastModifiedDate: 2026-05-13 + accessibilityinsights: + lastModifiedDate: 2025-06-03 + binary: + credscan: + lastModifiedDate: 2025-01-28 + binskim: + lastModifiedDate: 2026-05-13 + spotbugs: + lastModifiedDate: 2026-05-13 diff --git a/.config/guardian/.gdnbaselines b/.config/guardian/.gdnbaselines new file mode 100644 index 000000000..5ed019a92 --- /dev/null +++ b/.config/guardian/.gdnbaselines @@ -0,0 +1,53 @@ +{ + "properties": { + "helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/baselines" + }, + "version": "1.0.0", + "baselines": { + "default": { + "name": "default", + "createdDate": "2026-05-13 00:39:09Z", + "lastUpdatedDate": "2026-05-13 00:40:41Z" + } + }, + "results": { + "89411c6a070fd31f2836b38a16926ffbfb4882aff49c907cafe6c95dfba1104a": { + "signature": "89411c6a070fd31f2836b38a16926ffbfb4882aff49c907cafe6c95dfba1104a", + "alternativeSignatures": [ + "59104f1c3fec111fba3f6b5b6d2d37f3bc0d5267b425f82b8c3f852abc8b2b7a", + "4dee2b2a1887d7a952ae5c61e48c9b6f543096940991cdcd0209c60561a537ce", + "558e542a1dcc76100e4395b278f8b99f1dab960b2b3ae01a4c5cb84ac5cdc70f" + ], + "target": "src/Microsoft.OpenApi/Writers/SpecialCharacterStringExtensions.cs", + "line": 152, + "uriBaseId": "file:///D:/a/_work/1/s/", + "memberOf": [ + "default" + ], + "tool": "roslynanalyzers", + "ruleId": "CA1310", + "createdDate": "2026-05-13 00:39:09Z", + "expirationDate": "2026-10-30 00:42:11Z", + "justification": "This error is baselined with an expiration date of 180 days from 2026-05-13 00:42:11Z" + }, + "f6386b2f2aa1886a31fd1b57fa9e476ff5f24efbe144c82246f931e688010861": { + "signature": "f6386b2f2aa1886a31fd1b57fa9e476ff5f24efbe144c82246f931e688010861", + "alternativeSignatures": [ + "eb5bc1ea05b68f4106e441c8d441b39afaea833e5b2cbf6804d34cb869d9ed00", + "bbe095dbf06a503925246de4a84cdc73afdafeddde3dab2440302c40560f811e", + "aaac06605663a64f92dc03d6aacf9a424f2d861eba86f4ffa06cd231479734a8" + ], + "target": "src/Microsoft.OpenApi/Reader/V2/OpenApiDocumentDeserializer.cs", + "line": 179, + "uriBaseId": "file:///D:/a/_work/1/s/", + "memberOf": [ + "default" + ], + "tool": "roslynanalyzers", + "ruleId": "CA1310", + "createdDate": "2026-05-13 00:39:09Z", + "expirationDate": "2026-10-30 00:42:11Z", + "justification": "This error is baselined with an expiration date of 180 days from 2026-05-13 00:42:11Z" + } + } +} \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..16abc6aef --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +{ + "name": "OpenAPI.NET", + "image": "mcr.microsoft.com/devcontainers/dotnet:10.0", + "customizations": { + "vscode": { + "extensions": [ + "ms-dotnettools.csdevkit" + ] + } + } +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..e8f790dff --- /dev/null +++ b/.editorconfig @@ -0,0 +1,134 @@ +# To learn more about .editorconfig see https://aka.ms/editorconfigdocs +############################### +# Core EditorConfig Options # +############################### +# All files +[*] +indent_style = space +# Code files +[*.{cs,csx,vb,vbx}] +indent_size = 4 +insert_final_newline = true +charset = utf-8-bom +############################### +# .NET Coding Conventions # +############################### +[*.{cs,vb}] +# Organize usings +dotnet_sort_system_directives_first = true +# this. preferences +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_property = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_event = false:silent +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent +dotnet_style_readonly_field = true:suggestion +# Expression-level preferences +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +############################### +# Naming Conventions # +############################### +# Style Definitions +dotnet_naming_style.pascal_case_style.capitalization = pascal_case +# Use PascalCase for constant fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields +dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.applicable_accessibilities = * +dotnet_naming_symbols.constant_fields.required_modifiers = const +############################### +# C# Coding Conventions # +############################### +[*.cs] +# var preferences +csharp_style_var_for_built_in_types = true:silent +csharp_style_var_when_type_is_apparent = true:silent +csharp_style_var_elsewhere = true:silent +# Expression-bodied members +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +# Pattern matching preferences +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +# Null-checking preferences +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion +# Modifier preferences +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion +# Expression-level preferences +csharp_prefer_braces = true:silent +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_pattern_local_over_anonymous_function = true:suggestion +csharp_style_inlined_variable_declaration = true:error +############################### +# C# Formatting Rules # +############################### +# New line preferences +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true +# Indentation preferences +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left +# Space preferences +csharp_space_after_cast = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +# Wrapping preferences +csharp_preserve_single_line_statements = true +csharp_preserve_single_line_blocks = true +############################### +# VB Coding Conventions # +############################### +[*.vb] +# Modifier preferences +visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion + + +# Verify settings +[*.{received,verified}.{txt,xml,json}] +charset = "utf-8-bom" +end_of_line = lf +indent_size = unset +indent_style = unset +insert_final_newline = false +tab_width = unset +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index bdb0cabc8..dea329be9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,3 +15,6 @@ *.PDF diff=astextplain *.rtf diff=astextplain *.RTF diff=astextplain + +# VerifyTests +*.verified.txt text eol=lf working-tree-encoding=UTF-8 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..af656d490 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @microsoft/openapi-write diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..a7d83e3dc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,24 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**OpenApi File To Reproduce** +Add the OpenApi file you're using or a link to it as well as the steps to reproduce the current behavior. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots/Code Snippets** +If applicable, add screenshots of the stack trace or a code snippet to help explain your problem. +If applicable, add a link to your project + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..021458556 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 000000000..12f65c04f --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,63 @@ +# Copilot Instructions + +## Commit Message Format + +Always use conventional commits format when creating commits. Follow this structure: + +``` +(): + +[optional body] + +[optional footer(s)] +``` + +### Types + +- **feat**: A new feature +- **fix**: A bug fix +- **docs**: Documentation only changes +- **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc) +- **refactor**: A code change that neither fixes a bug nor adds a feature +- **perf**: A code change that improves performance +- **test**: Adding missing tests or correcting existing tests +- **build**: Changes that affect the build system or external dependencies +- **ci**: Changes to CI configuration files and scripts +- **chore**: Other changes that don't modify src or test files + +### Scope + +The scope should indicate the package or area affected (e.g., `library`, `yaml-reader`, `hidi`). + +### Examples + +``` +feat(library): add support for pattern properties +fix(yaml-reader): updates boolean serialization +docs(README): update installation instructions +ci(release): configure automated release workflow +``` + +### Breaking Changes + +If a commit introduces a breaking change, add `BREAKING CHANGE:` in the footer or append `!` after the type/scope: + +``` +feat(identity-emitter)!: change output format for models + +BREAKING CHANGE: The emitter now generates TypeScript interfaces instead of types +``` + + +## Updating the benchmark information + +The user might request you update the benchmark information. You might do it on your own if a previous change added new properties to models under **src/Microsoft.OpenApi/Models**. Always use a separate commit for this change. + +To do so, run the following script: + +```shell +cd performance/benchmark +dotnet run -c Release +``` + +Then commit the report files using a "chore" commit. \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..22ae8e30f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,48 @@ +version: 2 +updates: +- package-ecosystem: github-actions + directory: / + open-pull-requests-limit: 10 + schedule: + interval: daily + groups: + codeql: + patterns: + - github/codeql-action* + cooldown: + default-days: 7 +- package-ecosystem: nuget + directory: / + open-pull-requests-limit: 10 + schedule: + interval: daily + groups: + MicrosoftExtensions: + patterns: + - Microsoft.Extensions.* + testing: + patterns: + - coverlet.* + - Microsoft.NET.Test.Sdk + - Microsoft.Testing.* + - xunit.* + cooldown: + default-days: 7 +- package-ecosystem: dotnet-sdk + directory: / + schedule: + interval: daily + ignore: + - dependency-name: '*' + update-types: + - version-update:semver-major + - version-update:semver-minor + cooldown: + default-days: 7 +- package-ecosystem: devcontainers + directory: / + open-pull-requests-limit: 10 + schedule: + interval: daily + cooldown: + default-days: 7 diff --git a/.github/policies/OpenAPI.NET-branch-protection.yml b/.github/policies/OpenAPI.NET-branch-protection.yml new file mode 100644 index 000000000..2d8fd2a73 --- /dev/null +++ b/.github/policies/OpenAPI.NET-branch-protection.yml @@ -0,0 +1,119 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +# File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1. + +name: OpenAPI.NET-branch-protection +description: Branch protection policy for the OpenAPI.NET repository +resource: repository +configuration: + branchProtectionRules: + + - branchNamePattern: main + # This branch pattern applies to the following branches as of approximately 02/27/2025 15:28:20: + # main + + # Specifies whether this branch can be deleted. boolean + allowsDeletions: false + # Specifies whether forced pushes are allowed on this branch. boolean + allowsForcePushes: false + # Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean + dismissStaleReviews: true + # Specifies whether admins can overwrite branch protection. boolean + isAdminEnforced: true + # Indicates whether "Require a pull request before merging" is enabled. boolean + requiresPullRequestBeforeMerging: true + # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required + requiredApprovingReviewsCount: 1 + # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean + requireCodeOwnersReview: true + # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. + requiresCommitSignatures: false + # Are conversations required to be resolved before merging? boolean + requiresConversationResolution: true + # Are merge commits prohibited from being pushed to this branch. boolean + requiresLinearHistory: false + # Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status + requiredStatusChecks: + - license/cla + - CodeQL + - Continuous Integration + # Require branches to be up to date before merging. boolean + requiresStrictStatusChecks: false + # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. + restrictsPushes: false + # Restrict who can dismiss pull request reviews. boolean + restrictsReviewDismissals: false + + - branchNamePattern: support/v1 + # This branch pattern applies to the following branches as of approximately 02/27/2025 15:28:20: + # support/v1 + + # Specifies whether this branch can be deleted. boolean + allowsDeletions: false + # Specifies whether forced pushes are allowed on this branch. boolean + allowsForcePushes: false + # Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean + dismissStaleReviews: true + # Specifies whether admins can overwrite branch protection. boolean + isAdminEnforced: true + # Indicates whether "Require a pull request before merging" is enabled. boolean + requiresPullRequestBeforeMerging: true + # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required + requiredApprovingReviewsCount: 1 + # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean + requireCodeOwnersReview: true + # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. + requiresCommitSignatures: false + # Are conversations required to be resolved before merging? boolean + requiresConversationResolution: true + # Are merge commits prohibited from being pushed to this branch. boolean + requiresLinearHistory: false + # Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status + requiredStatusChecks: + - license/cla + - CodeQL + - Continuous Integration + # Require branches to be up to date before merging. boolean + requiresStrictStatusChecks: false + # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. + restrictsPushes: false + # Restrict who can dismiss pull request reviews. boolean + restrictsReviewDismissals: false + + - branchNamePattern: support/v2 + # This branch pattern applies to the following branches as of approximately 02/27/2025 15:28:20: + # support/v1 + + # Specifies whether this branch can be deleted. boolean + allowsDeletions: false + # Specifies whether forced pushes are allowed on this branch. boolean + allowsForcePushes: false + # Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean + dismissStaleReviews: true + # Specifies whether admins can overwrite branch protection. boolean + isAdminEnforced: true + # Indicates whether "Require a pull request before merging" is enabled. boolean + requiresPullRequestBeforeMerging: true + # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required + requiredApprovingReviewsCount: 1 + # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean + requireCodeOwnersReview: true + # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. + requiresCommitSignatures: false + # Are conversations required to be resolved before merging? boolean + requiresConversationResolution: true + # Are merge commits prohibited from being pushed to this branch. boolean + requiresLinearHistory: false + # Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status + requiredStatusChecks: + - license/cla + - CodeQL + - Continuous Integration + # Require branches to be up to date before merging. boolean + requiresStrictStatusChecks: false + # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. + restrictsPushes: false + # Restrict who can dismiss pull request reviews. boolean + restrictsReviewDismissals: false + diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 000000000..0fc5c93a2 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,101 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'status:waiting-for-author-feedback' + - hasLabel: + label: 'status:no-recent-activity' + - noActivitySince: + days: 3 + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'status:waiting-for-author-feedback' + - noActivitySince: + days: 4 + - isNotLabeledWith: + label: 'status:no-recent-activity' + actions: + - addLabel: + label: 'status:no-recent-activity' + - addReply: + reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'status:duplicate' + - noActivitySince: + days: 1 + actions: + - addReply: + reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes. + - closeIssue + eventResponderTasks: + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'status:waiting-for-author-feedback' + - isOpen + then: + - addLabel: + label: 'Needs: Attention :wave:' + - removeLabel: + label: 'status:waiting-for-author-feedback' + description: + - if: + - payloadType: Issues + - not: + isAction: + action: Closed + - hasLabel: + label: 'status:no-recent-activity' + then: + - removeLabel: + label: 'status:no-recent-activity' + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: 'status:no-recent-activity' + then: + - removeLabel: + label: 'status:no-recent-activity' + description: + - if: + - payloadType: Pull_Request + then: + - inPrLabel: + label: WIP + description: +onFailure: +onSuccess: diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..0d19e6ac4 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,54 @@ +# Pull Request + + + +## Description + + +## Type of Change + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Documentation update +- [ ] Other (please describe): + +## Related Issue(s) + + +## Changes Made + +- +- +- + +## Testing + +- [ ] Unit tests added/updated +- [ ] Integration tests added/updated +- [ ] Manual testing performed +- [ ] All existing tests pass + +## Checklist + +- [ ] My code follows the code style of this project +- [ ] I have performed a self-review of my own code +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes + +## Versions applicability + +- [ ] My change applies to the version 1.X of the library, if so PR link: +- [ ] My change applies to the version 2.X of the library, if so PR link: +- [ ] My change applies to the version 3.X of the library, if so PR link: +- [ ] I have evaluated the applicability of my change against the other versions above. + +See [the contributing guidelines](https://github.com/microsoft/OpenAPI.NET/blob/main/CONTRIBUTING.md) for more information about how patches are applied across multiple versions. + +## Additional Notes + \ No newline at end of file diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 000000000..ce23f6ec0 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,10 @@ +manifest: true +primaryBranch: main +handleGHRelease: true +branches: + - branch: support/v1 + manifest: true + handleGHRelease: true + - branch: support/v2 + manifest: true + handleGHRelease: true \ No newline at end of file diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml new file mode 100644 index 000000000..f6dafa170 --- /dev/null +++ b/.github/workflows/auto-merge-dependabot.yml @@ -0,0 +1,32 @@ +name: Auto-merge dependabot updates + +on: + pull_request: + branches: [ main ] + +permissions: + pull-requests: write + contents: write + +jobs: + + dependabot-merge: + + runs-on: ubuntu-latest + + if: ${{ github.actor == 'dependabot[bot]' }} + + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: Enable auto-merge for Dependabot PRs + # Only if version bump is not a major version change + if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}} + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 000000000..b77f7d85e --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,146 @@ +name: CI/CD Pipeline + +on: [push, pull_request, workflow_dispatch] + +permissions: + contents: read + +jobs: + ci: + name: Continuous Integration + runs-on: ubuntu-latest + permissions: + contents: read + code-quality: write + pull-requests: read + env: + ARTIFACTS_FOLDER: ${{ github.workspace }}/Artifacts + GITHUB_RUN_NUMBER: ${{ github.run_number }} + steps: + - name: Setup .NET 8 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: 8.x + + - name: Setup .NET 10 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: 10.x + + - name: Checkout repository + id: checkout_repo + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Build projects + id: build_projects + shell: pwsh + run: | + dotnet build Microsoft.OpenApi.slnx -c Release + + - name: Run unit tests + id: run_unit_tests + shell: pwsh + run: | + dotnet test --solution Microsoft.OpenApi.slnx -c Release -v n --results-directory=./TestResults --coverlet --coverlet-output-format cobertura --report-gh + + - name: Install report generator + shell: pwsh + run: | + dotnet tool install --global dotnet-reportgenerator-globaltool + + - name: Generate coverage report + shell: pwsh + run: | + reportgenerator -reports:./TestResults/**/coverage.cobertura.*.xml -targetdir:./reports/coverage -reporttypes:"Html;MarkdownSummaryGithub;Cobertura" + + - name: Add coverage to job summary + shell: bash + run: | + cat ./reports/coverage/SummaryGithub.md >> "$GITHUB_STEP_SUMMARY" + + - name: Upload coverage report + if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') || (github.event_name != 'pull_request' && github.ref_name == github.event.repository.default_branch) + uses: actions/upload-code-coverage@2b21a77928be8d5168c2b9581a67f2adbebacc52 # v1.4.4 + with: + file: ./reports/coverage/Cobertura.xml + language: CSharp + label: code-coverage/dotnet + + - name: Upload coverage artifact + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: coverage + path: reports/coverage + + validate-trimming: + name: Validate Project for Trimming + runs-on: windows-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Setup .NET 8 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: 8.x + + - name: Setup .NET 10 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: 10.x + + - name: Validate Trimming warnings + run: dotnet publish -c Release -r win-x64 /p:TreatWarningsAsErrors=true /warnaserror -f net10.0 + working-directory: ./test/Microsoft.OpenApi.Trimming.Tests + + validate-performance: + name: Validate performance of the library + runs-on: ubuntu-latest + needs: [ci] + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Setup .NET 8 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: 8.x + + - name: Setup .NET 10 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: 10.x + + - name: Copy committed results + run: | + mkdir -p ./performanceResults + cp -r ./performance/benchmark/BenchmarkDotNet.Artifacts/results/* ./performanceResults + + - name: Run performance tests + run: | + dotnet run -c Release + working-directory: ./performance/benchmark + + - name: Publish benchmark results + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + if-no-files-found: error + name: benchmark-results + path: "${{ github.workspace }}/performance/benchmark/BenchmarkDotNet.Artifacts/results" + + - name: Run comparison tool for empty models + run: dotnet run -c Release --project ./performance/resultsComparer/resultsComparer.csproj -- compare $OLD_REPORT $NEW_REPORT -p IdenticalMemoryUsage + shell: bash + env: + NEW_REPORT: "${{ github.workspace }}/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.json" + OLD_REPORT: "${{ github.workspace }}/performanceResults/performance.EmptyModels-report.json" + + - name: Run comparison tool for descriptions + run: dotnet run -c Release --project ./performance/resultsComparer/resultsComparer.csproj -- compare $OLD_REPORT $NEW_REPORT -p ZeroPointTwoPercentDifferenceMemoryUsage + shell: bash + env: + NEW_REPORT: "${{ github.workspace }}/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.json" + OLD_REPORT: "${{ github.workspace }}/performanceResults/performance.Descriptions-report.json" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..d7bd4b843 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,58 @@ +name: CodeQL Analysis + +on: + push: + branches: [ main, support/v1, support/v2 ] + pull_request: + schedule: + - cron: '0 8 * * *' + workflow_dispatch: + +permissions: + contents: read # these permissions are required to run the codeql analysis + actions: read + security-events: write + +jobs: + analyze: + name: CodeQL Analysis + runs-on: ubuntu-latest + steps: + - name: Checkout repository + id: checkout_repo + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Setup .NET 8 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: 8.0.x + + - name: Setup .NET 10 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: 10.0.x + + - name: Initialize CodeQL + id: init_codeql + uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 + with: + queries: security-and-quality + + - name: Build projects + id: build_projects + shell: pwsh + run: | + $projectsArray = @( + '.\src\Microsoft.OpenApi\Microsoft.OpenApi.csproj', + '.\src\Microsoft.OpenApi.YamlReader\Microsoft.OpenApi.YamlReader.csproj' + ) + + $projectsArray | ForEach-Object { + dotnet build $PSItem -c Release + } + + - name: Perform CodeQL Analysis + id: analyze_codeql + uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 + +# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation) \ No newline at end of file diff --git a/.github/workflows/promote-shipped-apis.yml b/.github/workflows/promote-shipped-apis.yml new file mode 100644 index 000000000..825b8944f --- /dev/null +++ b/.github/workflows/promote-shipped-apis.yml @@ -0,0 +1,126 @@ +name: Promote Shipped APIs + +on: + push: + branches: + - main + - support/v2 + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +jobs: + promote-apis: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + client-id: ${{ vars.RELEASE_PLEASE_TOKEN_PROVIDER_APP_ID }} + private-key: ${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM }} + permission-contents: write + permission-pull-requests: write + + - name: Get GitHub App user ID + id: get-user-id + shell: bash + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" + + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + token: ${{ steps.app-token.outputs.token }} + + - name: Configure git + shell: pwsh + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: | + git config --global user.name "${{ steps.app-token.outputs.app-slug }}[bot]" + git config --global user.email "${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com" + git config --global url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/".insteadOf "https://github.com/" + + - name: Check for existing PR + id: check_pr + shell: pwsh + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: | + $branch = "${{ github.ref_name }}" + $prs = gh pr list --state open --head "promote-shipped-apis-$branch" --json number --jq '.[0].number' 2>$null + if ($prs) { + echo "pr_number=$prs" >> $env:GITHUB_OUTPUT + echo "pr_exists=true" >> $env:GITHUB_OUTPUT + Write-Host "Found existing PR: $prs" + } else { + echo "pr_exists=false" >> $env:GITHUB_OUTPUT + Write-Host "No existing PR found" + } + + - name: Checkout existing PR branch + if: steps.check_pr.outputs.pr_exists == 'true' + shell: pwsh + run: | + $branch = "${{ github.ref_name }}" + $prBranch = "promote-shipped-apis-$branch" + + git fetch origin + git checkout $prBranch + + - name: Merge trigger branch into PR branch + if: steps.check_pr.outputs.pr_exists == 'true' + shell: pwsh + run: | + $branch = "${{ github.ref_name }}" + git merge origin/$branch -m "Merge $branch into promote branch" + + - name: Run promote unshipped script + shell: pwsh + run: | + & .\scripts\promoteUnshipped.ps1 + + - name: Check for changes + id: check_changes + shell: pwsh + run: | + $changes = git diff --name-only -- "*Shipped.txt" + if ($changes) { + echo "has_changes=true" >> $env:GITHUB_OUTPUT + Write-Host "Changed files: $changes" + } else { + echo "has_changes=false" >> $env:GITHUB_OUTPUT + Write-Host "No changes detected" + } + + - name: Commit and push changes + if: steps.check_changes.outputs.has_changes == 'true' + shell: pwsh + run: | + git add *hipped.txt + git commit -m "chore: promote shipped APIs" + + $branch = "${{ github.ref_name }}" + $prBranch = "promote-shipped-apis-$branch" + git push -u origin HEAD:$prBranch + + - name: Create new PR + if: steps.check_pr.outputs.pr_exists == 'false' && steps.check_changes.outputs.has_changes == 'true' + shell: pwsh + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: | + $branch = "${{ github.ref_name }}" + $prBranch = "promote-shipped-apis-$branch" + $title = "automatic promotion of shipped APIs for $branch" + + gh pr create --title "$title" --base "$branch" --head "$prBranch" --body "Automatically promotes unshipped APIs to shipped after running the promotion script." + diff --git a/.github/workflows/release-please-gha.yml b/.github/workflows/release-please-gha.yml new file mode 100644 index 000000000..74a6233fb --- /dev/null +++ b/.github/workflows/release-please-gha.yml @@ -0,0 +1,76 @@ +## ----------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE.txt in the project root for license information. +## ----------------------------------------------------------------------------- +# +# Summary: +# This GitHub Actions workflow automates the release process using Release Please. +# It triggers on pushes to the main branch, generates a GitHub App token using organization +# variables and secrets, and then runs the release-please-action to manage versioning and changelogs. + +name: Release Please + +on: + push: + branches: + - main + - support/v1 + - support/v2 + workflow_dispatch: + +permissions: + contents: read + +jobs: + check-secret: + runs-on: ubuntu-latest + outputs: + has-token: ${{ steps.check.outputs.has-token }} + steps: + - id: check + run: echo "has-token=${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM != '' }}" >> $GITHUB_OUTPUT + release: + needs: check-secret + if: needs.check-secret.outputs.has-token == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Validate PublicAPI.Unshipped.txt files are empty + shell: pwsh + run: | + $unshippedFiles = Get-ChildItem 'src/ ' -Recurse -Filter *.Unshipped.txt | Select -ExpandProperty FullName + + $hasUnshippedAPIs = $false + + foreach ($file in $unshippedFiles) { + $content = Get-Content -Path $file -Raw + # Remove the #nullable enable line and any whitespace + $trimmedContent = $content -replace '^\s*#nullable enable\s*$', '' -replace '^\s+', '' + + if ($trimmedContent -ne '') { + Write-Error "❌ $file contains unshipped APIs. Please promote them to PublicAPI.Shipped.txt before releasing.`nContent:`n$content" + $hasUnshippedAPIs = $true + } + } + + if ($hasUnshippedAPIs) { + exit 1 + } + + Write-Output "✅ All PublicAPI.Unshipped.txt files are clean" + + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + client-id: ${{ vars.RELEASE_PLEASE_TOKEN_PROVIDER_APP_ID }} + private-key: ${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM }} + + - name: Release Please + uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 + with: + token: ${{ steps.app-token.outputs.token }} + config-file: release-please-config.json + manifest-file: .release-please-manifest.json + target-branch: ${{ github.ref_name }} diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 000000000..a6954d70d --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,70 @@ +name: Sonarcloud +on: + workflow_dispatch: + push: + branches: + - main + paths-ignore: ['.vscode/**'] + pull_request: + types: [opened, synchronize, reopened] + paths-ignore: ['.vscode/**'] + + +permissions: + contents: read + pull-requests: read + +env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + +jobs: + checksecret: + name: check if SONAR_TOKEN is set in github secrets + runs-on: ubuntu-latest + outputs: + is_SONAR_TOKEN_set: ${{ steps.checksecret_job.outputs.is_SONAR_TOKEN_set }} + steps: + - name: Check whether unity activation requests should be done + id: checksecret_job + run: | + echo "is_SONAR_TOKEN_set=${{ env.SONAR_TOKEN != '' }}" >> $GITHUB_OUTPUT + build: + needs: [checksecret] + if: needs.checksecret.outputs.is_SONAR_TOKEN_set == 'true' + name: Build + runs-on: windows-latest + steps: + - name: Set up JDK 17 + uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 + with: + distribution: 'temurin' + java-version: 17 + - name: Setup .NET 8 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: 8.0.x + - name: Setup .NET 10 + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: 10.0.x + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Cache SonarCloud packages + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Install SonarCloud scanner + run: dotnet tool install dotnet-sonarscanner --create-manifest-if-needed + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + shell: pwsh + run: | + dotnet tool run dotnet-sonarscanner begin /k:"microsoft_OpenAPI.NET" /o:"microsoft" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="**/coverage.opencover*.xml" + dotnet workload restore + dotnet build + dotnet test --solution Microsoft.OpenApi.slnx --verbosity normal --coverlet --coverlet-output-format opencover --report-gh + dotnet tool run dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" diff --git a/.gitignore b/.gitignore index 940794e60..09353aba3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore # User-specific files *.suo @@ -88,6 +88,7 @@ ipch/ *.VC.VC.opendb # Visual Studio profiler +*.diagsession *.psess *.vsp *.vspx @@ -126,7 +127,7 @@ nCrunchTemp_* *.mm.* AutoTest.Net/ -# Web workbench (sass) +# Sass cache .sass-cache/ # Installshield output folder @@ -286,3 +287,7 @@ __pycache__/ *.btm.cs *.odx.cs *.xsd.cs + +# BenchmarkDotNet profiler files +*.nettrace +*.speedscope.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 000000000..f7929cb4c --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "3.10.2" +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..fb87186c4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,42 @@ +{ + "version": "0.2.0", + "configurations": [ + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/main/debugger-launchjson.md + "name": "Launch Benchmark", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/performance/benchmark/bin/Release/net8.0/PerformanceTests.dll", + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false, + }, + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/main/debugger-launchjson.md + "name": "Launch Results comparer", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/performance/resultsComparer/bin/Debug/net8.0/resultsComparer.dll", + "cwd": "${workspaceFolder}/performance/resultsComparer", + "args": ["compare"], + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false, + "requireExactSource": false, + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..4bfa8971f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "workbench.colorCustomizations": { + "activityBar.background": "#03323C", + "titleBar.activeBackground": "#054754", + "titleBar.activeForeground": "#F0FCFE" + }, + "cSpell.words": [ + "csdl", + "Xunit" + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 358fd0e1a..4372c2f45 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -5,23 +5,30 @@ "tasks": [ { "label": "build", - "type": "shell", - "command": "msbuild", + "command": "dotnet", + "type": "process", + "group": "build", "args": [ + "build", + "${workspaceFolder}/Microsoft.OpenApi.slnx", "/property:GenerateFullPaths=true", - "/t:build" + "/consoleloggerparameters:NoSummary" ], - "group": "build", - "presentation": { - "reveal": "silent" - }, "problemMatcher": "$msCompile" }, { - "label": "workbench", - "type": "shell", - "command": "src/Microsoft.OpenApi.WorkBench/bin/Debug/Microsoft.OpenApi.WorkBench.exe", - "problemMatcher": [] + "label": "test", + "command": "dotnet", + "type": "process", + "group": "test", + "args": [ + "test", + "${workspaceFolder}/Microsoft.OpenApi.slnx", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary", + "--collect:\"XPlat Code Coverage\"" + ], + "problemMatcher": "$msCompile" } ] } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..0077ae140 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,909 @@ +# Changelog + +## [3.10.2](https://github.com/microsoft/OpenAPI.NET/compare/v3.10.1...v3.10.2) (2026-08-20) + + +### Bug Fixes + +* duplicate schema example when serializing to v2 ([#3045](https://github.com/microsoft/OpenAPI.NET/issues/3045)) ([50f5a2b](https://github.com/microsoft/OpenAPI.NET/commit/50f5a2bb119089bb48987494d906cb1a95cddbd1)) + +## [3.10.1](https://github.com/microsoft/OpenAPI.NET/compare/v3.10.0...v3.10.1) (2026-08-19) + + +### Bug Fixes + +* circular ref guard ([#3033](https://github.com/microsoft/OpenAPI.NET/issues/3033)) ([8018d40](https://github.com/microsoft/OpenAPI.NET/commit/8018d40aac5fc6ed5e022e6203ee917ecf36472c)) +* harden yaml parsing ([#3027](https://github.com/microsoft/OpenAPI.NET/issues/3027)) ([e0d5e9d](https://github.com/microsoft/OpenAPI.NET/commit/e0d5e9d105ad1a7b29ff6c628793614f5610f048)) + +## [3.10.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.9.0...v3.10.0) (2026-08-11) + + +### Features + +* do not ignore multiple types when serializing to 3.0 ([#2960](https://github.com/microsoft/OpenAPI.NET/issues/2960)) ([ebaf27a](https://github.com/microsoft/OpenAPI.NET/commit/ebaf27ac46f8820e7b817cc33e693632c2fc908a)) + + +### Bug Fixes + +* bound YAML anchor/alias expansion to prevent OOM (billion laughs) ([#3000](https://github.com/microsoft/OpenAPI.NET/issues/3000)) ([2179326](https://github.com/microsoft/OpenAPI.NET/commit/21793261d6860fb6e607b71fd95c0bd320724764)) + +## [3.9.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.8.0...v3.9.0) (2026-07-15) + + +### Features + +* adds support for anchor and id external resolution ([1591007](https://github.com/microsoft/OpenAPI.NET/commit/15910070f2bf3006f79e1c43dd9c2b56e45d665c)) +* **schema:** resolve bare $dynamicRef via $dynamicAnchor index ([#2913](https://github.com/microsoft/OpenAPI.NET/issues/2913)) ([eacc2fc](https://github.com/microsoft/OpenAPI.NET/commit/eacc2fc06537fbb11fe95765e4fb6df09861c9af)) +* support relative URI resolution in $dynamicRef ([#2928](https://github.com/microsoft/OpenAPI.NET/issues/2928)) ([#2945](https://github.com/microsoft/OpenAPI.NET/issues/2945)) ([821053b](https://github.com/microsoft/OpenAPI.NET/commit/821053ba02129e92868df2ae0c26551fb3d5276a)) + + +### Bug Fixes + +* adds explicit error message for invalid json pointers ([63fc55d](https://github.com/microsoft/OpenAPI.NET/commit/63fc55d69274ebd405e677983e0a72efd2b96079)) +* adds explicit error message for invalid json pointers ([bc93efe](https://github.com/microsoft/OpenAPI.NET/commit/bc93efe9d4694e89da1ea30fbc2d031e7f1318ae)) +* default mapping is not being serialized with the correct shape ([fe4a25f](https://github.com/microsoft/OpenAPI.NET/commit/fe4a25f1f25c853404540d30f11812f1208f93c9)) +* differentiate unset value from null value in OpenApiSchema.Const ([#2936](https://github.com/microsoft/OpenAPI.NET/issues/2936)) ([07b525f](https://github.com/microsoft/OpenAPI.NET/commit/07b525f568b65b5003deaccc56829f5e7e8e2641)) +* handle nullability more accurately during serialization for 3.0/2.0 ([#2933](https://github.com/microsoft/OpenAPI.NET/issues/2933)) ([0ace243](https://github.com/microsoft/OpenAPI.NET/commit/0ace243ebbabe82aacc52d49fe58f54f039bdf76)) +* validate required properties of security scheme before serialization ([#2952](https://github.com/microsoft/OpenAPI.NET/issues/2952)) ([f31b192](https://github.com/microsoft/OpenAPI.NET/commit/f31b192e9d59d39671fdfd03b4fa4d309b03021b)) + +## [3.8.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.7.0...v3.8.0) (2026-07-03) + + +### Features + +* add JsonConverter for OpenApiSchema System.Text.Json serialization ([#2915](https://github.com/microsoft/OpenAPI.NET/issues/2915)) ([2f8b3d2](https://github.com/microsoft/OpenAPI.NET/commit/2f8b3d2a160f5b44b5aeaa3d83ff2025302ce1e2)) +* **library:** support schema keywords on references ([434b2f8](https://github.com/microsoft/OpenAPI.NET/commit/434b2f8b34e4a3a27bd99e43f61692f0b00c3054)) +* **library:** support schema keywords on references ([66a9d04](https://github.com/microsoft/OpenAPI.NET/commit/66a9d04036556945ee3222849b7d071a30016b81)), closes [#2903](https://github.com/microsoft/OpenAPI.NET/issues/2903) + + +### Bug Fixes + +* Don't silently skip null assignment to OpenApiDocument.Tags ([3764142](https://github.com/microsoft/OpenAPI.NET/commit/37641424837df0b5e142ca130cb16df699bdb09f)) +* handling of nullable enums for 3.0 ([#2920](https://github.com/microsoft/OpenAPI.NET/issues/2920)) ([beb68f5](https://github.com/microsoft/OpenAPI.NET/commit/beb68f52b86c1437e50f7561d9be1ebdbe146963)) +* **library:** keep v3 schema references ref-only ([c938727](https://github.com/microsoft/OpenAPI.NET/commit/c9387274be6a6955952174d677bea0a35bda2624)) +* preserve JSON Schema 2020-12 keyword siblings on $ref schemas for OAS 3.1+ ([#2896](https://github.com/microsoft/OpenAPI.NET/issues/2896)) ([08160c8](https://github.com/microsoft/OpenAPI.NET/commit/08160c872a5f931eecd12446335c2f51fdad083e)) +* use async method for crypto flush ([6e675d9](https://github.com/microsoft/OpenAPI.NET/commit/6e675d943537312386c9683790848ad1cbacb713)) + +## [3.7.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.6.0...v3.7.0) (2026-06-10) + + +### Features + +* add contains/minContains/maxContains members ([78475e3](https://github.com/microsoft/OpenAPI.NET/commit/78475e38f7c61e349f2d2ad477b5a96a9c3df848)) +* add contains/minContains/maxContains members ([1a974f8](https://github.com/microsoft/OpenAPI.NET/commit/1a974f8dfcd7850c70d80133ceecee08f6671cd7)) +* **library:** add missing json schema properties ([9b1aed6](https://github.com/microsoft/OpenAPI.NET/commit/9b1aed61041551b06926fc2ee4e12705190e16b3)) +* **library:** add missing json schema properties ([82f84e0](https://github.com/microsoft/OpenAPI.NET/commit/82f84e072d9f6b4b5907e9435212fbfc8f82d9c7)) + + +### Bug Fixes + +* **library:** always copy unevaluated properties ([4907d1c](https://github.com/microsoft/OpenAPI.NET/commit/4907d1c1c4d5b8450d32459752e64e5beb592f46)) +* **library:** avoid false circular refs for external schema re-exports ([b635242](https://github.com/microsoft/OpenAPI.NET/commit/b635242a402c3c468eb86dcf2b6d94a05717d92e)) +* **library:** avoid false circular refs for external schema re-exports ([7a443c2](https://github.com/microsoft/OpenAPI.NET/commit/7a443c298fb87346338095b5df86f6608fb4d582)) +* **library:** remove unshipped schema extension fallback ([cf54bb3](https://github.com/microsoft/OpenAPI.NET/commit/cf54bb3e2746c0f6c7a60fde5bcc7fa1139dd8b6)) +* **library:** use version-specific schema keyword callbacks ([6e22ec6](https://github.com/microsoft/OpenAPI.NET/commit/6e22ec6948509d2e256932ee55f1781a544cb53f)) +* **library:** use x-jsonschema schema extensions ([eb1891a](https://github.com/microsoft/OpenAPI.NET/commit/eb1891a8d77915add1cdd88949b40aa43cd525b8)) + +## [3.6.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.5.5...v3.6.0) (2026-06-01) + + +### Features + +* **reader:** remove ParseNode infrastructure ([9b4f45b](https://github.com/microsoft/OpenAPI.NET/commit/9b4f45bee83106e2e5309c9583220f690c66c716)) + +## [3.5.5](https://github.com/microsoft/OpenAPI.NET/compare/v3.5.4...v3.5.5) (2026-05-28) + + +### Bug Fixes + +* **reader:** preserve Null flag when nullable appears before type in V3.0/V3.1/V3.2 deserializers ([2b9d7f4](https://github.com/microsoft/OpenAPI.NET/commit/2b9d7f46bfcef3e2d5da3f73fd4bf83be677c79a)) + +## [3.5.4](https://github.com/microsoft/OpenAPI.NET/compare/v3.5.3...v3.5.4) (2026-05-26) + + +### Bug Fixes + +* **library:** handle circular schema references ([b3cd42b](https://github.com/microsoft/OpenAPI.NET/commit/b3cd42b7c2405b800e633ce63b044bb2409034a0)) +* **library:** handle circular schema references ([91a989f](https://github.com/microsoft/OpenAPI.NET/commit/91a989fdf412a1267debe925d2d586292fdd297d)) + +## [3.5.3](https://github.com/microsoft/OpenAPI.NET/compare/v3.5.2...v3.5.3) (2026-04-27) + + +### Bug Fixes + +* null reference exception for boolean component schemas ([f97f91a](https://github.com/microsoft/OpenAPI.NET/commit/f97f91a9f785b88039968024d5d1f4af51332631)) +* null reference exception for boolean component schemas ([fe0b50a](https://github.com/microsoft/OpenAPI.NET/commit/fe0b50aae372e5b08625f888ae424f22da759cdf)) +* **schema:** support boolean schemas in deserializer for OpenAPI 3.1/3.2 ([05b44be](https://github.com/microsoft/OpenAPI.NET/commit/05b44beb9783f5bab1d8988b3cb916d0278d42ce)) + + +### Performance Improvements + +* **schema:** optimize boolean schema deserialization ([7316e3f](https://github.com/microsoft/OpenAPI.NET/commit/7316e3f0e7b9acc11bc1e0255d7ca33837a1bbdc)) + +## [3.5.2](https://github.com/microsoft/OpenAPI.NET/compare/v3.5.1...v3.5.2) (2026-04-14) + + +### Bug Fixes + +* **hidi:** update Microsoft.OpenApi.OData to 3.2.1 ([b0a68fb](https://github.com/microsoft/OpenAPI.NET/commit/b0a68fbe53593139ba51e758bcc01fcd188d7cb8)) +* **hidi:** update Microsoft.OpenApi.OData to 3.2.1 ([8c22ab2](https://github.com/microsoft/OpenAPI.NET/commit/8c22ab2b3a885344197bf0f05d6df63ecb771927)), closes [#2811](https://github.com/microsoft/OpenAPI.NET/issues/2811) + +## [3.5.1](https://github.com/microsoft/OpenAPI.NET/compare/v3.5.0...v3.5.1) (2026-03-31) + + +### Bug Fixes + +* security scheme references serialization ([a5acb89](https://github.com/microsoft/OpenAPI.NET/commit/a5acb896cb46a58702c07bc742b5e114ba90f95a)) + +## [3.5.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.4.0...v3.5.0) (2026-03-20) + + +### Features + +* **library:** add Extensions support for schema references in v3.1/v3.2; add SerializeAsV32 with loop detection ([9b422bf](https://github.com/microsoft/OpenAPI.NET/commit/9b422bfbe1459588821ab011ba470336c63e4958)) + + +### Bug Fixes + +* a bug where path parameter validation would fail if they contained forbidden JSON pointer characters ([ef55b2c](https://github.com/microsoft/OpenAPI.NET/commit/ef55b2ce664014a854dbd4275e3fed783bc53385)) +* a bug where path parameter validation would fail if they contained forbidden JSON pointer characters ([4b3164a](https://github.com/microsoft/OpenAPI.NET/commit/4b3164a76b316951cb043aebf950663a17e51c90)) +* double encoding of json pointer for invalid reference rule ([b246cd0](https://github.com/microsoft/OpenAPI.NET/commit/b246cd0bafde78892aa22e6ffe046cf5a438eb7d)) +* encoding of special characters for JSON paths ([4c757e1](https://github.com/microsoft/OpenAPI.NET/commit/4c757e1e9806f95ed598f349e4fc35a0307b9342)) +* **library:** do not emit unevaluatedProperties for non-object schemas ([852fb4c](https://github.com/microsoft/OpenAPI.NET/commit/852fb4c744c51099a629d90797a2803d3bbdfc2a)) +* **library:** do not emit unevaluatedProperties for non-object schemas ([19538aa](https://github.com/microsoft/OpenAPI.NET/commit/19538aa169b708dac3baf04a1315bed1dd25eac6)) +* **library:** enforce spec-compliant $ref serialization; add Extensions support for schema references in v3.1/v3.2 ([9bf61de](https://github.com/microsoft/OpenAPI.NET/commit/9bf61de9c10092f744ab38fe0a41bd6adb8351d4)) +* potential double encoding of paths ([471a61a](https://github.com/microsoft/OpenAPI.NET/commit/471a61a2567bb517ede94f0bec1a53ef806b2db3)) + +## [3.4.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.3.1...v3.4.0) (2026-03-04) + + +### Features + +* **library:** preserve PatternProperties as x-jsonschema-patternProperties extension for OpenAPI v2/v3.0 serialization ([d969fdc](https://github.com/microsoft/OpenAPI.NET/commit/d969fdc12632ad0879b9fe07d3ab736b21ae68cf)) +* **library:** Preserve PatternProperties via x-jsonschema-patternProperties extension for OpenAPI v2/v3.0 ([16ab5e4](https://github.com/microsoft/OpenAPI.NET/commit/16ab5e42bdef6e08e2afaf7ad3921ac8178f059c)) +* **securityscheme:** add oauth2MetadataUrl support (OpenAPI 3.2) ([4509488](https://github.com/microsoft/OpenAPI.NET/commit/4509488f2e8725e37a60a3b7a3a8a0b6c0c74378)) + + +### Bug Fixes + +* implement unevaluatedProperties as schema per JSON Schema 2020-12 ([#2728](https://github.com/microsoft/OpenAPI.NET/issues/2728)) ([7c13fb3](https://github.com/microsoft/OpenAPI.NET/commit/7c13fb3910685b5c17897cd7799b9ef1bba7f80d)) +* **library:** serialize additionalProperties schema in OpenAPI V2 ([f3165fa](https://github.com/microsoft/OpenAPI.NET/commit/f3165fa874a8bb76788684742492f48b20aab892)) +* **library:** serialize additionalProperties schema in OpenAPI V2 documents ([3d07756](https://github.com/microsoft/OpenAPI.NET/commit/3d0775610a9e74b6d5ce845195ccb935576bcd31)) +* optimize parsing V3.1 documents by reducing GetLocation method allocation on hot path([#2748](https://github.com/microsoft/OpenAPI.NET/issues/2748)) ([f690681](https://github.com/microsoft/OpenAPI.NET/commit/f6906811e616f8e6875b8d839137c846fc7bbd9e)) + +## [3.3.1](https://github.com/microsoft/OpenAPI.NET/compare/v3.3.0...v3.3.1) (2026-01-22) + + +### Features + +* **models:** add shared Content interface ([#2695](https://github.com/microsoft/OpenAPI.NET/issues/2695)) ([338566f](https://github.com/microsoft/OpenAPI.NET/commit/338566fafce04ee1329f4ead61fe1e87e01144ad)) + + +### Bug Fixes + +* broken binary compatibility due to interface changes in previous version ([d96bba7](https://github.com/microsoft/OpenAPI.NET/commit/d96bba72c383cd5db2b7032530aee3b4d944ebc6)) + +## [3.3.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.2.0...v3.3.0) (2026-01-21) + + +### Features + +* **models:** add shared Content interface ([9e13b25](https://github.com/microsoft/OpenAPI.NET/commit/9e13b2574e68387ecc01c453b571208c40124b46)) +* **models:** add shared Content interface ([#2695](https://github.com/microsoft/OpenAPI.NET/issues/2695)) ([9e13b25](https://github.com/microsoft/OpenAPI.NET/commit/9e13b2574e68387ecc01c453b571208c40124b46)) +* **models:** support mutualTLS security scheme ([a4efdfe](https://github.com/microsoft/OpenAPI.NET/commit/a4efdfe43ee310fba4bb643d9fd28ce92da32338)) + +## [3.2.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.3...v3.2.0) (2026-01-19) + + +### Features + +* hidi validate command now logs warnings ([76a3c0f](https://github.com/microsoft/OpenAPI.NET/commit/76a3c0fe33a6c953263d9d91669b2f1bab562a79)) +* hidi validate command now logs warnings ([62e7d56](https://github.com/microsoft/OpenAPI.NET/commit/62e7d56ac0863875999240d68a2766d2cc2d594c)) + + +### Bug Fixes + +* discriminator property validation fails any/allOf cases when it shouldn't ([fb6cecc](https://github.com/microsoft/OpenAPI.NET/commit/fb6cecccafd5713bc1eb22e0cf07619cf495ebb5)) +* discriminator property validation fails any/allOf cases when it shouldn't ([a8fb81c](https://github.com/microsoft/OpenAPI.NET/commit/a8fb81cf9524a3f2f721aa808db244434e1cd177)) + +## [3.1.3](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.2...v3.1.3) (2026-01-16) + + +### Bug Fixes + +* Support custom tag ordering ([008576c](https://github.com/microsoft/OpenAPI.NET/commit/008576c31f8dcecf59363c9c2f85d691601faa73)) +* Support custom tag ordering ([7610d07](https://github.com/microsoft/OpenAPI.NET/commit/7610d07bd11a99a4ce1cc31338d180dbd764d952)) + +## [3.1.2](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.1...v3.1.2) (2026-01-06) + +### Bug Fixes + +* correct error pointer when extension parser throws OpenApiException ([43c75a9](https://github.com/microsoft/OpenAPI.NET/commit/43c75a90746344fcc975611100e995fe4045edf0)) +* wrap extension parser calls in try-catch to ensure correct error pointers ([50b44aa](https://github.com/microsoft/OpenAPI.NET/commit/50b44aad12d8fa86a46f7f6d62896a7b1c344d2e)) + +## [3.1.1](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.0...v3.1.1) (2025-12-18) + + +### Bug Fixes + +* **schema:** always serialize `additionalProperties: false` ([6651c36](https://github.com/microsoft/OpenAPI.NET/commit/6651c36ff341329c053776d65b36b1b7fa9dd3ea)) +* **schema:** always serialize `additionalProperties: false` ([e36fc95](https://github.com/microsoft/OpenAPI.NET/commit/e36fc9565bce42916eb7bf64d1f74d491dd1f407)) + +## [3.1.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.0.3...v3.1.0) (2025-12-17) + +### Features + +* Add `type: "null"` downcasting when in oneOf and anyOf for OpenAPI v3 ([782cf8d](https://github.com/microsoft/OpenAPI.NET/commit/782cf8d1ff8166e3c7be706e08dabf168b9616a4)) + +## [3.0.3](https://github.com/microsoft/OpenAPI.NET/compare/v3.0.2...v3.0.3) (2025-12-16) + + +* load JSON documents that are preceded by multiple whitespace ([6461bac](https://github.com/microsoft/OpenAPI.NET/commit/6461bac01c4176424210e9ac249698f665a514a6)) +* non-seekable json streams would fail to load as a document ([2436d73](https://github.com/microsoft/OpenAPI.NET/commit/2436d7382bfbf8b9ba501d88f682e952bdf27146)) +* reading streams in an asp.net context would cause async exceptions ([f9e5248](https://github.com/microsoft/OpenAPI.NET/commit/f9e524859722476b3111cb6006f77208c2d1f526)) + +## [3.0.2](https://github.com/microsoft/OpenAPI.NET/compare/v3.0.1...v3.0.2) (2025-12-08) + +### Bug Fixes + +* additional properties serialization should not emit a schema in v2 ([946cba9](https://github.com/microsoft/OpenAPI.NET/commit/946cba992a2733a60182453e38722b4ed789b729)) +* additional properties serialization should not emit booleans in v3.1+ ([946cba9](https://github.com/microsoft/OpenAPI.NET/commit/946cba992a2733a60182453e38722b4ed789b729)) + +## [3.0.1](https://github.com/microsoft/OpenAPI.NET/compare/v3.0.0...v3.0.1) (2025-11-17) + +### Bug Fixes + +* empty strings should be quoted in yaml ([8d215f9](https://github.com/microsoft/OpenAPI.NET/commit/8d215f9ea8a780b1e2e8dd6cefb8d470cc35682d)) +* empty strings should be quoted in yaml ([0ca10db](https://github.com/microsoft/OpenAPI.NET/commit/0ca10db3bb9ffa937dd35862068926f3586d6991)) + +## [3.0.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.9...v3.0.0) (2025-11-11) + +### ⚠ BREAKING CHANGES + +* adds support for OpenAPI 3.2.0 + +> Note: Please refer to the [upgrade guide](https://github.com/microsoft/OpenAPI.NET/blob/main/docs/upgrade-guide-3.md) for a detailed description of the breaking changes. + +> Note: ASP.net users should remain on version 1.X for ASP.net < 10, and version 2.X for ASP.net 10, this new major version will be implemented in a future version of ASP.net, [more information](https://github.com/microsoft/OpenAPI.NET/blob/main/CONTRIBUTING.md#branches-and-support-policy) + +### Features + +* adds support for OpenAPI 3.2.0 ([765a8dd](https://github.com/microsoft/OpenAPI.NET/commit/765a8dd4d6efd1a31b6a76d282ccffa5877a845a)) + +## [2.4.3](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.2...v2.4.3) (2026-01-16) + +## Bug Fixes + +* Support custom tag ordering ([008576c](https://github.com/microsoft/OpenAPI.NET/commit/008576c31f8dcecf59363c9c2f85d691601faa73)) +* Support custom tag ordering ([7610d07](https://github.com/microsoft/OpenAPI.NET/commit/7610d07bd11a99a4ce1cc31338d180dbd764d952)) + +## [2.4.2](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.1...v2.4.2) (2025-12-22) + + +### Bug Fixes + +* wrap extension parser calls in try-catch to ensure correct error pointers ([63cf4a3](https://github.com/microsoft/OpenAPI.NET/commit/63cf4a3029fe2d285a6fe2724e30ffcf3bdd2f9f)) +* wrap extension parser calls in try-catch to ensure correct error pointers ([458cabe](https://github.com/microsoft/OpenAPI.NET/commit/458cabe6cd0fbdb192dbd17f2d6ab3b8162d1166)) + +## [2.4.1](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.0...v2.4.1) (2025-12-18) + +### Bug Fixes + +* **schema:** always serialize `additionalProperties: false` ([6651c36](https://github.com/microsoft/OpenAPI.NET/commit/6651c36ff341329c053776d65b36b1b7fa9dd3ea)) +* **schema:** always serialize `additionalProperties: false` ([e36fc95](https://github.com/microsoft/OpenAPI.NET/commit/e36fc9565bce42916eb7bf64d1f74d491dd1f407)) + +## [2.4.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.12...v2.4.0) (2025-12-17) + +### Features + +* Add `type: "null"` downcasting when in oneOf and anyOf for OpenAPI v3 ([782cf8d](https://github.com/microsoft/OpenAPI.NET/commit/782cf8d1ff8166e3c7be706e08dabf168b9616a4)) + +## [2.3.12](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.11...v2.3.12) (2025-12-15) + +### Bug Fixes + +* load JSON documents that are preceded by multiple whitespace ([640e59a](https://github.com/microsoft/OpenAPI.NET/commit/640e59a143a2a6d3b79c9f6a97a6029593d7dd8f)) +* non-seekable json streams would fail to load as a document ([76b0159](https://github.com/microsoft/OpenAPI.NET/commit/76b0159d12790ab00310ff107e37396ecdf13336)) +* non-seekable json streams would fail to load as a document ([2436d73](https://github.com/microsoft/OpenAPI.NET/commit/2436d7382bfbf8b9ba501d88f682e952bdf27146)) +* reading streams in an asp.net context would cause async exceptions ([f9e5248](https://github.com/microsoft/OpenAPI.NET/commit/f9e524859722476b3111cb6006f77208c2d1f526)) + +## [2.3.11](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.10...v2.3.11) (2025-12-08) + +### Bug Fixes + +* additional properties serialization should not emit a schema in v2 ([946cba9](https://github.com/microsoft/OpenAPI.NET/commit/946cba992a2733a60182453e38722b4ed789b729)) +* additional properties serialization should not emit a schema in v2 fix: additional properties serialization should not emit booleans in v3.1+ ([275dd9d](https://github.com/microsoft/OpenAPI.NET/commit/275dd9d7525b1f490eccaf1e6e60829ae51bdf5d)) +* additional properties serialization should not emit booleans in v3.1+ ([946cba9](https://github.com/microsoft/OpenAPI.NET/commit/946cba992a2733a60182453e38722b4ed789b729)) + +## [2.3.10](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.9...v2.3.10) (2025-11-17) + +* empty strings should be quoted in yaml ([e919b33](https://github.com/microsoft/OpenAPI.NET/commit/e919b33e9d09159217066248483ef4c767865c82)) +* empty strings should be quoted in yaml ([0ca10db](https://github.com/microsoft/OpenAPI.NET/commit/0ca10db3bb9ffa937dd35862068926f3586d6991)) + +## [2.3.9](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.8...v2.3.9) (2025-11-06) + +### Bug Fixes + +* a bug where null sentinel value would appear in YAML documents ([0e864c7](https://github.com/microsoft/OpenAPI.NET/commit/0e864c73791b8610a95f06da9fbb44bfa1cf75a9)) +* a bug where null sentinel value would appear in YAML documents ([15618e1](https://github.com/microsoft/OpenAPI.NET/commit/15618e1f6a79874ae61dc31e3bcd5e1f3177d7ff)) + +## [2.3.8](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.7...v2.3.8) (2025-10-27) + + +### Bug Fixes + +* an issue where numeric property names would be missing quotes in yaml conversion ([da43c98](https://github.com/microsoft/OpenAPI.NET/commit/da43c98cfd7938a2354bfe57f431aa4bd0407b66)) +* an issue where numeric property names would be missing quotes in yaml conversion ([234504c](https://github.com/microsoft/OpenAPI.NET/commit/234504c6a1a53be8630b1f2eda8640f04a92327d)) +* quote property names in yaml that match boolean values ([39a9f41](https://github.com/microsoft/OpenAPI.NET/commit/39a9f4112a123b9207504d4a840a9be553703555)) +* yaml blocks and line returns ([b053848](https://github.com/microsoft/OpenAPI.NET/commit/b05384872e9364aedf8d8fc24b36bab9824594c5)) +* yaml multi-line literals maintain their lines ([558a1ce](https://github.com/microsoft/OpenAPI.NET/commit/558a1ceafc22e6075470a8799582575c8c1e125d)) + +## [2.3.7](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.6...v2.3.7) (2025-10-24) + + +### Bug Fixes + +* adds a null value sentinel to enable roundtrip serializations of JsonNode typed properties ([337c6eb](https://github.com/microsoft/OpenAPI.NET/commit/337c6eb08a9cc99bfbe2cd08fed61678030b8b8b)) +* adds a null value sentinel to enable roundtrip serializations of JsonNode typed properties ([63b2b98](https://github.com/microsoft/OpenAPI.NET/commit/63b2b98b64633fdef3b7fafee882060a3e0808fd)) +* fixes a bug where yaml null values would end up as a string "null" during roundtrip serialization ([6e62de2](https://github.com/microsoft/OpenAPI.NET/commit/6e62de205f0a5d58b385b4536dc30035a9977054)) +* fixes a bug where yaml null values would end up as a string "null" during roundtrip serialization ([994184b](https://github.com/microsoft/OpenAPI.NET/commit/994184b41bcd433a078cdeef75ba43d92b6b9762)) +* YamlConverter adding extra quotes to string values when converting from JSON to YAML ([ccfebc8](https://github.com/microsoft/OpenAPI.NET/commit/ccfebc828c2793b00faf3d5b12bd95bc68901104)) + + +### Performance Improvements + +* do not duplicate nodes when indexing ([dbbbf13](https://github.com/microsoft/OpenAPI.NET/commit/dbbbf1330934bc35fb35610a6a5db65514596c48)) +* only initialize map node nodes on demand ([bdb5264](https://github.com/microsoft/OpenAPI.NET/commit/bdb5264bc41b345f9ea95924ca5ab679178b82b6)) +* reduce allocations in mapnode ([f58aad2](https://github.com/microsoft/OpenAPI.NET/commit/f58aad235f904f94704aa14700aaca4ac16205af)) +* removes the lazy initialization since the node is always enumerated ([1c96521](https://github.com/microsoft/OpenAPI.NET/commit/1c96521c82cfa7414602e4f4da64e629b6c69c29)) +* switches to lazy instantiation ([d3c758b](https://github.com/microsoft/OpenAPI.NET/commit/d3c758b0d4421d1da9979587dfaee91bbdee0c7c)) +* use deep equals for comparison to reduce allocations ([6ce3214](https://github.com/microsoft/OpenAPI.NET/commit/6ce3214ad3beb5abe6045e5aa1743db4249c1974)) + +## [2.3.6](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.5...v2.3.6) (2025-10-20) + + +### Bug Fixes + +* a bug where empty collections would not be serialized for default values ([4c4d257](https://github.com/microsoft/OpenAPI.NET/commit/4c4d257c0cf10d1742fae9f3961e4a6242c0ce1d)) + +## [2.3.5](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.4...v2.3.5) (2025-10-14) + + +### Bug Fixes + +* use settings for terse output in serialization extension methods ([246039b](https://github.com/microsoft/OpenAPI.NET/commit/246039bfa8a16c042a10a87126289de82d18b321)) +* use settings for terse output in serialization extension methods ([8b91278](https://github.com/microsoft/OpenAPI.NET/commit/8b912788ef18b44a083d3fd2a1d6e25c9e6e17cb)) + +## [2.3.4](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.3...v2.3.4) (2025-10-06) + + +### Bug Fixes + +* Improve server creation and URL handling logic to maintain port ([3e6ee80](https://github.com/microsoft/OpenAPI.NET/commit/3e6ee80491ab32d810d40f29761b8eb8e4c4ce23)) +* missing deserialization for header content property in 3.1 and 3.0 ([717f154](https://github.com/microsoft/OpenAPI.NET/commit/717f1547bf94c3e9f76078d9a3b93ce684e17306)) +* missing deserialization for header content property in 3.1 and 3.0 ([0fdfae1](https://github.com/microsoft/OpenAPI.NET/commit/0fdfae1b0bf4d371af8ad3bfa6ad4df3da8d545b)) + +## [2.3.3](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.2...v2.3.3) (2025-10-02) + + +### Bug Fixes + +* typo in allowReserved property name for deserialization ([1633453](https://github.com/microsoft/OpenAPI.NET/commit/16334536dcb5182f26c0d58463bd15a124dd1505)) +* typo in allowReserved property name for deserialization ([f7e34be](https://github.com/microsoft/OpenAPI.NET/commit/f7e34be28566a4f714d43667f8c43be7159d27a2)) + +## [2.3.2](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.1...v2.3.2) (2025-09-19) + + +### Bug Fixes + +* Fix URL processing in InternalLoad method would not detect the filename/scheme properly in some scenarios ([d93689c](https://github.com/microsoft/OpenAPI.NET/commit/d93689c87ababdf64a82dc492a19b963f65b3fd1)) +* OpenApiEncoding explode property serialization defaults with form style ([ae03eab](https://github.com/microsoft/OpenAPI.NET/commit/ae03eaba3fe7aa20bf0d03f895bbd4ae85d9d344)) + +## [2.3.1](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.0...v2.3.1) (2025-09-08) + + +### Bug Fixes + +* file access for "file" URI scheme with special characters ([6dded81](https://github.com/microsoft/OpenAPI.NET/commit/6dded810cfba50d3a8093795a9359c384dd52c6a)) + +## [2.3.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.2.0...v2.3.0) (2025-08-29) + + +### Features + +* adds the detected format as part of the diagnostic ([#2482](https://github.com/microsoft/OpenAPI.NET/issues/2482)) ([59d7c81](https://github.com/microsoft/OpenAPI.NET/commit/59d7c81fae8cbc320a9005c529806e94cc4e9444)) +* adds the detected format to the diagnostics ([59d7c81](https://github.com/microsoft/OpenAPI.NET/commit/59d7c81fae8cbc320a9005c529806e94cc4e9444)) + +## [2.2.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.1.0...v2.2.0) (2025-08-25) + + +### Features + +* add Validation Rule for path operations to not have a request body ([d101fc3](https://github.com/microsoft/OpenAPI.NET/commit/d101fc30cfc701f2d6c52a51b9e39fa7eae96194)) + + +### Bug Fixes + +* missing examples when one example is with an empty array. ([cb1c496](https://github.com/microsoft/OpenAPI.NET/commit/cb1c4967f37f11dad6ad42784e6c3cf8570081f9)) + +## [2.1.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.1...v2.1.0) (2025-08-20) + + +### Features + +* adds a default validation rule for unresolved references ([90b3966](https://github.com/microsoft/OpenAPI.NET/commit/90b3966e5e071e26570050733482660f41f944b0)) + + +### Bug Fixes + +* Improve OpenApiWalker performance ([a007c03](https://github.com/microsoft/OpenAPI.NET/commit/a007c039eb2a9190d4adeafd865f6d42df4221aa)) +* Validate schema property is not null ([3326022](https://github.com/microsoft/OpenAPI.NET/commit/3326022b016fd3fc795f45926a55895b02557a09)) + +## [2.0.1](https://github.com/microsoft/openapi.net/compare/v2.0.0...v2.0.1) (2025-08-18) + + +### Bug Fixes + +* add missing disposable for stream ([9318c00](https://github.com/microsoft/openapi.net/commit/9318c00c31466bf67d2e9701659a4cda3d82d1dd)) +* add missing disposable for stream ([0c1ccbd](https://github.com/microsoft/openapi.net/commit/0c1ccbdc1ba4c53662ff6c7132366ae435d8fedb)) + +## [2.0.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.31...v2.0.0) (2025-07-10) + + +### Features + +* General availability of version 2 with support for OpenAPI 3.1!!! 🎉🎉🎉 ([a02d74c](https://github.com/microsoft/OpenAPI.NET/commit/a02d74c2467d591a7c4d8fa89b3b18e2452be0a5)) +* General availability of version 2 with support for OpenAPI 3.1!!! 🎉🎉🎉 ([97824e5](https://github.com/microsoft/OpenAPI.NET/commit/97824e5a9dc36b0c2ac56bbceef3439b9e8dfcf3)) + + +### Bug Fixes + +* inconsistent visibility of properties in current keys class ([cb9772f](https://github.com/microsoft/OpenAPI.NET/commit/cb9772fd4eb2a6fa36b65f0388f471eb66653aa2)) +* removes extraneous default value constant ([bf8d0b6](https://github.com/microsoft/OpenAPI.NET/commit/bf8d0b63adc16013fdb22f38715f167ce6e21c98)) +* removes extraneous default value constant ([b6eb46e](https://github.com/microsoft/OpenAPI.NET/commit/b6eb46ebb46ccd7314e00b5698fa7f6b9b6ae0da)) +* removes loop methods from parsing context as its available in loop detector instead ([de3531b](https://github.com/microsoft/OpenAPI.NET/commit/de3531bc944bcb2bbc55e278e28f1a05d6d0a29f)) +* removes loop methods from parsing context as its available in loop detector instead ([18a8cbe](https://github.com/microsoft/OpenAPI.NET/commit/18a8cbeeb00ee39e5bbdaabdde097ee9f8a75668)) +* removes public mermaid types that were not usuable ([ef7ae33](https://github.com/microsoft/OpenAPI.NET/commit/ef7ae338dc6122a9ffc58c7661b161b319d307d9)) +* removes public mermaid types that were not usuable ([a26096c](https://github.com/microsoft/OpenAPI.NET/commit/a26096c8cf9c3e53a547235a446296eaff3f413d)) +* removes redundant marker interface ([5a055f9](https://github.com/microsoft/OpenAPI.NET/commit/5a055f9f616028116f1d035ee744820f37a85464)) +* removes redundant marker interface ([74a9f08](https://github.com/microsoft/OpenAPI.NET/commit/74a9f083674134482b1349bce1643d9f4636ed82)) +* switches to a getter for API consistency ([7975082](https://github.com/microsoft/OpenAPI.NET/commit/797508257501c8b4a336310c84030d0e128caf14)) +* switches to a getter for API consistency ([0091f1c](https://github.com/microsoft/OpenAPI.NET/commit/0091f1cbf5f430fe9f54cfb5e2b66279663de632)) +* unconsistent visibility of properties in current keys class ([d0c20ab](https://github.com/microsoft/OpenAPI.NET/commit/d0c20ab2209b3e7ed57cb89dbd4107d915975302)) +* visibility of extension methods ([1e9112a](https://github.com/microsoft/OpenAPI.NET/commit/1e9112a4cfc01a54f265858c81b0effb8a897976)) +* visibility of extension methods ([50c8e34](https://github.com/microsoft/OpenAPI.NET/commit/50c8e3459d9849d0f9acfc1e7efc99668828e8a4)) + +## [2.0.0-preview.31](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.30...v2.0.0-preview.31) (2025-07-02) + + +### Bug Fixes + +* bumps openapi.net.odata to fix two critical bugs in hidi ([00c3018](https://github.com/microsoft/OpenAPI.NET/commit/00c30181214b35f4817be0cbd3827d765efd04d9)) +* bumps openapi.net.odata to fix two critical bugs in hidi ([cf41355](https://github.com/microsoft/OpenAPI.NET/commit/cf41355aac3326c1cb9337078de989179f1b3b67)) + +## [2.0.0-preview.30](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.29...v2.0.0-preview.30) (2025-07-02) + + +### Bug Fixes + +* migration of hidi to the latest version of system.commandline ([a5f8721](https://github.com/microsoft/OpenAPI.NET/commit/a5f8721a18e93ee881cfee371ba6d23ce0c55ae4)) +* throw on circular reference ([e14258d](https://github.com/microsoft/OpenAPI.NET/commit/e14258dd2a8639702c8e0bc81a643874d207facb)) +* throw on circular reference ([caea292](https://github.com/microsoft/OpenAPI.NET/commit/caea292b39d2c754bd2e2d214280add53a0a47ea)) +* upgrades openapi.odata to avoid hidi failing to load ([0bea5ed](https://github.com/microsoft/OpenAPI.NET/commit/0bea5ed3cbb10230bf026288e118ce0e5025e55a)) +* upgrades openapi.odata to avoid hidi failing to load ([6735397](https://github.com/microsoft/OpenAPI.NET/commit/67353976b8a17dcb6760223d06c097469fa6f794)) +* validation to accept lowercase status code ranges (4xx, 5xx) in OpenAPI responses ([09f661f](https://github.com/microsoft/OpenAPI.NET/commit/09f661f0ff0511d5937fad49ae8a6182b1ea1aff)) + +## [2.0.0-preview.29](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.28...v2.0.0-preview.29) (2025-06-18) + + +### Bug Fixes + +* avoid stack overflow on cyclical references ([06cc025](https://github.com/microsoft/OpenAPI.NET/commit/06cc025dca43d24955bcd205facefa4347d3f0c7)) + +## [2.0.0-preview.28](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.27...v2.0.0-preview.28) (2025-06-16) + + +### Bug Fixes + +* sub-schema references are invalid ([92db49b](https://github.com/microsoft/OpenAPI.NET/commit/92db49b98ade782de3dec229936c100a1339b491)) +* sub-schema references are invalid ([75d1d2b](https://github.com/microsoft/OpenAPI.NET/commit/75d1d2b62a6fab3727047be5c0e10b9987ad9f37)) + +## [2.0.0-preview.27](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.26...v2.0.0-preview.27) (2025-06-13) + + +### Bug Fixes + +* implementation drift between the different version services ([1ed02e3](https://github.com/microsoft/OpenAPI.NET/commit/1ed02e3cbe7a6b484ee7db224e056ae2f0244a30)) +* implementation drift between the different version services ([2514526](https://github.com/microsoft/OpenAPI.NET/commit/25145266a70a961e6899368951d95ce41fe55f5b)) +* relative uri in json schema references would not parse appropriately or provide feedback to the user ([940945d](https://github.com/microsoft/OpenAPI.NET/commit/940945df29bea338a22553a3ddfb7e61853cb4e7)) +* relative uri in json schema references would not parse appropriately or provide feedback to the user ([e0bceaa](https://github.com/microsoft/OpenAPI.NET/commit/e0bceaaa39e8e475652b390324254149e867f39f)) +* warn instead of error out when $schema is present in the document ([388d6f7](https://github.com/microsoft/OpenAPI.NET/commit/388d6f79b4b45d1c30bddbff66dd79eef2d4e4b7)) +* warn instead of error out when $schema is present in the document ([7c7b053](https://github.com/microsoft/OpenAPI.NET/commit/7c7b053b543ebdedf05b0357175fea3dc9d345db)) + +## [2.0.0-preview.26](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.25...v2.0.0-preview.26) (2025-06-12) + + +### Bug Fixes + +* a bug where relative relative and sub-component JSON references would not resolve properly ([b7bc6be](https://github.com/microsoft/OpenAPI.NET/commit/b7bc6be4a05f1001130efb9af0b677dbec3055bc)) +* a bug where relative relative and sub-component JSON references would not resolve properly ([c53165c](https://github.com/microsoft/OpenAPI.NET/commit/c53165c72fae25ba0864a9f3c52d42e4ee05184d)) +* recursive relative reference resolution ([873acd4](https://github.com/microsoft/OpenAPI.NET/commit/873acd45eb6adecdc4219a08b028ddf35a568f01)) +* recursive relative reference resolution ([f296505](https://github.com/microsoft/OpenAPI.NET/commit/f296505b7123f35b2e45eedc9118c59b8f925cbd)) +* upgrades sharp yaml to avodi signing issues on netfx ([5dc7e81](https://github.com/microsoft/OpenAPI.NET/commit/5dc7e81fa7fad856edd96640ea7ee0e23e25a7f2)) +* upgrades sharp yaml to avodi signing issues on netfx ([4db5c1a](https://github.com/microsoft/OpenAPI.NET/commit/4db5c1ae39d4bc6c5138fda5d9d14904f069fa3e)) + +## [2.0.0-preview.25](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.24...v2.0.0-preview.25) (2025-06-10) + + +### Bug Fixes + +* ci configuration ([e7f76f7](https://github.com/microsoft/OpenAPI.NET/commit/e7f76f753649d5747a720b55babe2c59bbedfd49)) +* ci configuration ([a8fd917](https://github.com/microsoft/OpenAPI.NET/commit/a8fd91728bc57102d36bfdb6442e3c273b2818e6)) + +## [2.0.0-preview.24](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.23...v2.0.0-preview.24) (2025-06-09) + + +### Bug Fixes + +* callback reference annotations parsing ([86892b3](https://github.com/microsoft/OpenAPI.NET/commit/86892b361c7dcbe445ddfe10fd57fd9ab2d8a5a9)) +* example reference annotation parsing ([8bf012b](https://github.com/microsoft/OpenAPI.NET/commit/8bf012b7d576f5efd6d0953859b98494958c2c4e)) +* link reference annotations parsing ([2a62c5a](https://github.com/microsoft/OpenAPI.NET/commit/2a62c5a2874d935aba09c1995d022988ac793609)) +* loading of header reference description ([9248560](https://github.com/microsoft/OpenAPI.NET/commit/9248560d0bac2c3e2d635b653a26d4bfa14e51f4)) +* makes reference serialization object generic ([f0802e5](https://github.com/microsoft/OpenAPI.NET/commit/f0802e5cb1974b6b2d4dc7100b2e3f808ab3538b)) +* parameter reference annoation parsing ([b1578f3](https://github.com/microsoft/OpenAPI.NET/commit/b1578f3fdc8bdbdeab3063ae3d3e6a554800f6d6)) +* path item reference annoations parsing ([d31ed4c](https://github.com/microsoft/OpenAPI.NET/commit/d31ed4c9e0a095eb247de450b3122f0b1dd675d6)) +* removes description field from references that do not support it ([03659f7](https://github.com/microsoft/OpenAPI.NET/commit/03659f7d055e6b339e15ac4434ae4037abb3a546)) +* request body reference annotations parsing ([d9a78dc](https://github.com/microsoft/OpenAPI.NET/commit/d9a78dc5e5433d0f1b628569f4124d4de575cba1)) +* response reference annotations parsing ([e455f52](https://github.com/microsoft/OpenAPI.NET/commit/e455f52f30fdb4937c27132b9596f89f17997663)) +* security scheme reference annoations parsing ([ccc3733](https://github.com/microsoft/OpenAPI.NET/commit/ccc3733a2700d087aac289bb31a6107e9e6d743f)) + +## [2.0.0-preview.23](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.22...v2.0.0-preview.23) (2025-06-03) + + +### Features + +* upgrades OData lib in Hidi to preview15 ([540240a](https://github.com/microsoft/OpenAPI.NET/commit/540240aba9f96b598459cd49b67cd02adc82713d)) +* upgrades OData lib to preview15 ([b300265](https://github.com/microsoft/OpenAPI.NET/commit/b3002652805ff2a36e55531178d4fe579b196c56)) + +## [2.0.0-preview.22](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.21...v2.0.0-preview.22) (2025-06-02) + + +### Features + +* Add writer settings to enable collection sorting using a comparer ([d7eaf47](https://github.com/microsoft/OpenAPI.NET/commit/d7eaf4707c26351cff4e4ec798b64967d9dd932f)) + + +### Bug Fixes + +* rename class; add logic for sorting IEnumerable collections ([58cb4ac](https://github.com/microsoft/OpenAPI.NET/commit/58cb4ac718a840a8dfb5c8821a3c0a484c29befd)) + +## [2.0.0-preview.21](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.20...v2.0.0-preview.21) (2025-05-21) + + +### Bug Fixes + +* do not throw when operation tag is missing matching global tag ([fe133f2](https://github.com/microsoft/OpenAPI.NET/commit/fe133f2604e9b65cc1c7011aab7c62f44e649d19)) +* do not throw when operation tag is missing matching global tag ([2c5aa40](https://github.com/microsoft/OpenAPI.NET/commit/2c5aa40cbb8bf1e96c1ccce6273579e70b69ade2)) + +## [2.0.0-preview.20](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.19...v2.0.0-preview.20) (2025-05-20) + + +### Bug Fixes + +* nullable and type ordering should be maintain to ease up migration work ([6c82aa6](https://github.com/microsoft/OpenAPI.NET/commit/6c82aa6b2d6e4f39af3c594edd8590a0cf749530)) +* nullable should not be inserted as an attempt to normalize the document ([6c82aa6](https://github.com/microsoft/OpenAPI.NET/commit/6c82aa6b2d6e4f39af3c594edd8590a0cf749530)) +* refactor to avoid adding duplicate entries ([41fd508](https://github.com/microsoft/OpenAPI.NET/commit/41fd508074f1b70415026df3aa878cd5f5e7b1ee)) +* refactor to avoid adding duplicate entries ([#2359](https://github.com/microsoft/OpenAPI.NET/issues/2359)) ([9791eb6](https://github.com/microsoft/OpenAPI.NET/commit/9791eb684a0f040feeb8c58701fd4f3577e73e2c)) +* tree node has the wrong structure because of trailing slashes ([2ffb273](https://github.com/microsoft/OpenAPI.NET/commit/2ffb2735aa3718370d6094186142f9cf50b194fa)) +* tree node has the wrong structure because of trailing slashes ([4439340](https://github.com/microsoft/OpenAPI.NET/commit/443934060e1e446de726addde69a2de955b95a7b)) +* wrong link to json schema spec in schema doc comments ([d9b0c90](https://github.com/microsoft/OpenAPI.NET/commit/d9b0c906f7173b81fea15001d588edcbc3eed8f1)) +* wrong link to json schema spec in schema doc comments ([9a73ec6](https://github.com/microsoft/OpenAPI.NET/commit/9a73ec6e5486d84b6a30a5fa0ac5961b381fc3d3)) + +## [2.0.0-preview.19](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.18...v2.0.0-preview.19) (2025-05-16) + + +### Bug Fixes + +* base url should be read from the settings when available ([f5d6e81](https://github.com/microsoft/OpenAPI.NET/commit/f5d6e81c21fd18b6de0fb19b535ad6dbc187790d)) +* base url should be read from the settings when available ([b17b7d8](https://github.com/microsoft/OpenAPI.NET/commit/b17b7d8d25fdf9a767411481287aacee31434aaa)) +* discriminator mapping references don't get a document when created from DOM ([767d3fb](https://github.com/microsoft/OpenAPI.NET/commit/767d3fb163b273b275cd67d710c573c59e4e642b)) +* discriminator mapping references don't get a document when created from DOM ([fdfe002](https://github.com/microsoft/OpenAPI.NET/commit/fdfe002d551fc3feaaeb5af24042826f13bdf412)) + +## [2.0.0-preview.18](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.17...v2.0.0-preview.18) (2025-05-13) + + +### Features + +* upgrades openapi.net.odata and apimanifest to the latest version ([80844a6](https://github.com/microsoft/OpenAPI.NET/commit/80844a60ae50ba0a4d54d7dd2e45ce8360206bf5)) +* upgrades openapi.net.odata and apimanifest to the latest version ([938a2e0](https://github.com/microsoft/OpenAPI.NET/commit/938a2e07b40b082e01ed1cdf3244767cbdca4061)) + + +### Bug Fixes + +* avoid calling virtual members in constructor ([5835057](https://github.com/microsoft/OpenAPI.NET/commit/5835057a7e905e371f859e727ddaf65ec08c6db0)) +* Fix typo in error message ([#2345](https://github.com/microsoft/OpenAPI.NET/issues/2345)) ([3f8b2b9](https://github.com/microsoft/OpenAPI.NET/commit/3f8b2b99c07bd3c58825728c2dd2ffed91d88fbe)) +* handle deserializing and writing empty security requirements [#1426](https://github.com/microsoft/OpenAPI.NET/issues/1426) ([#2323](https://github.com/microsoft/OpenAPI.NET/issues/2323)) ([962e0e4](https://github.com/microsoft/OpenAPI.NET/commit/962e0e436f96b1b68613013d75307dc1f92ce15c)) +* normalized override implementation for parameter types serialization in v2 ([5930916](https://github.com/microsoft/OpenAPI.NET/commit/593091621926defcbc2727a922613e34557d882a)) + +## [2.0.0-preview.17](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.16...v2.0.0-preview.17) (2025-04-16) + + +### Features + +* discriminator mappings now use schema references ([b4877f6](https://github.com/microsoft/OpenAPI.NET/commit/b4877f674ad1a240a367390d40d122eebccc0b20)) +* openapiformat enum cleanup ([#2326](https://github.com/microsoft/OpenAPI.NET/issues/2326)) ([19ffd13](https://github.com/microsoft/OpenAPI.NET/commit/19ffd136a7d2137f3de0896148d9a39f469ac711)) +* Remove default collection initialization for perf reasons ([#2284](https://github.com/microsoft/OpenAPI.NET/issues/2284)) ([3604382](https://github.com/microsoft/OpenAPI.NET/commit/36043829d29340a47fc93c6477a38ea93e59ef57)) + + +### Bug Fixes + +* Empty tag causes error generating Kiota client [#2283](https://github.com/microsoft/OpenAPI.NET/issues/2283) ([#2286](https://github.com/microsoft/OpenAPI.NET/issues/2286)) ([521d636](https://github.com/microsoft/OpenAPI.NET/commit/521d636e2c437c25e1758e9f6a22793d74adf2d7)) +* hidi fails to parse yaml files when fixing references ([a5c4d61](https://github.com/microsoft/OpenAPI.NET/commit/a5c4d6109c433b949cdb1665c00ad778b82b28b0)) +* hidi fails to parse yaml files when fixing references ([c5b69fe](https://github.com/microsoft/OpenAPI.NET/commit/c5b69fed9c413a6399c36e0f543e1019faac77e6)) +* Improve handling of OpenAPI tag references ([#2325](https://github.com/microsoft/OpenAPI.NET/issues/2325)) ([bf9954a](https://github.com/microsoft/OpenAPI.NET/commit/bf9954a257691231fac6f56667bde208a98a5b42)) +* read (Exclusive)Maximum and (Exclusive)Minimum values as strings and write their raw values during serialization ([#2309](https://github.com/microsoft/OpenAPI.NET/issues/2309)) ([ac66756](https://github.com/microsoft/OpenAPI.NET/commit/ac667560a951bef2824851c208c55ba070e96163)) +* relative references in subdirectory documents are not loading [#1674](https://github.com/microsoft/OpenAPI.NET/issues/1674) ([#2243](https://github.com/microsoft/OpenAPI.NET/issues/2243)) ([4bcbd51](https://github.com/microsoft/OpenAPI.NET/commit/4bcbd51caff689a73e90efbc08f683383741e004)) +* renames annotations schema property to metadata to match [#2241](https://github.com/microsoft/OpenAPI.NET/issues/2241) ([28e4a75](https://github.com/microsoft/OpenAPI.NET/commit/28e4a7590fb3525e30970112191d72eaf048ad6b)) +* renames annotations schema property to metadata to match [#2241](https://github.com/microsoft/OpenAPI.NET/issues/2241) ([33fc7cb](https://github.com/microsoft/OpenAPI.NET/commit/33fc7cbcda71efea47070ab7a6ebf9db8787a7f8)) +* set format to binary for file uploads ([#2305](https://github.com/microsoft/OpenAPI.NET/issues/2305)) ([47f10d3](https://github.com/microsoft/OpenAPI.NET/commit/47f10d323e78b9e6caa757c0d2efa378a19fc28c)) + +## [2.0.0-preview.16](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.15...v2.0.0-preview.16) (2025-03-20) + + +### Bug Fixes + +* always serialize security schemes in components ([3aac661](https://github.com/microsoft/OpenAPI.NET/commit/3aac661ca2e8050136c423f2835fcdd3a9096482)) +* always serialize security schemes in components ([a765acf](https://github.com/microsoft/OpenAPI.NET/commit/a765acf380135694bbd4d1336bd4beddef6ef808)) + +## [2.0.0-preview.15](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.14...v2.0.0-preview.15) (2025-03-18) + + +### Bug Fixes + +* Include hidi in solution ([7f4bec8](https://github.com/microsoft/OpenAPI.NET/commit/7f4bec8304771b498e8b0e33c706869ff79fd155)) +* remove duplicate unused property ([f62e039](https://github.com/microsoft/OpenAPI.NET/commit/f62e039a2efde04d0c3988b359ca09ab3349a40b)) +* revert change to exclude hidi in solution ([c3afe4e](https://github.com/microsoft/OpenAPI.NET/commit/c3afe4e8af2526e957940503a31079ed5f027c0a)) + +## [2.0.0-preview.14](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.13...v2.0.0-preview.14) (2025-03-18) + + +### Bug Fixes + +* exclude hidi from release due to package source mapping conflict ([72daa54](https://github.com/microsoft/OpenAPI.NET/commit/72daa544f2bfe8d51ed69d7ba82d31cbc36580f2)) + +## [2.0.0-preview.13](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.12...v2.0.0-preview.13) (2025-03-14) + + +### Features + +* adds OpenApiDocument.SerializeAs() so simplify serialization scenarios ([371a574](https://github.com/microsoft/OpenAPI.NET/commit/371a57405b013bdc257a51cc831f7487d1749823)) +* enable null reference type support ([#2146](https://github.com/microsoft/OpenAPI.NET/issues/2146)) ([96574ec](https://github.com/microsoft/OpenAPI.NET/commit/96574ecc46dca647a708b6673c7e5309824eda2f)) +* enables references as components ([eeffba9](https://github.com/microsoft/OpenAPI.NET/commit/eeffba9d50a53a3be1630d01edd8d0b57a966dee)) +* use http method object instead of enum ([8baff28](https://github.com/microsoft/OpenAPI.NET/commit/8baff287aa9450ad3bd467816de321e30157bcb3)) + + +### Bug Fixes + +* a bug where references would not serialize summary or descriptions in 3.1 ([ca7ccdd](https://github.com/microsoft/OpenAPI.NET/commit/ca7ccdd933b57c2775d0295e22e541c2904b5fb7)) +* handling for reference IDs with http prefix ([3385a0e](https://github.com/microsoft/OpenAPI.NET/commit/3385a0e0088c44fb926affcb20f166a02391427c)) + +## [2.0.0-preview.12](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview.11...v2.0.0-preview.12) (2025-03-07) + + +### Bug Fixes + +* fixes serialization of openApidocs with operation tags with settings to inline references ([8eecae6](https://github.com/microsoft/OpenAPI.NET/commit/8eecae6183f594c5508fc2c74d395c6030ce8727)) +* fixes serialization of openApidocs with operation tags with settings to inline references. ([f67fe64](https://github.com/microsoft/OpenAPI.NET/commit/f67fe64e669a3f8518d89b007150c3e1bdb69fd1)) + +## [2.0.0-preview.11](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview10...v2.0.0-preview.11) (2025-03-03) + + +### Bug Fixes + +* rename `OpenApiDocument.SecurityRequirements` as `Security` ([d8553d6](https://github.com/microsoft/OpenAPI.NET/commit/d8553d6e007c1fa38bb982c9eb757678e789111b)) + + +### Miscellaneous Chores + +* release 2.0.0-preview.11 ([f425b8e](https://github.com/microsoft/OpenAPI.NET/commit/f425b8ed48ce5e488f85ad3060e6c43734274250)) + +## [2.0.0-preview10](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview9...v2.0.0-preview10) (2025-02-27) + + +### Features + +* deduplicates tags at the document level ([93c468e](https://github.com/microsoft/OpenAPI.NET/commit/93c468ebd9ee30b0cb32a583821d8abe3d017b18)) +* tags references are now deduplicated as well ([763c0c1](https://github.com/microsoft/OpenAPI.NET/commit/763c0c1c5856a0ed56128b0ab8ce4b3a29ed193a)) + + +### Bug Fixes + +* add logic for serializing date time objects ([23395c5](https://github.com/microsoft/OpenAPI.NET/commit/23395c5776a781f64a7dc7bfd2867ca83eaa0bb7)) +* adds missing cancellation parameter to async method ([243a111](https://github.com/microsoft/OpenAPI.NET/commit/243a111c19f2939b0a5d27c21db302f8349049eb)) +* avoid creating new http clients to load additional documents of the workspace ([0f23798](https://github.com/microsoft/OpenAPI.NET/commit/0f23798f61ac964f9e71ef7402213392ebe91151)) +* deduplicates exclusive min/max properties in the object model ([08414a1](https://github.com/microsoft/OpenAPI.NET/commit/08414a16db5e0a627c953f107aa34501c18996bb)) +* deduplicates exclusive min/max properties in the object model ([0d5b471](https://github.com/microsoft/OpenAPI.NET/commit/0d5b4716d8cf0215257680d6cbaddaa84438eac5)) +* moves the http client for the reader to settings so it can be passed by client application ([9b910f3](https://github.com/microsoft/OpenAPI.NET/commit/9b910f3928ebcb24560ff004a58e5d397ed3d836)) +* OpenAPIDocument JsonSchemaDialect property is now a URI ([45977b5](https://github.com/microsoft/OpenAPI.NET/commit/45977b50188a0065fde02a3ac44a1fe718a85b30)) +* openapischema schema property is now a Uri ([452a6b9](https://github.com/microsoft/OpenAPI.NET/commit/452a6b9730a2fa310aee64d0b9d2a0c7ea6d131f)) +* primitive parsing for strings as DateTimes is too greedy ([4ee1d8b](https://github.com/microsoft/OpenAPI.NET/commit/4ee1d8bf44b5fcdf0fd22deca1d36ee4faf421d1)) +* removes static readers registry ([fe7a2fd](https://github.com/microsoft/OpenAPI.NET/commit/fe7a2fd654e93ce99dd0ebd628042f816c787104)) +* use a single http client in hidi ([9386fae](https://github.com/microsoft/OpenAPI.NET/commit/9386faec70655279ec3a031fd2afcd9cab09af40)) + +## [2.0.0-preview9](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview8...v2.0.0-preview9) (2025-02-21) + + +### Features + +* add support for dependentRequired ([75d7a66](https://github.com/microsoft/OpenAPI.NET/commit/75d7a662fc873566e50191127e4082b4ecf5ca7a)) + + +### Bug Fixes + +* an issue where deprecation extension parsing would fail ([5db8757](https://github.com/microsoft/OpenAPI.NET/commit/5db8757df642dbe651552ce4a7c740e94474eafc)) +* an issue where deprecation extension parsing would fail ([b59864c](https://github.com/microsoft/OpenAPI.NET/commit/b59864c2387c9410e71b0caa8d439e7f122ddc24)) +* refactor ToIdentifier() to normalize flaggable enums ([#2156](https://github.com/microsoft/OpenAPI.NET/issues/2156)) ([b80e934](https://github.com/microsoft/OpenAPI.NET/commit/b80e9342018cf136cc54b900bb95832a6867e982)) + +## [2.0.0-preview8](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview7...v2.0.0-preview8) (2025-02-17) + + +### Bug Fixes + +* a bug where external reference loading for local files would not work on linux ([df99a00](https://github.com/microsoft/OpenAPI.NET/commit/df99a00010001b35b34f9b74bbf12437f90b6b18)) +* add meaningful exception message during validation ([4a6547d](https://github.com/microsoft/OpenAPI.NET/commit/4a6547d08c86194e1783ce7f52e8248ca15556e0)) +* add meaningful exception message during validation ([74d20ed](https://github.com/microsoft/OpenAPI.NET/commit/74d20edebb6c5ee6150e8e03a42a40ed8c01d1da)) +* adds a cancellation token argument to external document loading ([a5ffab1](https://github.com/microsoft/OpenAPI.NET/commit/a5ffab1e77c19987fe468b9297e19e8f4c48f47a)) +* parsing failure on nodes set to null ([20aacc1](https://github.com/microsoft/OpenAPI.NET/commit/20aacc1a21510dbfe8cb21fb6ec2fc8b7720f2aa)) +* parsing failure on nodes set to null ([4245de9](https://github.com/microsoft/OpenAPI.NET/commit/4245de9ff333a1d34e125ba72c543b6e78db6980)) + +## [2.0.0-preview7](https://github.com/microsoft/OpenAPI.NET/compare/v2.0.0-preview6...v2.0.0-preview7) (2025-02-06) + + +### Bug Fixes + +* do not write null for types on parameters in v2 ([f889937](https://github.com/microsoft/OpenAPI.NET/commit/f8899379d34054e919c670ab2f8dca876bc418d5)) +* do not write null for types on parameters in v2 ([4aef7b7](https://github.com/microsoft/OpenAPI.NET/commit/4aef7b7aa4d6f19be86f7bdaf1c37edb7d174317)) + +## [2.0.0-preview6](https://github.com/microsoft/openapi.net/compare/2.0.0-preview5...v2.0.0-preview6) (2025-02-05) + + +### Features + +* adds a net8 target to benefit from all the conditional compilation ([a201aa2](https://github.com/microsoft/openapi.net/commit/a201aa237c39ab6748db0bfebd7d8c7be7ce4530)) +* adds components registration method for schemas ([10e548a](https://github.com/microsoft/openapi.net/commit/10e548ac943d6e87b132a2fcd3784c21d320346d)) +* adds deconstructor to read result ([79336f6](https://github.com/microsoft/openapi.net/commit/79336f6b1432c33f612cfc5c8ac9c79abdc04659)) +* adds deconstructor to read result ([d8c1593](https://github.com/microsoft/openapi.net/commit/d8c159331c230154236faafc315d008c61f3eb7b)) +* adds to identifier mapping to non nullable enum ([bd9622e](https://github.com/microsoft/openapi.net/commit/bd9622e239d5a5b2b4629d2f371f674775193af5)) +* bumps target OAS version to 3.1.1 ([9e8d8a4](https://github.com/microsoft/openapi.net/commit/9e8d8a4f46a6ae79d8bb53e18ff6e9d159388893)) +* configure AOT for trimming compatibility ([b4f9c3e](https://github.com/microsoft/openapi.net/commit/b4f9c3edc62e67b588e0acc04ea843f1a3bf0a76)) +* makes document optional ([754f763](https://github.com/microsoft/openapi.net/commit/754f763c2b148c04f0ba11b9c8e948557cc91b14)) +* makes the reference interface covariant ([7405f3c](https://github.com/microsoft/openapi.net/commit/7405f3c0c2d48b9b124a28796c3a7e9bce909aa7)) +* splits described and summarized interfaces ([2a10cd9](https://github.com/microsoft/openapi.net/commit/2a10cd95d254001c397a7cd28568e468800e6644)) + + +### Bug Fixes + +* 3.0 serialization when type is set to null ([920a51a](https://github.com/microsoft/openapi.net/commit/920a51a9170eb76921fd0e6529461e7681ac4c19)) +* a bug where 3.0 downcast of type null would not work ([6b636d5](https://github.com/microsoft/openapi.net/commit/6b636d53a7842e3eaf5fa70a91bc27c72be14e47)) +* a bug where 3.0 downcast of type null would not work ([ac05342](https://github.com/microsoft/openapi.net/commit/ac05342befbe51944cf3a1c966d564077e8e28ea)) +* a flaky behaviour for format property serialization ([3ea1fa9](https://github.com/microsoft/openapi.net/commit/3ea1fa981ec4d94909358e1c70c0904a2e3c4269)) +* a flaky behaviour for format property serialization ([52981d4](https://github.com/microsoft/openapi.net/commit/52981d4cebf4831f94dd59968231740e7891c5a3)) +* additional 3.1.0 constants after merge and v2 release ([9e8d8a4](https://github.com/microsoft/openapi.net/commit/9e8d8a4f46a6ae79d8bb53e18ff6e9d159388893)) +* adds generic shallow copy method to avoid inadvertent conversions of references to schemas ([e4c14a4](https://github.com/microsoft/openapi.net/commit/e4c14a451d9d50bcae0cf9b74162033cb2954a72)) +* adds missing culture argument to date serialization ([45329e4](https://github.com/microsoft/openapi.net/commit/45329e4e5b3606964e85bbfdece4b5f239865353)) +* adds missing null prop operator to proxy properties ([8361069](https://github.com/microsoft/openapi.net/commit/83610696a0c026071308d7247fab914f4db72190)) +* adds missing null propagation operators for callback and header references ([0cb4ccb](https://github.com/microsoft/openapi.net/commit/0cb4ccb925ab54e15351cbf2b0f4ae58c6b866c8)) +* adds support for all component types ([8a73b54](https://github.com/microsoft/openapi.net/commit/8a73b540e88bd18aeef27e86e41dbec3e7e1d2cd)) +* aligns callback parameter name with interface ([68b25cc](https://github.com/microsoft/openapi.net/commit/68b25cc5cc9ffd809a45ce532200ce3262f39ad2)) +* aligns missing properties for override ([e3325b9](https://github.com/microsoft/openapi.net/commit/e3325b9d4cedee6a9734899906e938888f023506)) +* aligns parameter name with interface definition for example ([d7e1f91](https://github.com/microsoft/openapi.net/commit/d7e1f919ee61e7cd4596f216890e16c7719e99c9)) +* aligns reference copy constructors ([ce93aa7](https://github.com/microsoft/openapi.net/commit/ce93aa7a23280b1fb60b9bc4e5ca4a070414fb0c)) +* aligns to null propagation operator ([8d57b81](https://github.com/microsoft/openapi.net/commit/8d57b81d7122c9ffad4f1c348879cc6df971617c)) +* allow registration of component references ([14750dc](https://github.com/microsoft/openapi.net/commit/14750dcabe29805479c3fed10152dee1ac4111af)) +* an empty security requirement should not result in an object during serialization ([1c6fd8e](https://github.com/microsoft/openapi.net/commit/1c6fd8e8ff38d0259af7fbd9903f361ecfb19225)) +* build passes ([ea68427](https://github.com/microsoft/openapi.net/commit/ea68427110e5f789019b46885ea45f8f6b975c53)) +* callback reference proxy implementation ([028d60b](https://github.com/microsoft/openapi.net/commit/028d60bd4003f54f6f130e56400cd7533951e1f2)) +* callback reference proxy implementation ([2cbb0fa](https://github.com/microsoft/openapi.net/commit/2cbb0fa352ecaf09014f26ab5fddc8ca89e63c2c)) +* components schema copy ([88daad5](https://github.com/microsoft/openapi.net/commit/88daad5d31fee2f4826be9717ece808495d9b4d8)) +* conditional version for extension causes invalid json ([4030c1f](https://github.com/microsoft/openapi.net/commit/4030c1fda6a04006326e76c8a2ca7ffd98e2d1d6)) +* conditional version for extension causes invalid json ([0ce92cc](https://github.com/microsoft/openapi.net/commit/0ce92cc948869e0d5eb46d388559405c9b412b06)) +* date time and date time offset shifting zones ([a6a44a7](https://github.com/microsoft/openapi.net/commit/a6a44a7e3d271a2cc88fda02aabec944402a32a9)) +* default settings in case of null value ([ab2ddf0](https://github.com/microsoft/openapi.net/commit/ab2ddf0f264ccaf6efbf127c23be00adec51be1f)) +* do not allow null argument for example copy constructor ([aa80b19](https://github.com/microsoft/openapi.net/commit/aa80b1968d9ec6ad26f8b45578040026883d5890)) +* do not copy host document as it negatively impact performance ([1043e4e](https://github.com/microsoft/openapi.net/commit/1043e4e3d2fbe4bf84aae453c5d76ce5672f64b6)) +* do not copy host document as it negatively impact performance ([a46e857](https://github.com/microsoft/openapi.net/commit/a46e8578519c85b9455e41ccbeebeb8740252ae3)) +* do not emit a type array in 3.1 when unnecessary ([3b3d0e6](https://github.com/microsoft/openapi.net/commit/3b3d0e6da51f7958285b8aa5be5d1eb73ec69acd)) +* draft security scheme reference proxy design pattern ([1bd2624](https://github.com/microsoft/openapi.net/commit/1bd2624dcb6751c9f31ecec422d5ec9852370397)) +* empty security requirements are actually valid. to negate the document ones ([42bd396](https://github.com/microsoft/openapi.net/commit/42bd3960d799af3d522ba122ce713a7d418c98ba)) +* enum description number values ([ff7b4a9](https://github.com/microsoft/openapi.net/commit/ff7b4a99351661b7dd26e24bd4daa9e61d39ff27)) +* enum description number values ([e29e24c](https://github.com/microsoft/openapi.net/commit/e29e24c58f51af4f6a39aeb65041dbd7f7ab888f)) +* enum parsing when encountering unknown values should not default to first member ([d4e155b](https://github.com/microsoft/openapi.net/commit/d4e155b6d66887f28cbb13fb22ba0d70eabc4139)) +* enum parsing when encountering unknown values should not default to first member ([9d07ebb](https://github.com/microsoft/openapi.net/commit/9d07ebb4b70bdd641748270a831df031d35b7ec4)) +* extensions collection initialization ([4f28b65](https://github.com/microsoft/openapi.net/commit/4f28b657310b90c82a5b5af9f91ef6e097847a97)) +* extraneous null prop removal ([1006879](https://github.com/microsoft/openapi.net/commit/10068797577e14ed4ebf6909face0aef7e3f7d56)) +* failing unit test after merge ([a4ac872](https://github.com/microsoft/openapi.net/commit/a4ac872c3336fad2f6a4e05a7602ea76f6db9b49)) +* failing unit tests for security scheme references in security requirements ([d2e4111](https://github.com/microsoft/openapi.net/commit/d2e4111198a435547bacfe62a5626e4d78114f8d)) +* fixes inlining override when they should not happen ([704943c](https://github.com/microsoft/openapi.net/commit/704943c28f87257e896d1a79eb6962d60f719bec)) +* fixes invalid OAI document for unit tests ([837f000](https://github.com/microsoft/openapi.net/commit/837f00081a1e52200b90adeac6e2aff32c92d296)) +* inconsistant API surface usage ([47ad76b](https://github.com/microsoft/openapi.net/commit/47ad76b4318d1a468478d4c1c82092bd5aa0eb6a)) +* last reference to copy constructor ([d87375d](https://github.com/microsoft/openapi.net/commit/d87375dc8d463fb348938acb1ed048b5a5dde166)) +* makes reference fields immutable ([fda05d4](https://github.com/microsoft/openapi.net/commit/fda05d465ef84f2c4c755aca2252e2672ad40107)) +* makes reference of holder immutable ([a182f44](https://github.com/microsoft/openapi.net/commit/a182f44bfb74ccbbb5b4bbf842693de48d60dac1)) +* makes target field read only ([89881fd](https://github.com/microsoft/openapi.net/commit/89881fd5fa28148969eba75fad07ac26d4fb4e3d)) +* missing defensive programming in copy constructors ([227d99d](https://github.com/microsoft/openapi.net/commit/227d99d23557fab82fcb7eb7d6e8fa34b486719d)) +* missing doc comment for annotations ([41759a1](https://github.com/microsoft/openapi.net/commit/41759a1cb587d38392f730dfce74e974c76189c6)) +* missing null prop operator on parameter reference ([019eb99](https://github.com/microsoft/openapi.net/commit/019eb99fc26f323f7a5bc79609954d237b1c0bfc)) +* missing property rename ([2443fa0](https://github.com/microsoft/openapi.net/commit/2443fa0d3da5ec4ef09d9e6cae2491a117fac77b)) +* multiple performance fixes for type serialization ([bd9622e](https://github.com/microsoft/openapi.net/commit/bd9622e239d5a5b2b4629d2f371f674775193af5)) +* multiple performance fixes for type serialization feat: adds to identifier mapping to non nullable enum ([5fef51c](https://github.com/microsoft/openapi.net/commit/5fef51c4cb3685eceabfdbb21abb1e88a87571a9)) +* multiple unit test failures ([2f171a3](https://github.com/microsoft/openapi.net/commit/2f171a3476ea0f3227ecdcb724f1d1af5406ec0e)) +* null flag comparison ([081e251](https://github.com/microsoft/openapi.net/commit/081e2511b9df964ad74f7cb0e48761977e50cc45)) +* null propagation for most failed reference lookup ([7994691](https://github.com/microsoft/openapi.net/commit/7994691db279c23e3ac120a54b5d96cc7f88ae3f)) +* null reference check ([a5023d6](https://github.com/microsoft/openapi.net/commit/a5023d659b7adaedbe18853c297e78ac12e22823)) +* Open API header proxy design pattern implementation ([77e0ad1](https://github.com/microsoft/openapi.net/commit/77e0ad10ca213c449523e9ff1802da6a6bd800e2)) +* open API link reference proxy design pattern implementation ([6a96462](https://github.com/microsoft/openapi.net/commit/6a9646278377d0f81289c34ad25b2102b488dd9e)) +* open API link reference proxy design pattern implementation ([376e54d](https://github.com/microsoft/openapi.net/commit/376e54de6d419c4e6673111538140bedafd7896e)) +* open api response reference should not clone objects ([4243873](https://github.com/microsoft/openapi.net/commit/42438730a57acada699a017da41838d0d54e141d)) +* open api schema reference proxy design pattern implementation ([e57d049](https://github.com/microsoft/openapi.net/commit/e57d04972c360f1367583eb9e60f750f8882f0b7)) +* open api schema reference proxy design pattern implementation ([aebefb7](https://github.com/microsoft/openapi.net/commit/aebefb76094e71718b1d60691e9ac12a95a25283)) +* parameter reference proxy design pattern implementation ([ed6ffa1](https://github.com/microsoft/openapi.net/commit/ed6ffa1d4a59857cc57f6286d383ff3a9661a00e)) +* parameter reference proxy design pattern implementation ([eeb79a4](https://github.com/microsoft/openapi.net/commit/eeb79a4a7700d6fb56fbcbbe6913d224fa126167)) +* passes missing host document references to all layers ([d7c4621](https://github.com/microsoft/openapi.net/commit/d7c462163272a26705f9b30f2a6c407c74acfc0f)) +* passes missing host document references to all layers ([ff1406c](https://github.com/microsoft/openapi.net/commit/ff1406c60082727851d22003211faaa4e876d2e8)) +* path item reference implementation ([56f291b](https://github.com/microsoft/openapi.net/commit/56f291b325682e72f1f347097be2fb9786c628b1)) +* path item reference implementation ([c725267](https://github.com/microsoft/openapi.net/commit/c7252677814eec7a9a8ff6f0f3a51f5e113f5f19)) +* potential NRT ([9db6e2d](https://github.com/microsoft/openapi.net/commit/9db6e2d3ce9043ff6b702060eda75290aa37b401)) +* potential NRT for net8 build ([f517deb](https://github.com/microsoft/openapi.net/commit/f517deb6c7f68947a4a25da5b76ed1ee94d307e2)) +* proxy design pattern implementation for OpenAPiExample ([cc28ff2](https://github.com/microsoft/openapi.net/commit/cc28ff27446dae0fc0e9f9f44dafd6df6e8fc243)) +* proxy design pattern implementation for request body ([425335e](https://github.com/microsoft/openapi.net/commit/425335eb46d4a48104046af62265ba0ca6a1ec7b)) +* references callback writer ([88ad997](https://github.com/microsoft/openapi.net/commit/88ad99759d8735824c7a70321ed7efc164633f06)) +* removes all obsolete APIs ([e861c08](https://github.com/microsoft/openapi.net/commit/e861c08442fe7b2f1b0e4079d4a007e525a75ca9)) +* removes extraneuous null prop op in copy constructor ([227d99d](https://github.com/microsoft/openapi.net/commit/227d99d23557fab82fcb7eb7d6e8fa34b486719d)) +* removes nullable property that shouldn't be part of dom ([4d9c17b](https://github.com/microsoft/openapi.net/commit/4d9c17b7287b27b9058828765722f55eb378e40a)) +* removes redundant assignment ([8d70195](https://github.com/microsoft/openapi.net/commit/8d701955f24801b495dfd4b3b7a2351b499355b2)) +* removes unnecessary null prop in copy constructor ([aa993b1](https://github.com/microsoft/openapi.net/commit/aa993b10ff72fb18f7dc3f49d87586662188a381)) +* removes unused parameters ([de9d979](https://github.com/microsoft/openapi.net/commit/de9d979ec3f53fb7a86c43309f7e87d20d89d22a)) +* removes unused parameters ([9cd7aae](https://github.com/microsoft/openapi.net/commit/9cd7aaea76316b3944e8a549db9aad3a3155b51b)) +* removes useless condition for null check ([4a50c77](https://github.com/microsoft/openapi.net/commit/4a50c77a90f0e9810b4912cbb694883921c508cd)) +* removes useless virtual definitions in components ([af3038a](https://github.com/microsoft/openapi.net/commit/af3038a0fcee46c4806382fe061e4f2e7059fdbe)) +* removes virtual modifier in MediaType ([4dfc9b8](https://github.com/microsoft/openapi.net/commit/4dfc9b8c533d454cefa3d576adb4d3d422747d16)) +* request body references are converted to v2 properly ([b84ea19](https://github.com/microsoft/openapi.net/commit/b84ea194a16e03a1f2b6f56af892eb6288d5627a)) +* response reference proxy design pattern implementation ([8103c20](https://github.com/microsoft/openapi.net/commit/8103c20f669eb9c127aec3baaaafda3987381d9b)) +* response reference proxy design pattern implementation ([5b4003b](https://github.com/microsoft/openapi.net/commit/5b4003bd04d59fd460280fa06e6151b0203680cb)) +* restores default constructor for ISerializable implementation ([778184f](https://github.com/microsoft/openapi.net/commit/778184ff608cd4172de689684272b2d7a8627339)) +* returns reference instead of null ([45e40fa](https://github.com/microsoft/openapi.net/commit/45e40fa675570fc382d4a72684a009b567d45118)) +* sets hidi version to a preview ([975b1bf](https://github.com/microsoft/openapi.net/commit/975b1bfa563bc36ad8031de934af158cb807bca8)) +* sets hidi version to a preview ([8999336](https://github.com/microsoft/openapi.net/commit/899933636f15991add45e367befd1c30c93bcf2c)) +* shallow copy for callback ([4ea87ef](https://github.com/microsoft/openapi.net/commit/4ea87efad0edde89f2e29c0c495a33a4467ba939)) +* shallow copy for example ([9bc3044](https://github.com/microsoft/openapi.net/commit/9bc30443ab95fd05b0b328c13b7e36e911628dda)) +* shallow copy for parameter link path item and request body ([9af6f30](https://github.com/microsoft/openapi.net/commit/9af6f30719c7e0718798df98096f1679f74c20e7)) +* side effects in tag references ([717deb0](https://github.com/microsoft/openapi.net/commit/717deb08d2198519a69a3ccf701f46dac229e608)) +* side effects in tag references ([878593b](https://github.com/microsoft/openapi.net/commit/878593b7a7e6ff1f2adc6965608c46e5f8ce8f38)) +* single copy and maintain for references ([30ee6ed](https://github.com/microsoft/openapi.net/commit/30ee6ed9ac8e6a6a7d1931bed9da22e0116ec9af)) +* specifies encoding for net fx ([95dafe6](https://github.com/microsoft/openapi.net/commit/95dafe60a103293acba6c6aa16c4c780e7b576c9)) +* specifies encoding for net fx ([cd13481](https://github.com/microsoft/openapi.net/commit/cd13481f4e3a883186d10b3af63cbd928a17c8ba)) +* support non-standard MIME type in response header ([50ddca2](https://github.com/microsoft/openapi.net/commit/50ddca2f72a9b4eef21c45fdd1c978e8f6f32eb3)) +* switches header to shallow copy ([2a42c36](https://github.com/microsoft/openapi.net/commit/2a42c36eb7d83c0b83f8263b7989f84c5ddf911d)) +* tag reference proxy design pattern implementation ([46e08d4](https://github.com/microsoft/openapi.net/commit/46e08d4b53e756db5d717337488c9bb787ec8ee7)) +* tag, response, and security scheme shallow copy ([7ac149c](https://github.com/microsoft/openapi.net/commit/7ac149c70d69c357aa0dc0d8e29e975a886226f9)) +* updates public api file ([b727581](https://github.com/microsoft/openapi.net/commit/b727581d6fd1d814b5c1887400cb48f06dd96362)) +* updates public API surface with net8 target ([1a1e013](https://github.com/microsoft/openapi.net/commit/1a1e0135e977440be91e64d14e3d2b094238facd)) +* uses backing fields instead of schema copy ([6f4e7a2](https://github.com/microsoft/openapi.net/commit/6f4e7a245376cb816367ff86c497cbba023b6faf)) +* uses the json node clone API to avoid unecessary allocs ([818414d](https://github.com/microsoft/openapi.net/commit/818414d73a351447a403e8555c140b180de5d375)) +* v2 references for properties do not work as expected ([aa90edf](https://github.com/microsoft/openapi.net/commit/aa90edf1b624e1bd2381700f2d8b659507bf0119)) +* v2 references for properties do not work as expected ([ec9c01b](https://github.com/microsoft/openapi.net/commit/ec9c01b9b873d02ab2682ceb5fb9ac509a931781)) +* v2 request body content null propagation ([6d064c4](https://github.com/microsoft/openapi.net/commit/6d064c4b967f7f9262a85438d27cf7bf2ccc412c)) +* v2 request body content null propagation ([8b4833c](https://github.com/microsoft/openapi.net/commit/8b4833cce98cb8d8c782ceed8d5d122357b71065)) +* visibility of serialize internal methods ([dc8a757](https://github.com/microsoft/openapi.net/commit/dc8a7572ec436c1ed35f5a6208c6aa868702dc0f)) + + +### Performance Improvements + +* avoid round trip serialization ([a6a44a7](https://github.com/microsoft/openapi.net/commit/a6a44a7e3d271a2cc88fda02aabec944402a32a9)) + +## Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..686e5e7a0 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,10 @@ +# Microsoft Open Source Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). + +Resources: + +- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) +- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns +- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..98e928d47 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,128 @@ +# Contributing to OpenAPI.net + +OpenAPI.net is a mono-repo containing source code for the following packages: + +## Libraries + +| Library | NuGet Release | +|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Microsoft.OpenAPI](./src/Microsoft.OpenAPI/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.OpenAPI?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.OpenAPI/) | +| [Microsoft.OpenAPI.YamlReader](./src/Microsoft.OpenApi.YamlReader/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.OpenAPI.YamlReader?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.OpenAPI.YamlReader/) | + +The OpenAPI.NET v3-compatible [Microsoft.OpenApi.Hidi command line tool](https://github.com/microsoft/OpenAPI.NET.OData/blob/main/src/Microsoft.OpenApi.Hidi/readme.md) is maintained separately. +Contribute to Hidi in [OpenAPI.NET.OData's main branch](https://github.com/microsoft/OpenAPI.NET.OData/tree/main). + +OpenAPI.net is open to contributions. There are a couple of different recommended paths to get contributions into the released version of this library. + +__NOTE__ A signed a contribution license agreement is required for all contributions, and is checked automatically on new pull requests. Please read and sign [the agreement](https://cla.microsoft.com/) before starting any work for this repository. + +## File issues + +The best way to get started with a contribution is to start a dialog with the owners of this repository. Sometimes features will be under development or out of scope for this SDK and it's best to check before starting work on contribution. Discussions on bugs and potential fixes could point you to the write change to make. + +## Submit pull requests for bug fixes and features + +Feel free to submit a pull request with a linked issue. + +### Branches and support policy + +Because one major consumer of these libraries is ASP.net, the support policy of this repository is aligned with [dotnet support policy](https://dotnet.microsoft.com/platform/support/policy/dotnet-core#lifecycle). + +The following table outlines the mapping between package major versions, dotnet versions, and which contributions are accepted. As a consumer, make sure the version of this library your application is using is aligned with the version of ASP.net described in the table below. + +| Major version | Branch | Supported [AspNetCore OpenAPI versions](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi) | Supported [Swashbuckle.AspNetCore version](https://www.nuget.org/packages/Swashbuckle.AspNetCore/) | Supported OpenAPI versions | Changes provided by Microsoft | Accepted contributions | End of support date | +| ------------- | ---------- | -------------------------- | ---------- | -------------------------- | ------------------------------------------- | ------------------------------------------- | --------------- | +| 1.X | support/v1 | < 10 | < 10 | 2.0, 3.0 | security fixes | security and bugfixes | .NET 9 (Nov 2026) | +| 2.X | support/v2 | = 10 ¹ | = 10 ³ | 2.0, 3.0, 3.1 | security and bugfixes | security and bugfixes | .NET 10 (Nov 2028) ¹ | +| 3.X ² | main | not available | not available | 2.0, 3.0, 3.1, 3.2 | security, bugfixes and feature improvements | security, bugfixes and feature improvements | TBD | + +> Notes: +> +> 1. This assumes that AspNetCore OpenAPI version 11 and above will adopt version 3 or above of this library, otherwise, it'd expand the support date for version 2 of this library. +> 2. This will be conditioned by new releases of OpenAPI, this library, ASP.NET and AspNetCore OpenAPI's adoption of new versions of this library. +> 3. This assumes that Swashbuckle.AspNetCore version 11 and above will adopt version 3 or above of this library. + +### Multi-versions requirement for contributions + +When contributing to the library, start by making a contribution to the main branch first, or the uppermost version it applies to. During the review process you'll be asked to demonstrate your contribution cannot apply to prior versions or to port your contribution to the branches for prior versions before the initial pull request can get merged. + +This approach helps maintain a similar behavior across all versions under active support. + +## Commit message format + +To support our automated release process, pull requests are required to follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) +format. +Each commit message consists of a __header__, an optional __body__ and an optional __footer__. The header is the first line of the commit and +MUST have a __type__ (see below for a list of types) and a __description__. An optional __scope__ can be added to the header to give extra context. + +``` +[optional scope]: + + + + +``` + +The recommended commit types used are: + +- __feat__ for feature updates (increments the _minor_ version) +- __fix__ for bug fixes (increments the _patch_ version) +- __perf__ for performance related changes e.g. optimizing an algorithm +- __refactor__ for code refactoring changes +- __test__ for test suite updates e.g. adding a test or fixing a test +- __style__ for changes that don't affect the meaning of code. e.g. formatting changes +- __docs__ for documentation updates e.g. ReadMe update or code documentation updates +- __build__ for build system changes (gradle updates, external dependency updates) +- __ci__ for CI configuration file changes e.g. updating a pipeline +- __chore__ for miscallaneous non-sdk changesin the repo e.g. removing an unused file + +Adding an exclamation mark after the commit type (`feat!`) or footer with the prefix __BREAKING CHANGE:__ will cause an increment of the _major_ version. + +## Updates to public API surface + +Because we need to maintain a compatible public API surface within a major version, this project is using the public API analyzers to ensure no prior public API is changed/removed inadvertently. + +This means that: + +- All entries in an __Unshipped__ document need to be moved to the __Shipped__ document before any public release. +- All new APIs being added need to be __Unshipped__ document before the pull request can be merged, otherwise build will fail with a message like the example below. + +```txt +Error: /home/runner/work/OpenAPI.NET/OpenAPI.NET/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs(39,46): error RS0016: Symbol 'OAuth2MetadataUrl.set' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/home/runner/work/OpenAPI.NET/OpenAPI.NET/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj::TargetFramework=net8.0] +``` + +### Update the unshipped document + +To update the unshipped document, simply run the following commands + +```shell +# add the missing public api entries +dotnet format --diagnostics RS0016 +# discard changes to cs files to avoid creating conflicts +git checkout *.cs +``` + +### Move items from unshipped to unshipped document + +```pwsh +. ./scripts/promoteUnshipped.ps1 +``` + +> Note: the promotion of APIs is automated through the dedicated workflow and should result in pull requests being automatically opened. + +## Updating the benchmark information + +To ensure performance of the library does not degrade over time, we have continuous benchmarks running. You might see the continuous integration failing if your pull request changed any model under __src/Microsoft.OpenApi/Models__. + +```txt +Benchmark result for EmptyApiSchema does not match the existing benchmark result (original!=new). Allocated bytes differ: 408 != 416 +``` + +To update the benchmarks, run the following script: + +```shell +cd performance/benchmark +dotnet run -c Release +``` + +Then commit the report files using a "chore" commit. diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 000000000..1971fa2c6 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,26 @@ + + + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + Microsoft + Microsoft + MIT + true + https://github.com/Microsoft/OpenAPI.NET + https://github.com/microsoft/OpenAPI.NET/releases + true + OpenSource + 2027-09 + http://go.microsoft.com/fwlink/?LinkID=288890 + https://github.com/Microsoft/OpenAPI.NET + © Microsoft Corporation. All rights reserved. + OpenAPI .NET + 3.10.2 + + + + true + + + + + \ No newline at end of file diff --git a/Microsoft.OpenApi.sln b/Microsoft.OpenApi.sln deleted file mode 100644 index d957905d4..000000000 --- a/Microsoft.OpenApi.sln +++ /dev/null @@ -1,73 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2027 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi", "src\Microsoft.OpenApi\Microsoft.OpenApi.csproj", "{A8E50143-69B2-472A-9D45-3F9A05D13202}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4AEDAD90-F854-4940-BFEE-6374CC92CAB0}" - ProjectSection(SolutionItems) = preProject - build.cmd = build.cmd - readme.md = readme.md - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.OpenApi.Workbench", "src\Microsoft.OpenApi.Workbench\Microsoft.OpenApi.Workbench.csproj", "{6A5E91E5-0441-46EE-AEB9-8334981B7F08}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Readers", "src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj", "{79933258-0126-4382-8755-D50820ECC483}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Tests", "test\Microsoft.OpenApi.Tests\Microsoft.OpenApi.Tests.csproj", "{AD83F991-DBF3-4251-8613-9CC54C826964}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.Readers.Tests", "test\Microsoft.OpenApi.Readers.Tests\Microsoft.OpenApi.Readers.Tests.csproj", "{1ED3C2C1-E1E7-4925-B4E6-2D969C3F5237}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E546B92F-20A8-49C3-8323-4B25BB78F3E1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6357D7FD-2DE4-4900-ADB9-ABC37052040A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.SmokeTests", "test\Microsoft.OpenApi.SmokeTests\Microsoft.OpenApi.SmokeTests.csproj", "{AD79B61D-88CF-497C-9ED5-41AE3867C5AC}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A8E50143-69B2-472A-9D45-3F9A05D13202}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A8E50143-69B2-472A-9D45-3F9A05D13202}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A8E50143-69B2-472A-9D45-3F9A05D13202}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A8E50143-69B2-472A-9D45-3F9A05D13202}.Release|Any CPU.Build.0 = Release|Any CPU - {6A5E91E5-0441-46EE-AEB9-8334981B7F08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6A5E91E5-0441-46EE-AEB9-8334981B7F08}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6A5E91E5-0441-46EE-AEB9-8334981B7F08}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6A5E91E5-0441-46EE-AEB9-8334981B7F08}.Release|Any CPU.Build.0 = Release|Any CPU - {79933258-0126-4382-8755-D50820ECC483}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {79933258-0126-4382-8755-D50820ECC483}.Debug|Any CPU.Build.0 = Debug|Any CPU - {79933258-0126-4382-8755-D50820ECC483}.Release|Any CPU.ActiveCfg = Release|Any CPU - {79933258-0126-4382-8755-D50820ECC483}.Release|Any CPU.Build.0 = Release|Any CPU - {AD83F991-DBF3-4251-8613-9CC54C826964}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AD83F991-DBF3-4251-8613-9CC54C826964}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AD83F991-DBF3-4251-8613-9CC54C826964}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AD83F991-DBF3-4251-8613-9CC54C826964}.Release|Any CPU.Build.0 = Release|Any CPU - {1ED3C2C1-E1E7-4925-B4E6-2D969C3F5237}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1ED3C2C1-E1E7-4925-B4E6-2D969C3F5237}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1ED3C2C1-E1E7-4925-B4E6-2D969C3F5237}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1ED3C2C1-E1E7-4925-B4E6-2D969C3F5237}.Release|Any CPU.Build.0 = Release|Any CPU - {AD79B61D-88CF-497C-9ED5-41AE3867C5AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AD79B61D-88CF-497C-9ED5-41AE3867C5AC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AD79B61D-88CF-497C-9ED5-41AE3867C5AC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AD79B61D-88CF-497C-9ED5-41AE3867C5AC}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {A8E50143-69B2-472A-9D45-3F9A05D13202} = {E546B92F-20A8-49C3-8323-4B25BB78F3E1} - {6A5E91E5-0441-46EE-AEB9-8334981B7F08} = {E546B92F-20A8-49C3-8323-4B25BB78F3E1} - {79933258-0126-4382-8755-D50820ECC483} = {E546B92F-20A8-49C3-8323-4B25BB78F3E1} - {AD83F991-DBF3-4251-8613-9CC54C826964} = {6357D7FD-2DE4-4900-ADB9-ABC37052040A} - {1ED3C2C1-E1E7-4925-B4E6-2D969C3F5237} = {6357D7FD-2DE4-4900-ADB9-ABC37052040A} - {AD79B61D-88CF-497C-9ED5-41AE3867C5AC} = {6357D7FD-2DE4-4900-ADB9-ABC37052040A} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {9F171EFC-0DB5-4B10-ABFA-AF48D52CC565} - EndGlobalSection -EndGlobal diff --git a/Microsoft.OpenApi.slnx b/Microsoft.OpenApi.slnx new file mode 100644 index 000000000..007071a9e --- /dev/null +++ b/Microsoft.OpenApi.slnx @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 36fd15dbc..a4cf4171e 100644 --- a/README.md +++ b/README.md @@ -1,108 +1,106 @@ -![Category overview screenshot](docs/images/oainet.png "Microsoft + OpenAPI = Love") - -# OpenAPI.NET - -|Package|Nuget| -|--|--| -|Models and Writers|[![nuget](https://img.shields.io/nuget/v/Microsoft.OpenApi.svg)](https://www.nuget.org/packages/Microsoft.OpenApi/) | -|Readers | [![nuget](https://img.shields.io/nuget/v/Microsoft.OpenApi.Readers.svg)](https://www.nuget.org/packages/Microsoft.OpenApi.Readers/) | - - -The **OpenAPI.NET** SDK contains a useful object model for OpenAPI documents in .NET along with common serializers to extract raw OpenAPI JSON and YAML documents from the model. - -**See more information on the OpenAPI specification and its history here: Open API Initiative** - -Project Objectives - -- Provide a single shared object model in .NET for OpenAPI descriptions. -- Include the most primitive Reader for ingesting OpenAPI JSON and YAML documents in both V2 and V3 formats. -- Provide OpenAPI description writers for both V2 and V3 specification formats. -- Enable developers to create Readers that translate different data formats into OpenAPI descriptions. - -# Processors -The OpenAPI.NET project holds the base object model for representing OpenAPI documents as .NET objects. Some developers have found the need to write processors that convert other data formats into this OpenAPI.NET object model. We'd like to curate that list of processors in this section of the readme. - -The base JSON and YAML processors are built into this project. Below is the list of the other supported processor projects. - -- [**C# Comment / Annotation Processor**](https://github.com/Microsoft/OpenAPI.NET.CSharpAnnotations) : Converts standard .NET annotations ( /// comments ) emitted from your build (MSBuild.exe) into OpenAPI.NET document object. - -- [**OData CSDL Processor**](https://github.com/Microsoft/OpenAPI.NET.OData) : Converts the XML representation of the Entity Data Model (EDM) describing an OData Service into OpenAPI.NET document object. - -# Example Usage - -Creating an OpenAPI Document - -```C# -var document = new OpenApiDocument -{ - Info = new OpenApiInfo - { - Version = "1.0.0", - Title = "Swagger Petstore (Simple)", - }, - Servers = new List - { - new OpenApiServer { Url = "http://petstore.swagger.io/api" } - }, - Paths = new OpenApiPaths - { - ["/pets"] = new OpenApiPathItem - { - Operations = new Dictionary - { - [OperationType.Get] = new OpenApiOperation - { - Description = "Returns all pets from the system that the user has access to", - Responses = new OpenApiResponses - { - ["200"] = new OpenApiResponse - { - Description = "OK" - } - } - } - } - } - } -}; -``` - -Reading and writing a OpenAPI description - -```C# -var httpClient = new HttpClient -{ - BaseAddress = new Uri("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/") -}; - -var stream = await httpClient.GetStreamAsync("master/examples/v3.0/petstore.yaml"); - -// Read V3 as YAML -var openApiDocument = new OpenApiStreamReader().Read(stream, out var diagnostic); - -// Write V2 as JSON -var outputString = openApiDocument.Serialize(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json); - -``` - -# Build Status - -|**master**| -|--| -|[![Build status](https://ci.appveyor.com/api/projects/status/9l6hly3vjeu0tmtx/branch/master?svg=true)](https://ci.appveyor.com/project/MicrosoftOpenAPINETAdmin/openapi-net-54e7i/branch/master)| - -# Contributing - -This project welcomes contributions and suggestions. Most contributions require you to agree to a -Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us -the rights to use your contribution. For details, visit https://cla.microsoft.com. - -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide -a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions -provided by the bot. You will only need to do this once across all repos using our CLA. - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or -contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. - -To provide feedback and ask questions you can use Stack Overflow with the [OpenAPI.NET](https://stackoverflow.com/questions/tagged/openapi.net) tag or use the OpenAPI.NET Slack channel which you can join by registering for the HTTP APIs team at http://slack.httpapis.com. + +![Category overview screenshot](https://raw.githubusercontent.com/microsoft/OpenAPI.NET/main/docs/images/oainet.png "Microsoft + OpenAPI = Love") + +# OpenAPI.NET + +|Package|Nuget| +|--|--| +|Models and Writers|[![nuget](https://img.shields.io/nuget/v/Microsoft.OpenApi.svg)](https://www.nuget.org/packages/Microsoft.OpenApi/) | +|YamlReader | [![nuget](https://img.shields.io/nuget/v/Microsoft.OpenApi.YamlReader.svg)](https://www.nuget.org/packages/Microsoft.OpenApi.YamlReader/) | + +The **OpenAPI.NET** SDK contains a useful object model for OpenAPI documents in .NET along with common serializers to extract raw OpenAPI JSON and YAML documents from the model. + +**See more information on the OpenAPI specification and its history here: OpenAPI Initiative** + +Project Objectives: + +- Provide a single shared object model in .NET for OpenAPI descriptions. +- Include the most primitive Reader for ingesting OpenAPI JSON and YAML documents in both V2 and V3 formats. +- Provide OpenAPI description writers for both V2 and V3 specification formats. +- Enable developers to create Readers that translate different data formats into OpenAPI descriptions. + +# Installation + +- Install core Nuget package [**Microsoft.OpenApi**](https://www.nuget.org/packages/Microsoft.OpenApi) +- Install Yaml Reader Nuget package [**Microsoft.OpenApi.YamlReader**](https://www.nuget.org/packages/Microsoft.OpenApi.YamlReader) + +> Note: we just released a new major version of the library, which brings support for OpenAPI 3.2! +> You can read more about the changes of this upcoming version [in the upgrade guide](./docs/upgrade-guide-3.md). + +# Processors +The OpenAPI.NET project holds the base object model for representing OpenAPI documents as .NET objects. Some developers have found the need to write processors that convert other data formats into this OpenAPI.NET object model. We'd like to curate that list of processors in this section of the readme. + +The base JSON and YAML processors are built into this project. Below is the list of the other supported processor projects. + +- [**C# Comment / Annotation Processor**](https://github.com/Microsoft/OpenAPI.NET.CSharpAnnotations) : Converts standard .NET annotations ( /// comments ) emitted from your build (MSBuild.exe) into OpenAPI.NET document object. + +- [**OData CSDL Processor**](https://github.com/Microsoft/OpenAPI.NET.OData) : Converts the XML representation of the Entity Data Model (EDM) describing an OData Service into OpenAPI.NET document object. + +# Example Usage + +Creating an OpenAPI Document + +```C# +var document = new OpenApiDocument +{ + Info = new OpenApiInfo + { + Version = "1.0.0", + Title = "Swagger Petstore (Simple)", + }, + Servers = new List + { + new OpenApiServer { Url = "http://petstore.swagger.io/api" } + }, + Paths = new OpenApiPaths + { + ["/pets"] = new OpenApiPathItem + { + Operations = new() + { + [HttpMethod.Get] = new OpenApiOperation + { + Description = "Returns all pets from the system that the user has access to", + Responses = new OpenApiResponses + { + ["200"] = new OpenApiResponse + { + Description = "OK" + } + } + } + } + } + } +}; +``` + +Reading and writing an OpenAPI description + +```C# +var (openApiDocument, _) = await OpenApiDocument.LoadAsync("https://raw.githubusercontent.com/OAI/OpenAPI-Specification/refs/heads/main/_archive_/schemas/v3.0/pass/petstore.yaml"); + +// Write V2 as JSON +var outputString = await openApiDocument.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi2_0); +``` + +# Validating/Testing OpenAPI descriptions +[Microsoft.OpenApi.Hidi](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi) is a command line tool for validating and transforming OpenAPI descriptions. +The OpenAPI.NET v3-compatible tool is maintained in [OpenAPI.NET.OData's main branch](https://github.com/microsoft/OpenAPI.NET.OData/tree/main/src/Microsoft.OpenApi.Hidi). +See its [installation guidelines and documentation](https://github.com/microsoft/OpenAPI.NET.OData/blob/main/src/Microsoft.OpenApi.Hidi/readme.md). + +# Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +To provide feedback and ask questions you can use Stack Overflow with the [OpenAPI.NET](https://stackoverflow.com/questions/tagged/openapi.net) tag. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..766e6f887 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,41 @@ + + +## Security + +Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). + +If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. + +## Reporting Security Issues + +**Please do not report security vulnerabilities through public GitHub issues.** + +Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). + +If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc). + +You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). + +Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: + + * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. + +## Preferred Languages + +We prefer all communications to be in English. + +## Policy + +Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/msrc/cvd). + + diff --git a/agents.md b/agents.md new file mode 100644 index 000000000..abeed736e --- /dev/null +++ b/agents.md @@ -0,0 +1,7 @@ +# Regex handling + +- Analyze regex patterns for matching complexity and excessive backtracking, including on long and near-matching inputs. Prefer equivalent patterns with less backtracking when available, while preserving matching semantics and target-framework compatibility. +- For fixed patterns on modern targets, use source-generated regexes with explicit match timeouts (`GeneratedRegex` under `NET8_0_OR_GREATER`). +- Use conditional compilation to provide a regular `Regex` with the same pattern and an explicit match timeout for older targets. Do not duplicate regex validation with a manually maintained character scanner. +- Older-runtime regex matching may still time out under load because timeouts use wall-clock time. If consumers encounter this limitation, recommend upgrading to a modern runtime that uses the source-generated implementation. +- Keep shared patterns in constants and reference those constants in validation diagnostics and tests. diff --git a/build.cmd b/build.cmd index cbae2cb0e..4fa04e44a 100644 --- a/build.cmd +++ b/build.cmd @@ -1,24 +1,16 @@ @echo off -if "%~1"=="" goto :error - -SET VERSION=%~1 - Echo Building Microsoft.OpenApi -SET PROJ=%~dp0src\Microsoft.OpenApi\Microsoft.OpenApi.csproj -dotnet build %PROJ% /t:restore /p:Configuration=Release -dotnet build %PROJ% /t:build /p:Configuration=Release -dotnet build %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts;Version=%VERSION% - -Echo Building Microsoft.OpenApi.Readers +SET PROJ=%~dp0src\Microsoft.OpenApi\Microsoft.OpenApi.csproj +dotnet msbuild %PROJ% /t:restore /p:Configuration=Release +dotnet msbuild %PROJ% /t:build /p:Configuration=Release +dotnet msbuild %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts -SET PROJ=%~dp0src\Microsoft.OpenApi.Readers\Microsoft.OpenApi.Readers.csproj -dotnet build %PROJ% /t:restore /p:Configuration=Release -dotnet build %PROJ% /t:build /p:Configuration=Release -dotnet build %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts;Version=%VERSION% +Echo Building Microsoft.OpenApi.YamlReader -goto :end -:error -echo Version parameter missing e.g. build.cmd 1.0.0-beta0008 +SET PROJ=%~dp0src\Microsoft.OpenApi.YamlReader\Microsoft.OpenApi.YamlReader.csproj +dotnet msbuild %PROJ% /t:restore /p:Configuration=Release +dotnet msbuild %PROJ% /t:build /p:Configuration=Release +dotnet msbuild %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts :end diff --git a/build.sh b/build.sh new file mode 100755 index 000000000..1e6ae6313 --- /dev/null +++ b/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +echo "Building Microsoft.OpenApi" + +PROJ="$(dirname "$0")/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj" +dotnet msbuild "$PROJ" /t:restore /p:Configuration=Release +dotnet msbuild "$PROJ" /t:build /p:Configuration=Release +dotnet msbuild "$PROJ" /t:pack "/p:Configuration=Release;PackageOutputPath=$(dirname "$0")/artifacts" + +echo "Building Microsoft.OpenApi.YamlReader" + +PROJ="$(dirname "$0")/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj" +dotnet msbuild "$PROJ" /t:restore /p:Configuration=Release +dotnet msbuild "$PROJ" /t:build /p:Configuration=Release +dotnet msbuild "$PROJ" /t:pack "/p:Configuration=Release;PackageOutputPath=$(dirname "$0")/artifacts" \ No newline at end of file diff --git a/docs/upgrade-guide-2.md b/docs/upgrade-guide-2.md new file mode 100644 index 000000000..752b60c95 --- /dev/null +++ b/docs/upgrade-guide-2.md @@ -0,0 +1,680 @@ +--- +title: Upgrade guide to OpenAPI.NET 2.0 +description: Learn how to upgrade your OpenAPI.NET version from 1.6 to 2.0 +author: rachit.malik +ms.author: malikrachit +ms.topic: conceptual +--- + +# Introduction + +We are excited to announce the new version of the OpenAPI.NET library! +OpenAPI.NET v2 is a major update to the OpenAPI.NET library. This release includes a number of performance improvements, API enhancements, and support for OpenAPI v3.1. + +> [!WARNING] +> This is a major version update that includes breaking changes. Please review this guide carefully before upgrading. + +## Integrations with ASP.NET Core + +If you are using this library with [AspNetCore OpenAPI versions](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi) `< 10.0` then you must remain on version `1.x` as it's not compatible with version 2 or above of this library. + +If you are using this library with [Swashbuckle.AspNetCore version](https://www.nuget.org/packages/Swashbuckle.AspNetCore/) `< 10.0` then you must remain on version `1.x` as it's not compatible with version 2 or above of this library. + +The latest support policy information for this library, and integration with ASP.NET Core can be found on [the contributing documentation](https://github.com/microsoft/OpenAPI.NET/blob/main/CONTRIBUTING.md#branches-and-support-policy). + +## The biggest update ever + +Since the release of the first version of the OpenAPI.NET library in 2018, there has not been a major version update to the library. With the addition of support for OpenAPI v3.1 it was necessary to make some breaking changes. With this opportunity, we have taken the time to make some other improvements to the library, based on the experience we have gained supporting a large community of users for the last six years. + +## Performance Improvements + +One of the key features of OpenAPI.NET is its performance. This version makes it possible to parse JSON based OpenAPI descriptions even faster. OpenAPI.NET v1 relied on the excellent YamlSharp library for parsing both JSON and YAML files. With OpenAPI.NET v2 we are relying on System.Text.Json for parsing JSON files. For YAML files, we continue to use YamlSharp to parse YAML but then convert to JsonNodes for processing. This allows us to take advantage of the performance improvements in System.Text.Json while still supporting YAML files. + +In v1, instances of `$ref` were resolved in a second pass of the document to ensure the target of the reference has been parsed before attempting to resolve it. In v2, reference targets are lazily resolved when reference objects are accessed. This improves load time performance for documents that make heavy use of references. + +Because references are lazily loaded and depend on the workspace context, loading a document with unresolved references (internal or external) does not lead to an exception being thrown anymore. Instead warnings are logged in the diagnostics object. This gives you an opportunity to load additional documents in the workspace if needed, [more information](#component-registration-in-a-documents-workspace). + +### Results + +The following benchmark results outline an overall 50% reduction in processing time for the document parsing as well as 35% reduction in memory allocation when parsing JSON. +For YAML, the results between the different versions of the library are similar (some of the optimizations being compensated by the additional features). + +#### 1.X + +| Method | Mean | Error | StdDev | Gen0 | Gen1 | Gen2 | Allocated | +|------------- |---------------:|-------------:|-------------:|-----------:|-----------:|----------:|-------------:| +| PetStoreYaml | 448.7 μs | 326.6 μs | 17.90 μs | 58.5938 | 11.7188 | - | 381.79 KB | +| PetStoreJson | 484.8 μs | 156.9 μs | 8.60 μs | 62.5000 | 15.6250 | - | 389.28 KB | +| GHESYaml | 1,008,349.6 μs | 565,392.0 μs | 30,991.04 μs | 66000.0000 | 23000.0000 | 4000.0000 | 382785 KB | +| GHESJson | 1,039,447.0 μs | 267,501.0 μs | 14,662.63 μs | 67000.0000 | 23000.0000 | 4000.0000 | 389970.77 KB | + +#### 2.X + +| Method | Mean | Error | StdDev | Gen0 | Gen1 | Gen2 | Allocated | +|------------- |-------------:|--------------:|-------------:|-----------:|-----------:|----------:|-------------:| +| PetStoreYaml | 450.5 μs | 59.26 μs | 3.25 μs | 58.5938 | 11.7188 | - | 377.15 KB | +| PetStoreJson | 172.8 μs | 123.46 μs | 6.77 μs | 39.0625 | 7.8125 | - | 239.29 KB | +| GHESYaml | 943,452.7 μs | 137,685.49 μs | 7,547.01 μs | 66000.0000 | 21000.0000 | 3000.0000 | 389463.91 KB | +| GHESJson | 468,401.8 μs | 300,711.80 μs | 16,483.03 μs | 41000.0000 | 15000.0000 | 3000.0000 | 250934.62 KB | + +### Asynchronous API surface + +Any method which results in input/output access (memory, network, storage) is now Async and returns a `Task` to avoid any blocking calls an improve concurrency. + +For example: + +```csharp +var result = myOperation.SerializeAsJson(OpenApiSpecVersion.OpenApi2_0); +``` + +Is now: + +```csharp +var result = await myOperation.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi2_0); +``` + +### Trimming support + +To better support applications deployed in high performance environments or on devices which have limited compute available, any usage of reflection has been removed from the code base. This also brings support for trimming to the library. Any method relying on reflection has been removed or re-written. + +> Note: as part of this change, the following types have been removed: +> +> - StringExtensions + +### Collections are not initialized + +To lower the memory footprint of the library, collections are now NOT initialized anymore when instantiating any of the models. + +Example + +```csharp +var mySchema = new OpenApiSchema(); + +// 1.6: works +// 2.X: if null reference types is enabled in the target application, +// this will lead to a warning or error at compile time. +// And fail at runtime with a null reference exception. +mySchema.AnyOf.Add(otherSchema); + +// one solution +mySchema.AnyOf ??= new List(); +mySchema.AnyOf.Add(otherSchema); + +// alternative +mySchema.AnyOf = new List { otherSchema }; +``` + +## Reduced Dependencies + +In OpenAPI v1, it was necessary to include the Microsoft.OpenApi.Readers library to be able to read OpenAPI descriptions in either YAML or JSON. In OpenAPI.NET v2, the core Microsoft.OpenAPI library can both read and write JSON. It is only necessary to use the newly renamed [Microsoft.OpenApi.YamlReader](https://www.nuget.org/packages/Microsoft.OpenApi.YamlReader/) library if you need YAML support. This allows teams who are only working in JSON to avoid the additional dependency and therefore eliminate all non-.NET library references. + +Once the dependency is added, the reader needs to be added to the reader settings as demonstrated below + +```csharp +var settings = new OpenApiReaderSettings(); +settings.AddYamlReader(); + +var result = OpenApiDocument.LoadAsync(openApiString, settings: settings); +``` + +## API Enhancements + +### Loading the document + +The v1 library attempted to mimic the pattern of `XmlTextReader` and `JsonTextReader` for the purpose of loading OpenAPI documents from strings, streams and text readers. + +```csharp +var reader = new OpenApiStringReader(); +var openApiDoc = reader.Read(stringOpenApiDoc, out var diagnostic); +``` + +The same pattern can be used for `OpenApiStreamReader` and `OpenApiTextReader`. When we introduced the `ReadAsync` methods we eliminated the use of the `out` parameter. To improve code readability, we've added deconstruction support to `ReadResult`. The properties also have been renamed to avoid confusion with their types. + +```csharp +var reader = new OpenApiStreamReader(); +var (document, diagnostics) = await reader.ReadAsync(streamOpenApiDoc); +// or +var result = await reader.ReadAsync(streamOpenApiDoc); +var document = result.Document; +var diagnostics = result.Diagnostics; +``` + +A `ReadResult` object acts as a tuple of `OpenApiDocument` and `OpenApiDiagnostic`. + +The challenge with this approach is that the reader classes are not very discoverable and the behavior is not actually consistent with the `*TextReader` pattern that allows incrementally reading the document. This library does not support incrementally reading the OpenAPI Document. It only reads a complete document and returns an `OpenApiDocument` instance. + +In the v2 library we are moving to the pattern used by classes like `XDocument` where a set of static `Load` and `Parse` methods are used as factory methods. + +```csharp +public class OpenApiDocument { + public static async Task LoadAsync(string url, OpenApiReaderSettings settings = null) {} + public static async Task LoadAsync(Stream stream, string? format = null, OpenApiReaderSettings? settings = null) {} + public static ReadResult Load(MemoryStream stream, string? format = null, OpenApiReaderSettings? settings = null) {} + public static ReadResult Parse(string input, string? format = null, OpenApiReaderSettings? settings = null) {} +} +``` + +This API design allows a developer to use IDE autocomplete to present all the loading options by simply knowing the name of the `OpenApiDocument` class. Each of these methods are layered on top of the more primitive methods to ensure consistent behavior. + +As the YAML format is only supported when including the `Microsoft.OpenApi.YamlReader` library it was decided not to use an enum for the `format` parameter. We are considering implementing a more [strongly typed solution](https://github.com/microsoft/OpenAPI.NET/issues/1952) similar to the way that `HttpMethod` is implemented so that we have a strongly typed experience that is also extensible. + +When the loading methods are used without a format parameter, we will attempt to parse the document using the default JSON reader. If that fails and the YAML reader is registered, then we will attempt to read as YAML. The goal is always to provide the fastest path with JSON but still maintain the convenience of not having to care whether a URL points to YAML or JSON if you need that flexibility. + +### Additional exceptions + +While parsing an OpenAPI description, the library will now throw the following new exceptions: + +- `OpenApiReaderException` when the reader for the format cannot be found, the document cannot be parsed because it does not follow the format conventions, etc... +- `OpenApiUnsupportedSpecVersionException` when the document's version is not implemented by this version of the library and therefore cannot be parsed. + +### Removing the OpenAPI Any classes + +In the OpenAPI specification, there are a few properties that are defined as type `any`. This includes: + +- the example property in the parameter, media type objects +- the value property in the example object +- the values in the link object's parameters dictionary and `requestBody` property +- all `x-` extension properties + +In the v1 library, there are a set of classes that are derived from the `OpenApiAny` base class which is an abstract model which reflects the JSON data model plus some additional primitive types such as `decimal`, `float`, `datetime` etc. + +In v2 we are removing this abstraction and relying on the `JsonNode` model to represent these inner types. In v1 we were not able to reliably identify the additional primitive types and it caused a significant amount of false negatives in error reporting as well as incorrectly parsed data values. + +Due to `JsonNode` implicit operators, this makes initialization sometimes easier, instead of: + +```csharp +new OpenApiParameter +{ + In = null, + Name = "username", + Description = "username to fetch", + Example = new OpenApiFloat(5), +}; +``` + +the assignment becomes simply, + +```csharp + Example = 0.5f, +``` + +For a more complex example, where the developer wants to create an extension that is an object they would do this in v1: + +```csharp +var openApiObject = new OpenApiObject +{ + {"stringProp", new OpenApiString("stringValue1")}, + {"objProp", new OpenApiObject()}, + { + "arrayProp", + new OpenApiArray + { + new OpenApiBoolean(false) + } + } +}; +var parameter = new OpenApiParameter(); +parameter.Extensions.Add("x-foo", openApiObject); + +``` + +In v2, the equivalent code would be, + +```csharp +var openApiObject = new JsonObject +{ + {"stringProp", "stringValue1"}, + {"objProp", new JsonObject()}, + { + "arrayProp", + new JsonArray + { + false + } + } +}; +var parameter = new OpenApiParameter(); +parameter.Extensions.Add("x-foo", new JsonNodeExtension(openApiObject)); + +``` + +> Note: as part of this change, the following types have been removed from the library: +> +> - AnyType +> - IOpenApiAny +> - OpenApiAnyCloneHelper +> - OpenApiArray +> - OpenApiBinary +> - OpenApiBoolean +> - OpenApiByte +> - OpenApiDate +> - OpenApiDateTime +> - OpenApiDouble +> - OpenApiFloat +> - OpenApiInteger +> - OpenApiLong +> - OpenApiNull +> - OpenApiObject +> - OpenApiPassword +> - OpenApiPrimitive +> - OpenApiString +> - PrimitiveType + +### Enable Null Reference Type Support + +Version 2.0 introduces support for null reference types, which improves type safety and reduces the likelihood of null reference exceptions. + +**Example:** + +```csharp +var document = new OpenApiDocument +{ + Components = null +}; + +// 1.X: no compilation error or warning, but fails with a null reference exception at runtime +// 2.X: compilation error or warning depending on the project configuration +var componentA = document.Components["A"]; +``` + +### Ephemeral object properties are now in Metadata + +In version 1.X applications could add ephemeral properties to some of the models from the libraries. These properties would be carried along in an "Annotations" property, but not serialized. This is especially helpful when building integrations that build document in multiple phases and need additional context to complete the work. The property is now named metadata to avoid any confusion with other terms. The parent interface has also been renamed from `IOpenApiAnnotatable` to `IMetadataContainer`. + +```csharp +var schema = new OpenApiSchema(); + +// 1.X +var info = schema.Annotations["foo"]; +// 2.X +var info = schema.Metadata["foo"]; +``` + +### Updates to OpenApiSchema + +The OpenAPI 3.1 specification changes significantly how it leverages JSON Schema. In 3.0 and earlier, OpenAPI used a "subset, superset" of JSON Schema draft-4. This caused many problems for developers trying to use JSON Schema validation libraries with the JSON Schema in their OpenAPI descriptions. In OpenAPI 3.1, the 2020-12 draft version of JSON Schema was adopted and a new JSON Schema vocabulary was adopted to support OpenAPI specific keywords. All attempts to constrain what JSON Schema keywords could be used in OpenAPI were removed. + +#### New keywords introduced in 2020-12 + +```csharp +/// $schema, a JSON Schema dialect identifier. Value must be a URI +public string Schema { get; set; } +/// $id - Identifies a schema resource with its canonical URI. +public string Id { get; set; } +/// $comment - reserves a location for comments from schema authors to readers or maintainers of the schema. +public string Comment { get; set; } +/// $vocabulary- used in meta-schemas to identify the vocabularies available for use in schemas described by that meta-schema. +public IDictionary Vocabulary { get; set; } +/// $dynamicRef - an applicator that allows for deferring the full resolution until runtime, at which point it is resolved each time it is encountered while evaluating an instance +public string DynamicRef { get; set; } +/// $dynamicAnchor - used to create plain name fragments that are not tied to any particular structural location for referencing purposes, which are taken into consideration for dynamic referencing. +public string DynamicAnchor { get; set; } +/// $defs - reserves a location for schema authors to inline re-usable JSON Schemas into a more general schema. +public IDictionary Definitions { get; set; } +public IDictionary PatternProperties { get; set; } = new Dictionary(); +public bool UnevaluatedProperties { get; set;} + +``` + +#### Changes to existing keywords + +```csharp +public string? ExclusiveMaximum { get; set; } // type changed to reflect the new version of JSON schema +public string? ExclusiveMinimum { get; set; } // type changed to reflect the new version of JSON schema +public JsonSchemaType? Type { get; set; } // Was string, now flagged enum +public string? Maximum { get; set; } // type changed to overcome double vs decimal issues +public string? Minimum { get; set; } // type changed to overcome double vs decimal issues + +public JsonNode Default { get; set; } // Type matching no longer enforced. Was IOpenApiAny +public bool ReadOnly { get; set; } // No longer has defined semantics in OpenAPI 3.1 +public bool WriteOnly { get; set; } // No longer has defined semantics in OpenAPI 3.1 + +public JsonNode Example { get; set; } // No longer IOpenApiAny +public IList Examples { get; set; } +public IList Enum { get; set; } +public OpenApiExternalDocs ExternalDocs { get; set; } // OpenApi Vocab +public bool Deprecated { get; set; } // OpenApi Vocab +public OpenApiXml Xml { get; set; } // OpenApi Vocab + +public IDictionary Metadata { get; set; } // Custom property bag to be used by the application, used to be named annotations +``` + +#### OpenApiSchema methods + +Other than the addition of `SerializeAsV31`, the methods have not changed. + +```csharp +public class OpenApiSchema : IMetadataContainer, IOpenApiExtensible, IOpenApiReferenceable, IOpenApiSerializable +{ + public OpenApiSchema() { } + public OpenApiSchema(OpenApiSchema schema) { } + public void SerializeAsV31(IOpenApiWriter writer) { } + public void SerializeAsV3(IOpenApiWriter writer) { } + public void SerializeAsV2(IOpenApiWriter writer) { } +} + +``` + +## OpenAPI v3.1 Support + +There are a number of new features in OpenAPI v3.1 that are now supported in OpenAPI.NET. + +### JsonSchema Dialect and BaseUri in OpenApiDocument + +To enable full compatibility with JSON Schema, the `OpenApiDocument` class now supports a `JsonSchemaDialect` property. This property specifies the JSON Schema dialect used throughout the document, using a URI. By explicitly declaring the dialect, tooling can be directed to use a JSON Schema version other than the default [2020-12 draft](https://json-schema.org/draft/2020-12/json-schema-core.html). However, OpenAPI.NET does not guarantee compatibility with versions other than 2020-12. + +In addition, a `BaseUri` property has been added to represent the identity of the OpenAPI document. If the document’s identity is not provided or cannot be determined at based on its location, this property will be set to a generated placeholder URI. + +```csharp +/// +/// Describes an OpenAPI object (OpenAPI document). See: https://spec.openapis.org +/// +public class OpenApiDocument : IOpenApiSerializable, IOpenApiExtensible, IMetadataContainer +{ + /// + /// The default value for the $schema keyword within Schema Objects contained within this OAS document. This MUST be in the form of a URI. + /// + public Uri? JsonSchemaDialect { get; set; } + + /// + /// Absolute location of the document or a generated placeholder if location is not given + /// + public Uri BaseUri { get; internal set; } +} +``` + +### Webhooks + +```csharp + +public class OpenApiDocument : IOpenApiSerializable, IOpenApiExtensible, IOpenApiMetadataContainer +{ + public IDictionary? Webhooks { get; set; } = new Dictionary(); +} +``` + +### Summary in info object + +```csharp +public class OpenApiInfo : IOpenApiSerializable, IOpenApiExtensible +{ + /// + /// A short summary of the API. + /// + public string Summary { get; set; } +} +``` + +### License SPDX identifiers + +```csharp +/// +/// License Object. +/// +public class OpenApiLicense : IOpenApiSerializable, IOpenApiExtensible +{ + /// + /// An SPDX license expression for the API. The identifier field is mutually exclusive of the Url property. + /// + public string Identifier { get; set; } +} +``` + +### Reusable path items + +```csharp +/// +/// Components Object. +/// +public class OpenApiComponents : IOpenApiSerializable, IOpenApiExtensible +{ + /// + /// An object to hold reusable Object. + /// + public IDictionary? PathItems { get; set; } +} +``` + +### Summary and Description alongside $ref + +Through the use of proxy objects in order to represent references, it is now possible to set the Summary and Description property on an object that is a reference. This was previously not possible. + +```csharp +var parameter = new OpenApiParameterReference("id", hostDocument) +{ + Description = "Customer Id" +}; +``` + +Once serialized results in: + +```yaml +$ref: id +description: Customer Id +``` + +### Use HTTP Method Object Instead of Enum + +HTTP methods are now represented as objects instead of enums. This change enhances flexibility but requires updates to how HTTP methods are handled in your code. +Example: + +```csharp +// Before (1.6) +OpenApiOperation operation = new OpenApiOperation +{ + HttpMethod = OperationType.Get +}; + +// After (2.0) +OpenApiOperation operation = new OpenApiOperation +{ + HttpMethod = new HttpMethod("GET") // or HttpMethod.Get +}; +``` + +### References as Components + +References can now be used as components, allowing for more modular and reusable OpenAPI documents. + +**Example:** + +```csharp +// Before (1.6) +OpenApiSchema schema = new OpenApiSchema +{ + Reference = new OpenApiReference + { + Type = ReferenceType.Schema, + Id = "MySchema" + } +}; + +// After (2.0) +OpenApiComponents components = new OpenApiComponents +{ + Schemas = new Dictionary + { + ["MySchema"] = new OpenApiSchemaReference("MyOtherSchema") + { + Description = "Other reusable schema from initial schema" + } + } +}; +``` + +### OpenApiDocument.SerializeAs() + +The `SerializeAs()` method simplifies serialization scenarios, making it easier to convert OpenAPI documents to different formats. + +**Example:** + +```csharp +OpenApiDocument document = new OpenApiDocument(); +string json = await document.SerializeAsync(OpenApiSpecVersion.OpenApi3_0, OpenApiConstants.Json); + +``` + +### Use OpenApiConstants string Instead of OpenApiFormat Enum + +`OpenApiConstants` are now used instead the `OpenApiFormat` enumeration. + +**Example:** + +```csharp +// Before (1.6) +var outputString = openApiDocument.Serialize(OpenApiSpecVersion.OpenApi2_0, OpenApiFormat.Json); + +// After (2.0) +var outputString = await openApiDocument.SerializeAsync(OpenApiSpecVersion.OpenApi2_0, OpenApiConstants.Json); +``` + +### OpenApiSchema's Type property is now a flaggable enum + +In v2.0, the Type property in `OpenApiSchema` is now defined as a flaggable enum, allowing consumers to swap nullable for type arrays. + +**Example:** + +```csharp +// v1.6.x +var schema = new OpenApiSchema +{ + Type = "string", + Nullable = true +} + +// v2.0 +// bitwise OR(|) - combines flags to allow multiple types +var schema = new OpenApiSchema +{ + Type = JsonSchemaType.String | JsonSchemaType.Null +} + +// bitwise NOT(~) - inverts bits; filters out null flag +var schema = new OpenApiSchema +{ + Type = JsonSchemaType.String & ~JsonSchemaType.Null +} + +// bitwise AND(&) - intersects flags to check for a specific type +var schema = new OpenApiSchema +{ + Type = (JsonSchemaType.String & JsonSchemaType.Null) == JsonSchemaType.Null +} + +``` + +### Component registration in a document's workspace + +When loading up a file into an in-memory document, all the components contained in the document are registered within the document's workspace by default to aid with reference resolution. +However if you're working directly with a DOM and you need the references resolved, you can register the components as below: + +```csharp +// register all components +document.Workspace.RegisterComponents(OpenApiDocument document); + +// register single component +document.AddComponent(string id, T componentToRegister); +``` + +### Refactored model architecture + +The following structural improvements have been made to the OpenAPI model layer to enhance type safety, extensibility, and maintainability: + +1. Model Interfaces Introduced: +Each model now has a corresponding interface (e.g., `IOpenApiSchema` for `OpenApiSchema`). This allows for better abstraction and testing support, while also simplifying cross-cutting concerns like serialization. + +2. Models as Reference Types: +All models are now implemented as reference types to ensure consistent identity semantics, especially when managing circular references or shared definitions. + +3. Type Assertion Pattern Adopted: +A standardized pattern has been introduced for casting model instances to specific types safely and predictably, reducing the risk of invalid casts or reflection-based logic. + +4. Removed Reference Fields from Base Models: +Properties like `Reference` that were previously defined on base model types have been removed. Models that support referencing now handle this behavior explicitly via composition rather than inheritance. + +5. New Target and RecursiveTarget Properties: +A `Target` property that points to the actual resolved model instance as well as a `RecursiveTarget` property that handles recursive references and supports advanced dereferencing logic have been introduced. + +6. Removed OpenApiReferenceResolver: +This resolver class has been removed in favor of a more streamlined resolution model using the `Target` and `RecursiveTarget` properties along with updated reader/serializer pipelines. + +### Visitor and Validator now pass an interface model + +**Example:** + +```csharp +//v1.6.x +public override void Visit(OpenApiParameter parameter){} + +//v2.0 +public override void Visit(IOpenApiParameter parameter){} +``` + +### Cleaned up the IEffective/GetEffective infrastructure + +All the `IEffective` and `GetEffective` infrastructure in the models have been removed as we've implemented lazy reference resolution using the proxy design. + +### Shallow Copy in place of copy constructors + +Copy constructors for referenceable components have been made internal, a new `CreateShallowCopy()` method has been exposed on these models to facilitate cloning. + +**Example:** + +```csharp +var schema = new OpenApiSchema(); +var schemaCopy = schema.CreateShallowCopy(); +``` + +### Duplicated _style Property on Parameter Removed + +The redundant _style property on the Parameter model has been removed to simplify the model's structure. + +### Discriminator now use References + +Discriminator mappings have been updated from using a `Dictionary` to a `Dictionary`. This change improves the handling of discriminator mappings by referencing OpenAPI schema components more explicitly, which enhances schema resolution. + +**Example:** + +```csharp +// v1.6.x +Discriminator = new() +{ + PropertyName = "@odata.type", + Mapping = new Dictionary { + { + "#microsoft.graph.directoryObject", "#/components/schemas/microsoft.graph.directoryObject" + } + } +} + +//v2.0 +Discriminator = new() +{ + PropertyName = "@odata.type", + Mapping = new Dictionary { + { + "#microsoft.graph.directoryObject", new OpenApiSchemaReference("microsoft.graph.directoryObject") + } + } +} +``` + +### Bug Fixes + +## Serialization of References + +Fixed a bug where references would not serialize summary or descriptions in OpenAPI 3.1. +**Example:** + +```csharp +OpenApiSchemaReference schemaRef = new OpenApiSchemaReference("MySchema") +{ + Summary = "This is a summary", + Description = "This is a description" +}; +``` + +## Feedback + +If you have any feedback please file [a new GitHub issue](https://github.com/microsoft/OpenAPI.NET/issues) +The team is looking forward to hear your experience trying the new version and we hope you have fun busting out your OpenAPI 3.1 descriptions. diff --git a/docs/upgrade-guide-3.md b/docs/upgrade-guide-3.md new file mode 100644 index 000000000..49e467d24 --- /dev/null +++ b/docs/upgrade-guide-3.md @@ -0,0 +1,398 @@ +# Upgrade guide to OpenAPI.NET 3.0 + +## Introduction + +We are excited to announce OpenAPI.NET v3.0! This major update introduces support for OpenAPI v3.2 specification along with several API enhancements and refinements to the existing model architecture. + +> [!WARNING] +> This is a major version update that includes breaking changes. Please review this guide carefully before upgrading. + +## Integrations with ASP.NET Core + +If you are using this library with [AspNetCore OpenAPI versions](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi) `< 10.0` then you must remain on version `1.x` as it's not compatible with version 3 or above of this library. + +If you are using this library with [AspNetCore OpenAPI versions](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi) `= 10.X` then you must remain on version `2.x` as it's not compatible with version 3 or above of this library. + +If you are using this library with [Swashbuckle.AspNetCore version](https://www.nuget.org/packages/Swashbuckle.AspNetCore/) `< 10.0` then you must remain on version `1.x` as it's not compatible with version 3 or above of this library. + +If you are using this library with [Swashbuckle.AspNetCore version](https://www.nuget.org/packages/Swashbuckle.AspNetCore/) `= 10.X` then you must remain on version `2.x` as it's not compatible with version 3 or above of this library. + +The latest support policy information for this library, and integration with ASP.NET Core can be found on [the contributing documentation](https://github.com/microsoft/OpenAPI.NET/blob/main/CONTRIBUTING.md#branches-and-support-policy). + +## OpenAPI v3.2 Support + +The primary focus of OpenAPI.NET v3.0 is adding comprehensive support for OpenAPI specification v3.2. This includes new serialization methods, enhanced model properties, and expanded functionality across the entire API surface. + +### New Serialization Methods + +All serializable components now include a `SerializeAsV32` method alongside the existing serialization methods: + +```csharp +// v2.x +document.SerializeAsV31(writer); + +// v3.0 +document.SerializeAsV31(writer); +document.SerializeAsV32(writer); // New! +``` + +### OpenApiSpecVersion Enum Update + +A new version constant has been added: + +```csharp +public enum OpenApiSpecVersion +{ + OpenApi2_0 = 0, + OpenApi3_0 = 1, + OpenApi3_1 = 2, + OpenApi3_2 = 3, // New! +} +``` + +## Enhanced Media Type Support + +### IOpenApiMediaType Interface + +Media types are now represented by the `IOpenApiMediaType` interface, providing better abstraction and consistency across the API: + +```csharp +// v2.x +public IDictionary? Content { get; set; } + +// v3.0 +public IDictionary? Content { get; set; } +``` + +### New Media Type Properties + +The `IOpenApiMediaType` interface includes additional properties for enhanced functionality: + +```csharp +public interface IOpenApiMediaType +{ + IDictionary? Encoding { get; } + JsonNode? Example { get; } + IDictionary? Examples { get; } + OpenApiEncoding? ItemEncoding { get; } // New! + IOpenApiSchema? ItemSchema { get; } // New! + IList? PrefixEncoding { get; } // New! + IOpenApiSchema? Schema { get; } +} +``` + +### MediaTypes in Components + +Components now support reusable media types: + +```csharp +public class OpenApiComponents +{ + public IDictionary? MediaTypes { get; set; } // New! + // ... other existing properties +} +``` + +## Enhanced Example Support + +### New Example Properties + +Example objects now support additional data representation options: + +```csharp +public class OpenApiExample : IOpenApiExample +{ + public JsonNode? DataValue { get; set; } // New! + public string? SerializedValue { get; set; } // New! + public string? ExternalValue { get; set; } + public JsonNode? Value { get; set; } + // ... other properties +} +``` + +## Security Scheme Enhancements + +### Deprecated Property + +Security schemes now support a deprecated flag: + +```csharp +public interface IOpenApiSecurityScheme +{ + bool Deprecated { get; } // New! + // ... other existing properties +} +``` + +### Device Authorization Flow + +OAuth flows now support device authorization: + +```csharp +public class OpenApiOAuthFlows +{ + public OpenApiOAuthFlow? DeviceAuthorization { get; set; } // New! + // ... other existing flows +} + +public class OpenApiOAuthFlow +{ + public Uri? DeviceAuthorizationUrl { get; set; } // New! + // ... other existing properties +} +``` + +## Tag System Improvements + +### Hierarchical Tags + +Tags now support hierarchical organization with enhanced metadata: + +```csharp +public interface IOpenApiTag +{ + string? Kind { get; } // New! + string? Summary { get; } // New! + OpenApiTagReference? Parent { get; } // New! + string? Name { get; } + // ... other existing properties +} +``` + +## Response Enhancements + +### Summary Support + +Responses now implement `IOpenApiSummarizedElement` and support summary text: + +```csharp +// v2.x +public interface IOpenApiResponse : IOpenApiDescribedElement, ... +{ + // No summary support +} + +// v3.0 +public interface IOpenApiResponse : IOpenApiDescribedElement, + IOpenApiSummarizedElement, ... // New! +{ + // Inherits Summary property from IOpenApiSummarizedElement +} +``` + +## XML Improvements + +### Enhanced Node Type Support + +The XML object has been refactored to use a more flexible node type system: + +```csharp +// v2.x +public class OpenApiXml +{ + public bool Attribute { get; set; } // Removed! + public bool Wrapped { get; set; } // Removed! +} + +// v3.0 +public class OpenApiXml +{ + public OpenApiXmlNodeType? NodeType { get; set; } // New! +} + +public enum OpenApiXmlNodeType +{ + Element = 0, + Attribute = 1, + Text = 2, + Cdata = 3, + None = 4, +} +``` + +## Discriminator Enhancements + +### Default Mapping Support + +Discriminators now support default mapping scenarios: + +```csharp +public class OpenApiDiscriminator +{ + public OpenApiSchemaReference? DefaultMapping { get; set; } // New! + // ... other existing properties +} +``` + +## Document Enhancements + +### Self-Reference Support + +Documents can now specify their own identity URI: + +```csharp +public class OpenApiDocument +{ + public Uri? Self { get; set; } // New! + // ... other existing properties +} +``` + +## Parameter Location Enhancements + +### New Parameter Locations + +Additional parameter locations are now supported: + +```csharp +public enum ParameterLocation +{ + Query = 0, + Header = 1, + Path = 2, + Cookie = 3, + QueryString = 4, // New! +} +``` + +### New Parameter Styles + +```csharp +public enum ParameterStyle +{ + Matrix = 0, + Label = 1, + Form = 2, + Simple = 3, + SpaceDelimited = 4, + PipeDelimited = 5, + DeepObject = 6, + Cookie = 7, // New! +} +``` + +## Reference Type Enhancements + +### New Reference Types + +```csharp +public enum ReferenceType +{ + Schema = 0, + Response = 1, + Parameter = 2, + Example = 3, + RequestBody = 4, + Header = 5, + SecurityScheme = 6, + Link = 7, + Callback = 8, + Tag = 9, + PathItem = 10, + MediaType = 11, // New! +} +``` + +## Visitor Pattern Updates + +### Interface-Based Visiting + +The visitor pattern now works with interface types for better abstraction: + +```csharp +// v2.x +public virtual void Visit(OpenApiMediaType mediaType) { } + +// v3.0 +public virtual void Visit(IOpenApiMediaType mediaType) { } +``` + +## Version Detection + +### New Version Detection Method + +```csharp +public static class VersionService +{ + public static bool is3_2(this string version) { } // New! + // ... other existing version methods +} +``` + +## Migration Steps + +### 1. Update Media Type References + +Replace concrete `OpenApiMediaType` references with `IOpenApiMediaType`: + +```csharp +// Before +public IDictionary? Content { get; set; } + +// After +public IDictionary? Content { get; set; } +``` + +### 2. Update XML Object Usage + +Replace boolean properties with the new enum-based approach: + +```csharp +// Before +var xml = new OpenApiXml +{ + Attribute = true, + Wrapped = false +}; + +// After +var xml = new OpenApiXml +{ + NodeType = OpenApiXmlNodeType.Attribute +}; +``` + +### 3. Update Visitor Implementations + +Update visitor methods to use interface types: + +```csharp +// Before +public override void Visit(OpenApiMediaType mediaType) { /* ... */ } + +// After +public override void Visit(IOpenApiMediaType mediaType) { /* ... */ } +``` + +### 4. Add v3.2 Serialization Support + +If you have custom serialization logic, add support for v3.2: + +```csharp +public void SerializeAsV32(IOpenApiWriter writer) +{ + // Implement v3.2 specific serialization + SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_2); +} +``` + +## Breaking Changes Summary + +1. **Media Type Abstraction**: `OpenApiMediaType` replaced with `IOpenApiMediaType` interface in collection properties +2. **XML Object Refactoring**: `Attribute` and `Wrapped` boolean properties replaced with `NodeType` enum +3. **Visitor Pattern**: Methods now accept interface types instead of concrete types +4. **Response Interface**: `IOpenApiResponse` now extends `IOpenApiSummarizedElement` + +## New Features Summary + +1. **OpenAPI v3.2 Support**: Full serialization and model support +2. **Enhanced Media Types**: New properties for encoding and schema support +3. **Hierarchical Tags**: Support for tag organization with kind, summary, and parent relationships +4. **Security Enhancements**: Deprecated flag and device authorization flow support +5. **Enhanced Examples**: New data value and serialized value properties +6. **Document Self-Reference**: Support for document identity URIs +7. **Extended Parameter Support**: New locations and styles for parameters + +## Feedback + +If you have any feedback please file [a new GitHub issue](https://github.com/microsoft/OpenAPI.NET/issues). The team looks forward to hearing about your experience with OpenAPI.NET v3.0 and OpenAPI v3.2 support! diff --git a/global.json b/global.json new file mode 100644 index 000000000..7494875e1 --- /dev/null +++ b/global.json @@ -0,0 +1,8 @@ +{ + "sdk": { + "version": "10.0.401" + }, + "test": { + "runner": "Microsoft.Testing.Platform" + } +} \ No newline at end of file diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report-github.md b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report-github.md new file mode 100644 index 000000000..95726f79a --- /dev/null +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report-github.md @@ -0,0 +1,20 @@ +``` + +BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat) +AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores +.NET SDK 10.0.400 + [Host] : .NET 8.0.30 (8.0.30, 8.0.3026.36720), X64 RyuJIT x86-64-v3 + ShortRun : .NET 8.0.30 (8.0.30, 8.0.3026.36720), X64 RyuJIT x86-64-v3 + +Job=ShortRun IterationCount=3 LaunchCount=1 +WarmupCount=3 + +``` +| Method | Mean | Error | StdDev | Gen0 | Gen1 | Gen2 | Allocated | +|------------- |---------------:|--------------:|-------------:|-----------:|-----------:|----------:|-------------:| +| PetStoreYaml | 569.0 μs | 108.17 μs | 5.93 μs | 19.5313 | - | - | 327.8 KB | +| PetStoreJson | 250.8 μs | 20.85 μs | 1.14 μs | 11.7188 | 1.9531 | - | 209.67 KB | +| GHESYaml | 831,169.7 μs | 217,393.05 μs | 11,916.05 μs | 18000.0000 | 10000.0000 | 2000.0000 | 267570.8 KB | +| GHESJson | 367,711.4 μs | 135,955.63 μs | 7,452.19 μs | 9000.0000 | 8000.0000 | 2000.0000 | 140917.06 KB | +| GHESNextYaml | 1,040,243.2 μs | 167,595.29 μs | 9,186.46 μs | 30000.0000 | 11000.0000 | 2000.0000 | 469507.05 KB | +| GHESNextJson | 615,173.6 μs | 143,051.39 μs | 7,841.13 μs | 22000.0000 | 10000.0000 | 2000.0000 | 345247.91 KB | diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.csv b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.csv new file mode 100644 index 000000000..bb632a223 --- /dev/null +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.csv @@ -0,0 +1,7 @@ +Method,Job,AnalyzeLaunchVariance,EvaluateOverhead,MaxAbsoluteError,MaxRelativeError,MinInvokeCount,MinIterationTime,OutlierMode,Affinity,EnvironmentVariables,Jit,LargeAddressAware,Platform,PowerPlanMode,Runtime,AllowVeryLargeObjects,Concurrent,CpuGroups,Force,HeapAffinitizeMask,HeapCount,NoAffinitize,RetainVm,Server,Arguments,BuildConfiguration,Clock,EngineFactory,NuGetReferences,Toolchain,IsMutator,InvocationCount,IterationCount,IterationTime,LaunchCount,MaxIterationCount,MaxWarmupIterationCount,MemoryRandomization,MinIterationCount,MinWarmupIterationCount,RunStrategy,UnrollFactor,WarmupCount,Mean,Error,StdDev,Gen0,Gen1,Gen2,Allocated +PetStoreYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,569.0 μs,108.17 μs,5.93 μs,19.5313,0.0000,0.0000,327.8 KB +PetStoreJson,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,250.8 μs,20.85 μs,1.14 μs,11.7188,1.9531,0.0000,209.67 KB +GHESYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"831,169.7 μs","217,393.05 μs","11,916.05 μs",18000.0000,10000.0000,2000.0000,267570.8 KB +GHESJson,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"367,711.4 μs","135,955.63 μs","7,452.19 μs",9000.0000,8000.0000,2000.0000,140917.06 KB +GHESNextYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"1,040,243.2 μs","167,595.29 μs","9,186.46 μs",30000.0000,11000.0000,2000.0000,469507.05 KB +GHESNextJson,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"615,173.6 μs","143,051.39 μs","7,841.13 μs",22000.0000,10000.0000,2000.0000,345247.91 KB diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.html b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.html new file mode 100644 index 000000000..c9feca148 --- /dev/null +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.html @@ -0,0 +1,37 @@ + + + + +performance.Descriptions-20260819-014451 + + + + +

+BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
+AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
+.NET SDK 10.0.400
+  [Host]   : .NET 8.0.30 (8.0.30, 8.0.3026.36720), X64 RyuJIT x86-64-v3
+  ShortRun : .NET 8.0.30 (8.0.30, 8.0.3026.36720), X64 RyuJIT x86-64-v3
+
+
Job=ShortRun  IterationCount=3  LaunchCount=1  
+WarmupCount=3  
+
+ + + + + + + + + + +
MethodMean Error StdDevGen0Gen1Gen2Allocated
PetStoreYaml569.0 μs108.17 μs5.93 μs19.5313--327.8 KB
PetStoreJson250.8 μs20.85 μs1.14 μs11.71881.9531-209.67 KB
GHESYaml831,169.7 μs217,393.05 μs11,916.05 μs18000.000010000.00002000.0000267570.8 KB
GHESJson367,711.4 μs135,955.63 μs7,452.19 μs9000.00008000.00002000.0000140917.06 KB
GHESNextYaml1,040,243.2 μs167,595.29 μs9,186.46 μs30000.000011000.00002000.0000469507.05 KB
GHESNextJson615,173.6 μs143,051.39 μs7,841.13 μs22000.000010000.00002000.0000345247.91 KB
+ + diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.json b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.json new file mode 100644 index 000000000..48a5ce542 --- /dev/null +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.json @@ -0,0 +1 @@ +{"Title":"performance.Descriptions-20260819-014451","HostEnvironmentInfo":{"BenchmarkDotNetCaption":"BenchmarkDotNet","BenchmarkDotNetVersion":"0.15.8","OsVersion":"Linux Ubuntu 24.04.4 LTS (Noble Numbat)","ProcessorName":"AMD EPYC 7763","PhysicalProcessorCount":1,"PhysicalCoreCount":2,"LogicalCoreCount":4,"RuntimeVersion":".NET 8.0.30 (8.0.30, 8.0.3026.36720)","Architecture":"X64","HasAttachedDebugger":false,"HasRyuJit":true,"Configuration":"RELEASE","DotNetCliVersion":"10.0.400","ChronometerFrequency":{"Hertz":1000000000},"HardwareTimerKind":"Unknown"},"Benchmarks":[{"DisplayInfo":"Descriptions.PetStoreYaml: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"Descriptions","Method":"PetStoreYaml","MethodTitle":"PetStoreYaml","Parameters":"","FullName":"performance.Descriptions.PetStoreYaml","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[564311.92578125,566969.19921875,575649.48828125],"N":3,"Min":564311.92578125,"LowerFence":557137.390625,"Q1":565640.5625,"Median":566969.19921875,"Mean":568976.87109375,"Q3":571309.34375,"UpperFence":579812.515625,"Max":575649.48828125,"InterquartileRange":5668.78125,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":3423.3580311638007,"Variance":35158140.628601074,"StandardDeviation":5929.4300424746625,"Skewness":0.2997758570918541,"Kurtosis":0.6666666666666666,"ConfidenceInterval":{"N":3,"Mean":568976.87109375,"StandardError":3423.3580311638007,"Level":12,"Margin":108174.8768237002,"Lower":460801.9942700498,"Upper":677151.7479174501},"Percentiles":{"P0":564311.92578125,"P25":565640.5625,"P50":566969.19921875,"P67":569920.4975,"P80":572177.3726562499,"P85":573045.4015625,"P90":573913.43046875,"P95":574781.459375,"P100":575649.48828125}},"Memory":{"Gen0Collections":5,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":256,"BytesAllocatedPerOperation":335669},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":197650},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":102043900},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":2,"Nanoseconds":6775217},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":3,"Nanoseconds":8998815},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":4,"Nanoseconds":11652537},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":5,"Nanoseconds":15143396},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":6,"Nanoseconds":17723748},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":7,"Nanoseconds":20236856},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":8,"Nanoseconds":23153200},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":9,"Nanoseconds":31370343},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":10,"Nanoseconds":28335436},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":11,"Nanoseconds":30650597},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":12,"Nanoseconds":33548145},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":13,"Nanoseconds":36212997},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":14,"Nanoseconds":38538184},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":15,"Nanoseconds":41816444},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":16,"Nanoseconds":46979146},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":32,"Nanoseconds":95715167},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":64,"Nanoseconds":193013769},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":128,"Nanoseconds":440750495},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":256,"Nanoseconds":896748782},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":256,"Nanoseconds":266658432},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":256,"Nanoseconds":166843796},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":256,"Nanoseconds":145579008},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":256,"Nanoseconds":144463853},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":256,"Nanoseconds":145144115},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":256,"Nanoseconds":147366269},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":256,"Nanoseconds":144463853},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":256,"Nanoseconds":145144115},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":256,"Nanoseconds":147366269}],"Metrics":[{"Value":19.53125,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":335669,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"Descriptions.PetStoreJson: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"Descriptions","Method":"PetStoreJson","MethodTitle":"PetStoreJson","Parameters":"","FullName":"performance.Descriptions.PetStoreJson","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[250429.8046875,249969.353515625,252138.095703125],"N":3,"Min":249969.353515625,"LowerFence":248573.0224609375,"Q1":250199.5791015625,"Median":250429.8046875,"Mean":250845.75130208334,"Q3":251283.9501953125,"UpperFence":252910.5068359375,"Max":252138.095703125,"InterquartileRange":1084.37109375,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":659.7017908616169,"Variance":1305619.3585980735,"StandardDeviation":1142.637019616498,"Skewness":0.31578555509850176,"Kurtosis":0.6666666666666557,"ConfidenceInterval":{"N":3,"Mean":250845.75130208334,"StandardError":659.7017908616169,"Level":12,"Margin":20845.9528092565,"Lower":229999.79849282684,"Upper":271691.7041113399},"Percentiles":{"P0":249969.353515625,"P25":250199.5791015625,"P50":250429.8046875,"P67":251010.62363281252,"P80":251454.779296875,"P85":251625.6083984375,"P90":251796.4375,"P95":251967.2666015625,"P100":252138.095703125}},"Memory":{"Gen0Collections":6,"Gen1Collections":1,"Gen2Collections":0,"TotalOperations":512,"BytesAllocatedPerOperation":214707},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":197409},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":79866336},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":2,"Nanoseconds":2423720},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":3,"Nanoseconds":2900481},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":4,"Nanoseconds":3497628},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":5,"Nanoseconds":4578228},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":6,"Nanoseconds":5282434},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":7,"Nanoseconds":6184169},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":8,"Nanoseconds":7034449},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":9,"Nanoseconds":7735359},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":10,"Nanoseconds":8583154},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":11,"Nanoseconds":9439344},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":12,"Nanoseconds":10448681},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":13,"Nanoseconds":11227888},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":14,"Nanoseconds":11918418},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":15,"Nanoseconds":12691774},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":16,"Nanoseconds":13443649},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":32,"Nanoseconds":29337571},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":64,"Nanoseconds":68185744},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":128,"Nanoseconds":126972218},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":256,"Nanoseconds":278817629},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":512,"Nanoseconds":570992285},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":512,"Nanoseconds":472922572},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":512,"Nanoseconds":183608713},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":512,"Nanoseconds":133867437},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":512,"Nanoseconds":128220060},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":512,"Nanoseconds":127984309},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":512,"Nanoseconds":129094705},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":512,"Nanoseconds":128220060},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":512,"Nanoseconds":127984309},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":512,"Nanoseconds":129094705}],"Metrics":[{"Value":11.71875,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":1.953125,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":214707,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"Descriptions.GHESYaml: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"Descriptions","Method":"GHESYaml","MethodTitle":"GHESYaml","Parameters":"","FullName":"performance.Descriptions.GHESYaml","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[819861481,830035176,843612424],"N":3,"Min":819861481,"LowerFence":807135121.25,"Q1":824948328.5,"Median":830035176,"Mean":831169693.6666666,"Q3":836823800,"UpperFence":854637007.25,"Max":843612424,"InterquartileRange":11875471.5,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":6879732.821830035,"Variance":141992171099296.34,"StandardDeviation":11916046.789908823,"Skewness":0.09434617982902366,"Kurtosis":0.6666666666666677,"ConfidenceInterval":{"N":3,"Mean":831169693.6666666,"StandardError":6879732.821830035,"Level":12,"Margin":217393052.02863318,"Lower":613776641.6380334,"Upper":1048562745.6952999},"Percentiles":{"P0":819861481,"P25":824948328.5,"P50":830035176,"P67":834651440.3199999,"P80":838181524.8,"P85":839539249.6,"P90":840896974.4,"P95":842254699.1999999,"P100":843612424}},"Memory":{"Gen0Collections":18,"Gen1Collections":10,"Gen2Collections":2,"TotalOperations":1,"BytesAllocatedPerOperation":273992504},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":194554},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":1816413934},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":420},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":1120210689},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":871880264},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":825374981},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":826378659},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":819861481},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":830035176},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":843612424},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":819861481},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":830035176},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":843612424}],"Metrics":[{"Value":18000,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":10000,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":2000,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":273992504,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"Descriptions.GHESJson: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"Descriptions","Method":"GHESJson","MethodTitle":"GHESJson","Parameters":"","FullName":"performance.Descriptions.GHESJson","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[374007665,369642987,359483630],"N":3,"Min":359483630,"LowerFence":353670282.25,"Q1":364563308.5,"Median":369642987,"Mean":367711427.3333333,"Q3":371825326,"UpperFence":382718352.25,"Max":374007665,"InterquartileRange":7262017.5,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":4302522.137449395,"Variance":55535090229726.33,"StandardDeviation":7452186.942752196,"Skewness":-0.24178068534377525,"Kurtosis":0.6666666666666642,"ConfidenceInterval":{"N":3,"Mean":367711427.3333333,"StandardError":4302522.137449395,"Level":12,"Margin":135955631.28744856,"Lower":231755796.04588476,"Upper":503667058.6207819},"Percentiles":{"P0":359483630,"P25":364563308.5,"P50":369642987,"P67":371126977.52,"P80":372261793.79999995,"P85":372698261.6,"P90":373134729.4,"P95":373571197.2,"P100":374007665}},"Memory":{"Gen0Collections":9,"Gen1Collections":8,"Gen2Collections":2,"TotalOperations":1,"BytesAllocatedPerOperation":144299072},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":195856},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":975223512},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":441},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":875715626},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":839688152},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":474677312},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":359226370},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":374007665},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":369642987},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":359483630},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":374007665},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":369642987},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":359483630}],"Metrics":[{"Value":9000,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":8000,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":2000,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":144299072,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"Descriptions.GHESNextYaml: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"Descriptions","Method":"GHESNextYaml","MethodTitle":"GHESNextYaml","Parameters":"","FullName":"performance.Descriptions.GHESNextYaml","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[1031850117,1038822189,1050057430],"N":3,"Min":1031850117,"LowerFence":1021680668.25,"Q1":1035336153,"Median":1038822189,"Mean":1040243245.3333334,"Q3":1044439809.5,"UpperFence":1058095294.25,"Max":1050057430,"InterquartileRange":9103656.5,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":5303807.201651544,"Variance":84391112496872.33,"StandardDeviation":9186463.546810184,"Skewness":0.15098865470291933,"Kurtosis":0.6666666666666642,"ConfidenceInterval":{"N":3,"Mean":1040243245.3333334,"StandardError":5303807.201651544,"Level":12,"Margin":167595292.5497139,"Lower":872647952.7836194,"Upper":1207838537.8830473},"Percentiles":{"P0":1031850117,"P25":1035336153,"P50":1038822189,"P67":1042642170.94,"P80":1045563333.6,"P85":1046686857.7,"P90":1047810381.8,"P95":1048933905.9,"P100":1050057430}},"Memory":{"Gen0Collections":30,"Gen1Collections":11,"Gen2Collections":2,"TotalOperations":1,"BytesAllocatedPerOperation":480775224},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":199273},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":1997780911},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":371},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":1213954021},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":1054320076},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":1045325404},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":1040428481},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":1031850117},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":1038822189},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":1050057430},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":1031850117},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":1038822189},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":1050057430}],"Metrics":[{"Value":30000,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":11000,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":2000,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":480775224,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"Descriptions.GHESNextJson: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"Descriptions","Method":"GHESNextJson","MethodTitle":"GHESNextJson","Parameters":"","FullName":"performance.Descriptions.GHESNextJson","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[622134550,616707443,606678947],"N":3,"Min":606678947,"LowerFence":600101492.75,"Q1":611693195,"Median":616707443,"Mean":615173646.6666666,"Q3":619420996.5,"UpperFence":631012698.75,"Max":622134550,"InterquartileRange":7727801.5,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":4527078.322623851,"Variance":61483314417512.336,"StandardDeviation":7841129.664628199,"Skewness":-0.1881245265347803,"Kurtosis":0.6666666666666629,"ConfidenceInterval":{"N":3,"Mean":615173646.6666666,"StandardError":4527078.322623851,"Level":12,"Margin":143051394.40953976,"Lower":472122252.25712687,"Upper":758225041.0762064},"Percentiles":{"P0":606678947,"P25":611693195,"P50":616707443,"P67":618552659.38,"P80":619963707.2,"P85":620506417.9,"P90":621049128.6,"P95":621591839.3000001,"P100":622134550}},"Memory":{"Gen0Collections":22,"Gen1Collections":10,"Gen2Collections":2,"TotalOperations":1,"BytesAllocatedPerOperation":353533864},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":214201},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":1381429790},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":311},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":1103336699},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":641255058},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":618476409},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":613476192},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":622134550},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":616707443},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":606678947},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":622134550},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":1,"Nanoseconds":616707443},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":1,"Nanoseconds":606678947}],"Metrics":[{"Value":22000,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":10000,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":2000,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":353533864,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]}]} diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report-github.md b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report-github.md new file mode 100644 index 000000000..e4cb97496 --- /dev/null +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report-github.md @@ -0,0 +1,42 @@ +``` + +BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat) +AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores +.NET SDK 10.0.400 + [Host] : .NET 8.0.30 (8.0.30, 8.0.3026.36720), X64 RyuJIT x86-64-v3 + ShortRun : .NET 8.0.30 (8.0.30, 8.0.3026.36720), X64 RyuJIT x86-64-v3 + +Job=ShortRun IterationCount=3 LaunchCount=1 +WarmupCount=3 + +``` +| Method | Mean | Error | StdDev | Gen0 | Allocated | +|---------------------------- |-------------:|----------:|----------:|-------:|----------:| +| EmptyApiCallback | 13.883 ns | 31.303 ns | 1.7158 ns | 0.0019 | 32 B | +| EmptyApiComponents | 11.486 ns | 8.012 ns | 0.4391 ns | 0.0067 | 112 B | +| EmptyApiContact | 12.119 ns | 29.862 ns | 1.6368 ns | 0.0029 | 48 B | +| EmptyApiDiscriminator | 14.477 ns | 16.530 ns | 0.9061 ns | 0.0029 | 48 B | +| EmptyDocument | 1,159.023 ns | 41.293 ns | 2.2634 ns | 0.0687 | 1160 B | +| EmptyApiEncoding | 14.032 ns | 13.067 ns | 0.7163 ns | 0.0048 | 80 B | +| EmptyApiExample | 14.136 ns | 9.627 ns | 0.5277 ns | 0.0043 | 72 B | +| EmptyApiExternalDocs | 13.615 ns | 5.768 ns | 0.3161 ns | 0.0024 | 40 B | +| EmptyApiHeader | 15.168 ns | 23.385 ns | 1.2818 ns | 0.0048 | 80 B | +| EmptyApiInfo | 11.988 ns | 8.455 ns | 0.4634 ns | 0.0048 | 80 B | +| EmptyApiLicense | 15.973 ns | 11.512 ns | 0.6310 ns | 0.0029 | 48 B | +| EmptyApiLink | 11.352 ns | 20.723 ns | 1.1359 ns | 0.0043 | 72 B | +| EmptyApiMediaType | 12.567 ns | 17.009 ns | 0.9323 ns | 0.0048 | 80 B | +| EmptyApiOAuthFlow | 15.797 ns | 20.149 ns | 1.1044 ns | 0.0038 | 64 B | +| EmptyApiOAuthFlows | 15.136 ns | 55.718 ns | 3.0541 ns | 0.0038 | 64 B | +| EmptyApiOperation | 80.422 ns | 10.276 ns | 0.5633 ns | 0.0224 | 376 B | +| EmptyApiParameter | 11.119 ns | 12.830 ns | 0.7032 ns | 0.0057 | 96 B | +| EmptyApiPathItem | 15.189 ns | 55.661 ns | 3.0510 ns | 0.0038 | 64 B | +| EmptyApiPaths | 68.082 ns | 11.260 ns | 0.6172 ns | 0.0148 | 248 B | +| EmptyApiRequestBody | 10.824 ns | 10.037 ns | 0.5501 ns | 0.0029 | 48 B | +| EmptyApiResponse | 14.045 ns | 39.447 ns | 2.1622 ns | 0.0038 | 64 B | +| EmptyApiResponses | 64.353 ns | 13.642 ns | 0.7478 ns | 0.0148 | 248 B | +| EmptyApiSchema | 25.053 ns | 3.922 ns | 0.2150 ns | 0.0306 | 512 B | +| EmptyApiSecurityRequirement | 17.377 ns | 2.781 ns | 0.1524 ns | 0.0062 | 104 B | +| EmptyApiSecurityScheme | 10.360 ns | 1.932 ns | 0.1059 ns | 0.0062 | 104 B | +| EmptyApiServer | 15.258 ns | 20.720 ns | 1.1357 ns | 0.0033 | 56 B | +| EmptyApiServerVariable | 8.365 ns | 1.520 ns | 0.0833 ns | 0.0029 | 48 B | +| EmptyApiTag | 14.267 ns | 10.334 ns | 0.5665 ns | 0.0043 | 72 B | diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.csv b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.csv new file mode 100644 index 000000000..b57c5db53 --- /dev/null +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.csv @@ -0,0 +1,29 @@ +Method,Job,AnalyzeLaunchVariance,EvaluateOverhead,MaxAbsoluteError,MaxRelativeError,MinInvokeCount,MinIterationTime,OutlierMode,Affinity,EnvironmentVariables,Jit,LargeAddressAware,Platform,PowerPlanMode,Runtime,AllowVeryLargeObjects,Concurrent,CpuGroups,Force,HeapAffinitizeMask,HeapCount,NoAffinitize,RetainVm,Server,Arguments,BuildConfiguration,Clock,EngineFactory,NuGetReferences,Toolchain,IsMutator,InvocationCount,IterationCount,IterationTime,LaunchCount,MaxIterationCount,MaxWarmupIterationCount,MemoryRandomization,MinIterationCount,MinWarmupIterationCount,RunStrategy,UnrollFactor,WarmupCount,Mean,Error,StdDev,Gen0,Allocated +EmptyApiCallback,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,13.883 ns,31.303 ns,1.7158 ns,0.0019,32 B +EmptyApiComponents,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,11.486 ns,8.012 ns,0.4391 ns,0.0067,112 B +EmptyApiContact,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,12.119 ns,29.862 ns,1.6368 ns,0.0029,48 B +EmptyApiDiscriminator,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,14.477 ns,16.530 ns,0.9061 ns,0.0029,48 B +EmptyDocument,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"1,159.023 ns",41.293 ns,2.2634 ns,0.0687,1160 B +EmptyApiEncoding,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,14.032 ns,13.067 ns,0.7163 ns,0.0048,80 B +EmptyApiExample,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,14.136 ns,9.627 ns,0.5277 ns,0.0043,72 B +EmptyApiExternalDocs,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,13.615 ns,5.768 ns,0.3161 ns,0.0024,40 B +EmptyApiHeader,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,15.168 ns,23.385 ns,1.2818 ns,0.0048,80 B +EmptyApiInfo,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,11.988 ns,8.455 ns,0.4634 ns,0.0048,80 B +EmptyApiLicense,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,15.973 ns,11.512 ns,0.6310 ns,0.0029,48 B +EmptyApiLink,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,11.352 ns,20.723 ns,1.1359 ns,0.0043,72 B +EmptyApiMediaType,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,12.567 ns,17.009 ns,0.9323 ns,0.0048,80 B +EmptyApiOAuthFlow,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,15.797 ns,20.149 ns,1.1044 ns,0.0038,64 B +EmptyApiOAuthFlows,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,15.136 ns,55.718 ns,3.0541 ns,0.0038,64 B +EmptyApiOperation,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,80.422 ns,10.276 ns,0.5633 ns,0.0224,376 B +EmptyApiParameter,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,11.119 ns,12.830 ns,0.7032 ns,0.0057,96 B +EmptyApiPathItem,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,15.189 ns,55.661 ns,3.0510 ns,0.0038,64 B +EmptyApiPaths,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,68.082 ns,11.260 ns,0.6172 ns,0.0148,248 B +EmptyApiRequestBody,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,10.824 ns,10.037 ns,0.5501 ns,0.0029,48 B +EmptyApiResponse,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,14.045 ns,39.447 ns,2.1622 ns,0.0038,64 B +EmptyApiResponses,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,64.353 ns,13.642 ns,0.7478 ns,0.0148,248 B +EmptyApiSchema,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,25.053 ns,3.922 ns,0.2150 ns,0.0306,512 B +EmptyApiSecurityRequirement,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,17.377 ns,2.781 ns,0.1524 ns,0.0062,104 B +EmptyApiSecurityScheme,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,10.360 ns,1.932 ns,0.1059 ns,0.0062,104 B +EmptyApiServer,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,15.258 ns,20.720 ns,1.1357 ns,0.0033,56 B +EmptyApiServerVariable,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,8.365 ns,1.520 ns,0.0833 ns,0.0029,48 B +EmptyApiTag,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,14.267 ns,10.334 ns,0.5665 ns,0.0043,72 B diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.html b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.html new file mode 100644 index 000000000..2a4d3ed49 --- /dev/null +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.html @@ -0,0 +1,59 @@ + + + + +performance.EmptyModels-20260819-014555 + + + + +

+BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.4 LTS (Noble Numbat)
+AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
+.NET SDK 10.0.400
+  [Host]   : .NET 8.0.30 (8.0.30, 8.0.3026.36720), X64 RyuJIT x86-64-v3
+  ShortRun : .NET 8.0.30 (8.0.30, 8.0.3026.36720), X64 RyuJIT x86-64-v3
+
+
Job=ShortRun  IterationCount=3  LaunchCount=1  
+WarmupCount=3  
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Mean ErrorStdDevGen0Allocated
EmptyApiCallback13.883 ns31.303 ns1.7158 ns0.001932 B
EmptyApiComponents11.486 ns8.012 ns0.4391 ns0.0067112 B
EmptyApiContact12.119 ns29.862 ns1.6368 ns0.002948 B
EmptyApiDiscriminator14.477 ns16.530 ns0.9061 ns0.002948 B
EmptyDocument1,159.023 ns41.293 ns2.2634 ns0.06871160 B
EmptyApiEncoding14.032 ns13.067 ns0.7163 ns0.004880 B
EmptyApiExample14.136 ns9.627 ns0.5277 ns0.004372 B
EmptyApiExternalDocs13.615 ns5.768 ns0.3161 ns0.002440 B
EmptyApiHeader15.168 ns23.385 ns1.2818 ns0.004880 B
EmptyApiInfo11.988 ns8.455 ns0.4634 ns0.004880 B
EmptyApiLicense15.973 ns11.512 ns0.6310 ns0.002948 B
EmptyApiLink11.352 ns20.723 ns1.1359 ns0.004372 B
EmptyApiMediaType12.567 ns17.009 ns0.9323 ns0.004880 B
EmptyApiOAuthFlow15.797 ns20.149 ns1.1044 ns0.003864 B
EmptyApiOAuthFlows15.136 ns55.718 ns3.0541 ns0.003864 B
EmptyApiOperation80.422 ns10.276 ns0.5633 ns0.0224376 B
EmptyApiParameter11.119 ns12.830 ns0.7032 ns0.005796 B
EmptyApiPathItem15.189 ns55.661 ns3.0510 ns0.003864 B
EmptyApiPaths68.082 ns11.260 ns0.6172 ns0.0148248 B
EmptyApiRequestBody10.824 ns10.037 ns0.5501 ns0.002948 B
EmptyApiResponse14.045 ns39.447 ns2.1622 ns0.003864 B
EmptyApiResponses64.353 ns13.642 ns0.7478 ns0.0148248 B
EmptyApiSchema25.053 ns3.922 ns0.2150 ns0.0306512 B
EmptyApiSecurityRequirement17.377 ns2.781 ns0.1524 ns0.0062104 B
EmptyApiSecurityScheme10.360 ns1.932 ns0.1059 ns0.0062104 B
EmptyApiServer15.258 ns20.720 ns1.1357 ns0.003356 B
EmptyApiServerVariable8.365 ns1.520 ns0.0833 ns0.002948 B
EmptyApiTag14.267 ns10.334 ns0.5665 ns0.004372 B
+ + diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.json b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.json new file mode 100644 index 000000000..9481a1c56 --- /dev/null +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.json @@ -0,0 +1 @@ +{"Title":"performance.EmptyModels-20260819-014555","HostEnvironmentInfo":{"BenchmarkDotNetCaption":"BenchmarkDotNet","BenchmarkDotNetVersion":"0.15.8","OsVersion":"Linux Ubuntu 24.04.4 LTS (Noble Numbat)","ProcessorName":"AMD EPYC 7763","PhysicalProcessorCount":1,"PhysicalCoreCount":2,"LogicalCoreCount":4,"RuntimeVersion":".NET 8.0.30 (8.0.30, 8.0.3026.36720)","Architecture":"X64","HasAttachedDebugger":false,"HasRyuJit":true,"Configuration":"RELEASE","DotNetCliVersion":"10.0.400","ChronometerFrequency":{"Hertz":1000000000},"HardwareTimerKind":"Unknown"},"Benchmarks":[{"DisplayInfo":"EmptyModels.EmptyApiCallback: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiCallback","MethodTitle":"EmptyApiCallback","Parameters":"","FullName":"performance.EmptyModels.EmptyApiCallback","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[11.920415669679642,14.626024067401886,15.101312905550003],"N":3,"Min":11.920415669679642,"LowerFence":10.887546941637993,"Q1":13.273219868540764,"Median":14.626024067401886,"Mean":13.88258421421051,"Q3":14.863668486475945,"UpperFence":17.249341413378716,"Max":15.101312905550003,"InterquartileRange":1.5904486179351807,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.9906317711065058,"Variance":2.944053917776837,"StandardDeviation":1.7158245591484105,"Skewness":-0.3519415512011998,"Kurtosis":0.6666666666666667,"ConfidenceInterval":{"N":3,"Mean":13.88258421421051,"StandardError":0.9906317711065058,"Level":12,"Margin":31.303027273679504,"Lower":-17.420443059468994,"Upper":45.185611487890014},"Percentiles":{"P0":11.920415669679642,"P25":13.273219868540764,"P50":14.626024067401886,"P67":14.787622272372246,"P80":14.911197370290758,"P85":14.958726254105567,"P90":15.00625513792038,"P95":15.053784021735192,"P100":15.101312905550003}},"Memory":{"Gen0Collections":64,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":32},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":241703},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":214060},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":462074},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":498873},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2245},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":2314},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":3947},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":17793},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":19847},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":17913},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":38622},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":71484},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":162274},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":238456},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":487601},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":788705},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":1610733},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":3157575},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":6281809},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":12872585},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":14365768},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":32031938},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":55142020},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":143955846},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":312979806},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":781010871},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142394676},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":156836977},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121639389},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121462828},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121440546},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121578464},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121975897},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":124768340},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121465222},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121444173},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121578434},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121351392},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121356846},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121606923},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121793112},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121468124},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121555838},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121408463},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121561030},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121472407},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121329420},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121752882},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121641684},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121341793},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":606223058},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":661531885},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":673018029},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":521455184},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":612240337},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":628188384},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":399982777},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":490767930},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":506715977}],"Metrics":[{"Value":0.0019073486328125,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":32,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiComponents: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiComponents","MethodTitle":"EmptyApiComponents","Parameters":"","FullName":"performance.EmptyModels.EmptyApiComponents","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[10.989385411143303,11.648149192333221,11.821825921535492],"N":3,"Min":10.989385411143303,"LowerFence":10.69443691894412,"Q1":11.318767301738262,"Median":11.648149192333221,"Mean":11.48645350833734,"Q3":11.734987556934357,"UpperFence":12.359317939728498,"Max":11.821825921535492,"InterquartileRange":0.4162202551960945,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.25354054343942334,"Variance":0.19284842150267428,"StandardDeviation":0.43914510301570514,"Skewness":-0.31828598889988385,"Kurtosis":0.6666666666666685,"ConfidenceInterval":{"N":3,"Mean":11.48645350833734,"StandardError":0.25354054343942334,"Level":12,"Margin":8.0116414370628,"Lower":3.47481207127454,"Upper":19.49809494540014},"Percentiles":{"P0":10.989385411143303,"P25":11.318767301738262,"P50":11.648149192333221,"P67":11.707199280261992,"P80":11.752355229854583,"P85":11.769722902774811,"P90":11.787090575695037,"P95":11.804458248615266,"P100":11.821825921535492}},"Memory":{"Gen0Collections":449,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":67108864,"BytesAllocatedPerOperation":112},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":197639},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":221344},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":427429},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":488614},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2374},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":2375},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":17443},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":21981},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":30397},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":41116},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":106970},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":165549},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":226293},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":504182},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":1039584},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1996563},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":4019495},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":7512355},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":6396439},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":9093171},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":18426681},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":36734460},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":70277442},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":121798567},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":246862078},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":491690114},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":23,"Operations":67108864,"Nanoseconds":966020523},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":296897095},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":243363518},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":242797695},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":67108864,"Nanoseconds":242773033},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":67108864,"Nanoseconds":244901672},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":67108864,"Nanoseconds":243044611},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":67108864,"Nanoseconds":243257248},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":8,"Operations":67108864,"Nanoseconds":243108961},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":243369257},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":244761590},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":243506995},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":67108864,"Nanoseconds":256314848},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":67108864,"Nanoseconds":243206905},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":67108864,"Nanoseconds":243080768},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":67108864,"Nanoseconds":243279379},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":67108864,"Nanoseconds":243106647},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":67108864,"Nanoseconds":243172530},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":67108864,"Nanoseconds":243194151},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":67108864,"Nanoseconds":243283938},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":67108864,"Nanoseconds":243069237},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":67108864,"Nanoseconds":242983105},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":67108864,"Nanoseconds":243082812},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":67108864,"Nanoseconds":243081360},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":1022636788},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":985009108},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":975149176},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":980679322},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":1024888211},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":1036543459},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":737485171},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":781694060},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":793349308}],"Metrics":[{"Value":0.006690621376037598,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":112,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiContact: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiContact","MethodTitle":"EmptyApiContact","Parameters":"","FullName":"performance.EmptyModels.EmptyApiContact","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[13.832493662834167,10.571551144123077,11.9527208507061],"N":3,"Min":10.571551144123077,"LowerFence":8.816429108381271,"Q1":11.262135997414589,"Median":11.9527208507061,"Mean":12.118921885887781,"Q3":12.892607256770134,"UpperFence":15.338314145803452,"Max":13.832493662834167,"InterquartileRange":1.630471259355545,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.9450138650933565,"Variance":2.679153615656054,"StandardDeviation":1.6368120281987342,"Skewness":0.10049257679604287,"Kurtosis":0.6666666666666666,"ConfidenceInterval":{"N":3,"Mean":12.118921885887781,"StandardError":0.9450138650933565,"Level":12,"Margin":29.861544577740172,"Lower":-17.74262269185239,"Upper":41.980466463627955},"Percentiles":{"P0":10.571551144123077,"P25":11.262135997414589,"P50":11.9527208507061,"P67":12.591843606829643,"P80":13.08058453798294,"P85":13.268561819195748,"P90":13.456539100408554,"P95":13.644516381621361,"P100":13.832493662834167}},"Memory":{"Gen0Collections":96,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":48},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":202589},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":236241},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":457977},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":450863},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":3095},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":9729},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":2685},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":19817},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":27862},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":13536},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":45956},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":89788},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":196036},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":275635},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":549006},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1091560},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2184885},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":4348249},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":8158672},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":10411664},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":15014078},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":31064113},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":59164124},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":124644447},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":239297054},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":578476605},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142501741},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":135571405},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121595978},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121829054},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121677049},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121526438},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121693139},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121502724},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121440938},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121694432},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121501581},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121833031},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121752781},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121683773},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121590066},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121449344},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121479831},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121794429},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121563938},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121691617},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121451658},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121639339},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121525584},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":531822926},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":506140626},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":520047529},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":585731534},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":476312460},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":522656825},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":464141468},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":354722394},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":401066759}],"Metrics":[{"Value":0.00286102294921875,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":48,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiDiscriminator: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiDiscriminator","MethodTitle":"EmptyApiDiscriminator","Parameters":"","FullName":"performance.EmptyModels.EmptyApiDiscriminator","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[14.183305829763412,15.493000894784927,13.75347313284874],"N":3,"Min":13.75347313284874,"LowerFence":12.663743659853935,"Q1":13.968389481306076,"Median":14.183305829763412,"Mean":14.476593285799026,"Q3":14.83815336227417,"UpperFence":16.14279918372631,"Max":15.493000894784927,"InterquartileRange":0.8697638809680939,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.523132347033254,"Variance":0.8210023575375622,"StandardDeviation":0.9060918041443495,"Skewness":0.2897712238431732,"Kurtosis":0.6666666666666666,"ConfidenceInterval":{"N":3,"Mean":14.476593285799026,"StandardError":0.523132347033254,"Level":12,"Margin":16.530487517712903,"Lower":-2.053894231913876,"Upper":31.00708080351193},"Percentiles":{"P0":13.75347313284874,"P25":13.968389481306076,"P50":14.183305829763412,"P67":14.628602151870727,"P80":14.96912286877632,"P85":15.100092375278475,"P90":15.231061881780622,"P95":15.362031388282775,"P100":15.493000894784927}},"Memory":{"Gen0Collections":96,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":48},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":196888},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":227546},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":450452},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":454179},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2244},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":9448},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":3747},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":22432},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":28774},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":18755},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":55774},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":96520},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":169056},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":232445},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":513871},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1016450},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2015968},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":4057944},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":8148900},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":10422961},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":15435048},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":30380331},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":57901168},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":121876278},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":310175994},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":573746102},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142335397},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":155126124},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121555529},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121564245},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121847285},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121668250},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121429795},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121506769},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121637092},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121605323},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121375663},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121400230},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121929706},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121504485},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121582571},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121464320},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121463518},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121634849},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121492382},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121437269},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121772405},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":641946694},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":587669033},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":569390252},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":597417256},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":641363330},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":582994464},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":475912771},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":519858845},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":461489979}],"Metrics":[{"Value":0.00286102294921875,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":48,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyDocument: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyDocument","MethodTitle":"EmptyDocument","Parameters":"","FullName":"performance.EmptyModels.EmptyDocument","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[1156.754934310913,1159.0310401916504,1161.281702041626],"N":3,"Min":1156.754934310913,"LowerFence":1154.497911453247,"Q1":1157.8929872512817,"Median":1159.0310401916504,"Mean":1159.0225588480632,"Q3":1160.1563711166382,"UpperFence":1163.5514469146729,"Max":1161.281702041626,"InterquartileRange":2.2633838653564453,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":1.306772164769318,"Variance":5.122960471847668,"StandardDeviation":2.263395783297227,"Skewness":-0.0037471239279567993,"Kurtosis":0.6666666666666671,"ConfidenceInterval":{"N":3,"Mean":1159.0225588480632,"StandardError":1.306772164769318,"Level":12,"Margin":41.292764786423604,"Lower":1117.7297940616397,"Upper":1200.3153236344867},"Percentiles":{"P0":1156.754934310913,"P25":1157.8929872512817,"P50":1159.0310401916504,"P67":1159.796265220642,"P80":1160.3814373016357,"P85":1160.6065034866333,"P90":1160.8315696716309,"P95":1161.0566358566284,"P100":1161.281702041626}},"Memory":{"Gen0Collections":36,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":524288,"BytesAllocatedPerOperation":1160},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":194033},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":7600839},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":477773},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":597818},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":55504},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":97212},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":179866},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":342130},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":685362},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":1256449},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":2460750},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":4924937},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":9841428},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":19949864},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":42465286},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":67454562},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":106033692},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":151491662},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":305067310},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":609365472},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":524288,"Nanoseconds":2235619},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":524288,"Nanoseconds":2240799},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":524288,"Nanoseconds":2232383},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":524288,"Nanoseconds":2229467},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":524288,"Nanoseconds":2237132},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":524288,"Nanoseconds":2235218},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":524288,"Nanoseconds":2238104},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":524288,"Nanoseconds":2227594},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":524288,"Nanoseconds":2262570},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":524288,"Nanoseconds":2241240},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":524288,"Nanoseconds":2258662},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":524288,"Nanoseconds":2252351},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":524288,"Nanoseconds":2263121},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":524288,"Nanoseconds":2243324},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":524288,"Nanoseconds":2262600},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":524288,"Nanoseconds":2264273},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":524288,"Nanoseconds":2255176},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":524288,"Nanoseconds":2235058},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":524288,"Nanoseconds":2279872},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":524288,"Nanoseconds":2235699},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":524288,"Nanoseconds":2232563},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":524288,"Nanoseconds":614376691},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":524288,"Nanoseconds":609198801},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":524288,"Nanoseconds":609155640},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":524288,"Nanoseconds":608725082},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":524288,"Nanoseconds":609918417},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":524288,"Nanoseconds":611098412},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":524288,"Nanoseconds":606472731},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":524288,"Nanoseconds":607666066},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":524288,"Nanoseconds":608846061}],"Metrics":[{"Value":0.06866455078125,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":1160,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiEncoding: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiEncoding","MethodTitle":"EmptyApiEncoding","Parameters":"","FullName":"performance.EmptyModels.EmptyApiEncoding","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[13.355366349220276,14.782143265008926,13.957884818315506],"N":3,"Min":13.355366349220276,"LowerFence":12.586542896926403,"Q1":13.656625583767891,"Median":13.957884818315506,"Mean":14.03179814418157,"Q3":14.370014041662216,"UpperFence":15.440096728503704,"Max":14.782143265008926,"InterquartileRange":0.7133884578943253,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.41352971544266753,"Variance":0.5130204766622807,"StandardDeviation":0.7162544775862003,"Skewness":0.10209530493815869,"Kurtosis":0.6666666666666664,"ConfidenceInterval":{"N":3,"Mean":14.03179814418157,"StandardError":0.41352971544266753,"Level":12,"Margin":13.067147994375217,"Lower":0.9646501498063529,"Upper":27.098946138556787},"Percentiles":{"P0":13.355366349220276,"P25":13.656625583767891,"P50":13.957884818315506,"P67":14.238132690191268,"P80":14.452439886331558,"P85":14.5348657310009,"P90":14.617291575670242,"P95":14.699717420339585,"P100":14.782143265008926}},"Memory":{"Gen0Collections":160,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":80},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":224840},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":228607},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":494735},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":486038},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":3126},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":3116},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":23524},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":22201},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":42179},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":40516},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":84978},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":130945},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":241582},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":439011},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":772434},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1485166},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2993955},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5848290},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":8494114},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":8203912},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":16587348},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":34941328},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":66588169},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":175172312},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":300140002},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":662347616},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142655014},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":150256547},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121739818},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121497305},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121537459},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121551676},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":122074352},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121587372},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121722716},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121551436},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121900298},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121613411},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121730190},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121584186},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121588695},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121466748},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121730761},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121483098},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121499899},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121738836},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121584217},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121528032},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121603142},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":581329840},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":633379962},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":601367990},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":569720427},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":617595116},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":589937592},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":448131732},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":496006421},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":468348897}],"Metrics":[{"Value":0.00476837158203125,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":80,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiExample: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiExample","MethodTitle":"EmptyApiExample","Parameters":"","FullName":"performance.EmptyModels.EmptyApiExample","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[13.620836287736893,14.675340682268143,14.110490381717682],"N":3,"Min":13.620836287736893,"LowerFence":13.07478503882885,"Q1":13.865663334727287,"Median":14.110490381717682,"Mean":14.135555783907572,"Q3":14.392915531992912,"UpperFence":15.18379382789135,"Max":14.675340682268143,"InterquartileRange":0.527252197265625,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.3046670780330749,"Variance":0.27846608531163525,"StandardDeviation":0.5276988585468375,"Skewness":0.04739227552978975,"Kurtosis":0.6666666666666669,"ConfidenceInterval":{"N":3,"Mean":14.135555783907572,"StandardError":0.3046670780330749,"Level":12,"Margin":9.62719158745438,"Lower":4.508364196453192,"Upper":23.762747371361954},"Percentiles":{"P0":13.620836287736893,"P25":13.865663334727287,"P50":14.110490381717682,"P67":14.30253948390484,"P80":14.449400562047959,"P85":14.505885592103006,"P90":14.56237062215805,"P95":14.618855652213098,"P100":14.675340682268143}},"Memory":{"Gen0Collections":144,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":72},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":194905},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":224600},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":455842},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":490196},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2315},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":2435},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":21661},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":23404},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":36458},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":39945},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":108272},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":130083},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":232535},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":443690},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":709086},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1364151},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2740103},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5232912},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":9331775},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":8533493},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":16413714},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":34898620},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":66421690},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":146901461},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":290487394},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":590458856},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142690709},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":155125194},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121572560},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121579453},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121579143},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121582797},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121519492},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121517347},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":122089948},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121589913},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121776892},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121424945},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121746766},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121530302},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121542624},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121483513},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":123604369},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121513359},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121811917},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":122484095},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":588840141},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":566119926},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":573648010},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":578622222},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":614005518},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":595052287},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":457039425},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":492422721},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":473469490}],"Metrics":[{"Value":0.004291534423828125,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":72,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiExternalDocs: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiExternalDocs","MethodTitle":"EmptyApiExternalDocs","Parameters":"","FullName":"performance.EmptyModels.EmptyApiExternalDocs","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[13.30228665471077,13.609631687402725,13.934480518102646],"N":3,"Min":13.30228665471077,"LowerFence":12.98181377351284,"Q1":13.455959171056747,"Median":13.609631687402725,"Mean":13.615466286738714,"Q3":13.772056102752686,"UpperFence":14.246201500296593,"Max":13.934480518102646,"InterquartileRange":0.3160969316959381,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.18252196410262997,"Variance":0.09994280213964521,"StandardDeviation":0.31613731532301786,"Skewness":0.018449615626440978,"Kurtosis":0.6666666666666664,"ConfidenceInterval":{"N":3,"Mean":13.615466286738714,"StandardError":0.18252196410262997,"Level":12,"Margin":5.767521481739256,"Lower":7.847944804999458,"Upper":19.38298776847797},"Percentiles":{"P0":13.30228665471077,"P25":13.455959171056747,"P50":13.609631687402725,"P67":13.720080289840698,"P80":13.804540985822676,"P85":13.83702586889267,"P90":13.869510751962661,"P95":13.901995635032653,"P100":13.934480518102646}},"Memory":{"Gen0Collections":80,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":40},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":201287},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":261849},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":434893},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":461162},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2275},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":13725},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":3246},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":25177},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":25488},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":20919},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":67296},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":93294},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":154359},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":285223},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":612946},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":961568},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":1874104},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":3740413},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":7073062},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":11820197},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":14720950},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":30616375},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":58173821},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":140536082},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":388330425},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":701212405},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142653310},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":154931594},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121457726},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121499494},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121381554},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121491169},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":122034224},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121408685},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121637462},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121496188},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121574645},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121550089},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121491629},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121406550},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121870548},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121582941},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121472924},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121650908},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121618547},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":123074208},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":563833455},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":670607512},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":644974148},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":567925318},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":578238106},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":589138224},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":446350673},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":456663461},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":467563579}],"Metrics":[{"Value":0.002384185791015625,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":40,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiHeader: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiHeader","MethodTitle":"EmptyApiHeader","Parameters":"","FullName":"performance.EmptyModels.EmptyApiHeader","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[15.151425629854202,16.458682358264923,13.895179152488708],"N":3,"Min":13.895179152488708,"LowerFence":12.600674986839294,"Q1":14.523302391171455,"Median":15.151425629854202,"Mean":15.168429046869278,"Q3":15.805053994059563,"UpperFence":17.727681398391724,"Max":16.458682358264923,"InterquartileRange":1.2817516028881073,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.7400684672490048,"Variance":1.6431040086488737,"StandardDeviation":1.2818361863549,"Skewness":0.01326255672934502,"Kurtosis":0.6666666666666666,"ConfidenceInterval":{"N":3,"Mean":15.168429046869278,"StandardError":0.7400684672490048,"Level":12,"Margin":23.38546379227231,"Lower":-8.217034745403033,"Upper":38.55389283914159},"Percentiles":{"P0":13.895179152488708,"P25":14.523302391171455,"P50":15.151425629854202,"P67":15.595892917513847,"P80":15.935779666900636,"P85":16.066505339741706,"P90":16.19723101258278,"P95":16.32795668542385,"P100":16.458682358264923}},"Memory":{"Gen0Collections":160,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":80},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":200835},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":250268},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":436226},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":458808},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2325},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":9889},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":23815},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":23895},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":27561},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":25277},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":71714},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":157855},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":233145},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":474988},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":790097},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1553734},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":3114502},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5712699},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":8549072},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":8259340},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":16826405},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":34668671},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":65995483},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":141812015},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":296142763},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":689733688},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142327639},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":157562840},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121694297},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121575284},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121869645},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":123669209},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121520642},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121409775},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121463937},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121510964},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":123133838},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121515763},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":126951154},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121785788},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121586856},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121476069},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121664150},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121501536},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121608546},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":122014126},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121513058},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121992485},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":648886348},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":591120161},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":642657731},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":629984337},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":673848594},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":587831700},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":508397481},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":552261738},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":466244844}],"Metrics":[{"Value":0.00476837158203125,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":80,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiInfo: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiInfo","MethodTitle":"EmptyApiInfo","Parameters":"","FullName":"performance.EmptyModels.EmptyApiInfo","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[11.611371159553528,11.847819969058037,12.505722731351852],"N":3,"Min":11.611371159553528,"LowerFence":11.058831885457039,"Q1":11.729595564305782,"Median":11.847819969058037,"Mean":11.988304619987806,"Q3":12.176771350204945,"UpperFence":12.847535029053688,"Max":12.505722731351852,"InterquartileRange":0.4471757858991623,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.2675619157968723,"Variance":0.2147681363546777,"StandardDeviation":0.4634308323306486,"Skewness":0.27528365240467684,"Kurtosis":0.6666666666666653,"ConfidenceInterval":{"N":3,"Mean":11.988304619987806,"StandardError":0.2675619157968723,"Level":12,"Margin":8.454703545629526,"Lower":3.5336010743582804,"Upper":20.443008165617332},"Percentiles":{"P0":11.611371159553528,"P25":11.729595564305782,"P50":11.847819969058037,"P67":12.071506908237934,"P80":12.242561626434327,"P85":12.30835190266371,"P90":12.374142178893088,"P95":12.439932455122472,"P100":12.505722731351852}},"Memory":{"Gen0Collections":320,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":67108864,"BytesAllocatedPerOperation":80},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":223468},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":235681},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":469517},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":453769},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2234},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":35867},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":17633},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":18044},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":27020},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":22693},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":68668},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":119333},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":239277},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":441936},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":783575},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1535751},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2940597},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5680549},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":8518504},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":7955561},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":16063678},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":32902254},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":60709073},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":112696584},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":244554625},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":455661106},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":23,"Operations":67108864,"Nanoseconds":909480109},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":297323025},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":243434362},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":243035456},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":67108864,"Nanoseconds":243157945},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":67108864,"Nanoseconds":243668509},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":67108864,"Nanoseconds":243379579},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":67108864,"Nanoseconds":243338011},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":8,"Operations":67108864,"Nanoseconds":243035837},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":9,"Operations":67108864,"Nanoseconds":243167874},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":10,"Operations":67108864,"Nanoseconds":242954453},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":245100158},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":243060520},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":243463232},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":67108864,"Nanoseconds":243100925},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":67108864,"Nanoseconds":243285430},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":67108864,"Nanoseconds":242973126},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":67108864,"Nanoseconds":242909668},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":67108864,"Nanoseconds":243051583},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":67108864,"Nanoseconds":243001339},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":67108864,"Nanoseconds":243006660},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":67108864,"Nanoseconds":243078403},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":67108864,"Nanoseconds":242798329},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":67108864,"Nanoseconds":243137644},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":67108864,"Nanoseconds":242767202},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":67108864,"Nanoseconds":243894780},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":991674181},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":1116638860},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":1038425779},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":1022286448},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":1038154259},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":1082305366},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":779225928},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":795093739},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":839244846}],"Metrics":[{"Value":0.00476837158203125,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":80,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiLicense: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiLicense","MethodTitle":"EmptyApiLicense","Parameters":"","FullName":"performance.EmptyModels.EmptyApiLicense","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[16.698741286993027,15.557747960090637,15.661246508359909],"N":3,"Min":15.557747960090637,"LowerFence":14.753752239048481,"Q1":15.609497234225273,"Median":15.661246508359909,"Mean":15.972578585147858,"Q3":16.179993897676468,"UpperFence":17.03573889285326,"Max":16.698741286993027,"InterquartileRange":0.5704966634511948,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.3643085640574341,"Variance":0.39816218953676863,"StandardDeviation":0.6310009425799368,"Skewness":0.37328332845432394,"Kurtosis":0.6666666666666666,"ConfidenceInterval":{"N":3,"Mean":15.972578585147858,"StandardError":0.3643085640574341,"Level":12,"Margin":11.511806151731836,"Lower":4.460772433416022,"Upper":27.484384736879694},"Percentiles":{"P0":15.557747960090637,"P25":15.609497234225273,"P50":15.661246508359909,"P67":16.01399473309517,"P80":16.28374337553978,"P85":16.38749285340309,"P90":16.491242331266402,"P95":16.594991809129716,"P100":16.698741286993027}},"Memory":{"Gen0Collections":96,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":48},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":221624},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":224109},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":475098},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":494635},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2214},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":2254},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":2565},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":22602},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":28834},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":21810},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":44183},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":87523},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":154539},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":218058},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":490718},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1001121},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2007012},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":3997362},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":8239944},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":10347544},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":15117982},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":30961349},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":56798590},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":122177489},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":275361233},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":593727899},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":152802680},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":162071060},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":123896383},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121660512},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121491217},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121465498},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121496415},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121412590},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121582758},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121816855},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121899871},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121718491},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121454768},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":122525089},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121448627},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121465979},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121451102},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":122197757},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121387342},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121937671},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121613365},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121627671},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121489323},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":556749571},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":600543396},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":649372114},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":681930144},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":643644761},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":647117596},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":560316779},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":522031396},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":525504231}],"Metrics":[{"Value":0.00286102294921875,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":48,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiLink: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiLink","MethodTitle":"EmptyApiLink","Parameters":"","FullName":"performance.EmptyModels.EmptyApiLink","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[10.155680418014526,11.484125316143036,12.415877401828766],"N":3,"Min":10.155680418014526,"LowerFence":9.124755129218102,"Q1":10.819902867078781,"Median":11.484125316143036,"Mean":11.35189437866211,"Q3":11.9500013589859,"UpperFence":13.64514909684658,"Max":12.415877401828766,"InterquartileRange":1.1300984919071198,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.6558039257356983,"Variance":1.29023636703106,"StandardDeviation":1.1358857191773564,"Skewness":-0.11483458987834821,"Kurtosis":0.6666666666666666,"ConfidenceInterval":{"N":3,"Mean":11.35189437866211,"StandardError":0.6558039257356983,"Level":12,"Margin":20.72278395690941,"Lower":-9.3708895782473,"Upper":32.07467833557152},"Percentiles":{"P0":10.155680418014526,"P25":10.819902867078781,"P50":11.484125316143036,"P67":11.800921025276184,"P80":12.043176567554474,"P85":12.136351776123046,"P90":12.22952698469162,"P95":12.322702193260193,"P100":12.415877401828766}},"Memory":{"Gen0Collections":144,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":72},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":195366},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":280896},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":460361},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":484055},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2485},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":10139},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":17773},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":18124},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":23073},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":27140},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":65973},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":112851},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":245790},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":417852},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":663962},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1337251},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2692706},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5250180},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":9387850},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":8475353},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":16873923},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":33794333},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":61382528},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":136116401},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":264942404},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":512972473},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142388242},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":156392728},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121571975},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121533493},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121629322},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121769752},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121591822},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121398621},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121383835},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121400351},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121585989},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121419978},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121558417},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121328797},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121726702},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121456095},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121393979},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121444934},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121392708},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121507622},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121477796},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121382938},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":498840917},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":522670375},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":579380072},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":462188066},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":506763280},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":538027692},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":340768088},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":385343302},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":416607714}],"Metrics":[{"Value":0.004291534423828125,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":72,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiMediaType: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiMediaType","MethodTitle":"EmptyApiMediaType","Parameters":"","FullName":"performance.EmptyModels.EmptyApiMediaType","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[11.551239430904388,13.383899629116058,12.765317380428314],"N":3,"Min":11.551239430904388,"LowerFence":10.783783257007599,"Q1":12.158278405666351,"Median":12.765317380428314,"Mean":12.56681881348292,"Q3":13.074608504772186,"UpperFence":14.449103653430939,"Max":13.383899629116058,"InterquartileRange":0.916330099105835,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.5382725800610817,"Variance":0.8692121113368405,"StandardDeviation":0.9323154569869796,"Skewness":-0.20325798298492898,"Kurtosis":0.6666666666666664,"ConfidenceInterval":{"N":3,"Mean":12.56681881348292,"StandardError":0.5382725800610817,"Level":12,"Margin":17.008904565523295,"Lower":-4.442085752040375,"Upper":29.575723379006213},"Percentiles":{"P0":11.551239430904388,"P25":12.158278405666351,"P50":12.765317380428314,"P67":12.975635344982146,"P80":13.136466729640961,"P85":13.198324954509735,"P90":13.26018317937851,"P95":13.322041404247283,"P100":13.383899629116058}},"Memory":{"Gen0Collections":160,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":80},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":197529},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":237674},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":425725},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":483964},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2956},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":3316},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":28744},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":19657},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":31269},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":27662},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":69300},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":125985},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":228637},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":427058},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":746295},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1497119},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":3000659},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5979638},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":8595507},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":8298602},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":16852422},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":33647517},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":64288454},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":126657151},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":270703234},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":578965377},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142508620},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":156806969},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121554331},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121441700},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121564810},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":123772427},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121503375},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121548240},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121507613},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121774192},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121535666},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121444796},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121601489},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121501031},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":123430628},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121656131},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121508626},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121557868},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121828614},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121516300},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121966501},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":122018578},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":576327727},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":570254292},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":582727765},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":509153146},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":570647018},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":549890842},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":387595278},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":449089150},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":428332974}],"Metrics":[{"Value":0.00476837158203125,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":80,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiOAuthFlow: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiOAuthFlow","MethodTitle":"EmptyApiOAuthFlow","Parameters":"","FullName":"performance.EmptyModels.EmptyApiOAuthFlow","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[14.804874569177628,16.986799120903015,15.598240315914154],"N":3,"Min":14.804874569177628,"LowerFence":13.56511402875185,"Q1":15.20155744254589,"Median":15.598240315914154,"Mean":15.796638001998266,"Q3":16.292519718408585,"UpperFence":17.928963132202625,"Max":16.986799120903015,"InterquartileRange":1.0909622758626938,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.6376310110448299,"Variance":1.2197199187381556,"StandardDeviation":1.1044093076111572,"Skewness":0.1738442289625431,"Kurtosis":0.6666666666666663,"ConfidenceInterval":{"N":3,"Mean":15.796638001998266,"StandardError":0.6376310110448299,"Level":12,"Margin":20.14853703610341,"Lower":-4.351899034105143,"Upper":35.945175038101674},"Percentiles":{"P0":14.804874569177628,"P25":15.20155744254589,"P50":15.598240315914154,"P67":16.07035030961037,"P80":16.431375598907472,"P85":16.570231479406356,"P90":16.709087359905244,"P95":16.84794324040413,"P100":16.986799120903015}},"Memory":{"Gen0Collections":128,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":64},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":231512},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":235941},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":456924},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":480698},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2455},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":9698},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":23844},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":18174},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":23214},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":20348},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":61836},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":103162},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":198181},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":368919},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":679009},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1312785},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2585123},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5045623},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":10021264},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":10309816},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":17543220},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":32269874},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":61108182},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":148909141},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":288592221},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":536822238},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142472626},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":155429451},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121658881},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121476270},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121505635},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121805936},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121444691},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121761363},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121543916},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121457445},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121883642},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121686794},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121609599},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121606173},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121523047},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":128341698},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121567741},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121446013},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121836223},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121536342},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121810165},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":122458376},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":654351357},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":559693231},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":530584278},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":618378756},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":691591995},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":644999693},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":496769157},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":569982396},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":523390094}],"Metrics":[{"Value":0.003814697265625,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":64,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiOAuthFlows: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiOAuthFlows","MethodTitle":"EmptyApiOAuthFlows","Parameters":"","FullName":"performance.EmptyModels.EmptyApiOAuthFlows","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[12.143237709999084,15.01782563328743,18.247991651296616],"N":3,"Min":12.143237709999084,"LowerFence":9.001966215670109,"Q1":13.580531671643257,"Median":15.01782563328743,"Mean":15.136351664861044,"Q3":16.632908642292023,"UpperFence":21.21147409826517,"Max":18.247991651296616,"InterquartileRange":3.0523769706487656,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":1.7632868443210803,"Variance":9.327541486067378,"StandardDeviation":3.054102402681904,"Skewness":0.03875034338925649,"Kurtosis":0.6666666666666664,"ConfidenceInterval":{"N":3,"Mean":15.136351664861044,"StandardError":1.7632868443210803,"Level":12,"Margin":55.718197002152,"Lower":-40.58184533729096,"Upper":70.85454866701305},"Percentiles":{"P0":12.143237709999084,"P25":13.580531671643257,"P50":15.01782563328743,"P67":16.116082079410553,"P80":16.955925244092942,"P85":17.27894184589386,"P90":17.601958447694777,"P95":17.9249750494957,"P100":18.247991651296616}},"Memory":{"Gen0Collections":128,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":64},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":200865},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":226364},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":484004},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":513220},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2955},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":3176},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":21520},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":22462},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":71333},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":34895},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":75872},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":119253},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":230501},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":418712},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":651919},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1303196},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2608286},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5019744},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":9912692},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":10365778},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":17975664},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":32857976},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":60988847},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":113825392},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":234374435},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":527195753},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142772498},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":154884581},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121588305},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121454474},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121604485},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121502375},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121379214},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121765947},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121581121},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121446219},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121524736},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121455156},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121660018},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121570010},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121439607},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":122033567},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121648718},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121342936},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121562176},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121440399},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121480955},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":605056040},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":472998181},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":610421744},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":528984180},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":625439345},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":733825731},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":407459444},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":503914609},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":612300995}],"Metrics":[{"Value":0.003814697265625,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":64,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiOperation: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiOperation","MethodTitle":"EmptyApiOperation","Parameters":"","FullName":"performance.EmptyModels.EmptyApiOperation","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[79.77230715751648,80.73210644721985,80.76298224925995],"N":3,"Min":79.77230715751648,"LowerFence":79.50920048356056,"Q1":80.25220680236816,"Median":80.73210644721985,"Mean":80.42246528466542,"Q3":80.7475443482399,"UpperFence":81.4905506670475,"Max":80.76298224925995,"InterquartileRange":0.4953375458717346,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.3252012307845066,"Variance":0.31726752151127374,"StandardDeviation":0.5632650544026975,"Skewness":-0.38359948425874607,"Kurtosis":0.6666666666666539,"ConfidenceInterval":{"N":3,"Mean":80.42246528466542,"StandardError":0.3252012307845066,"Level":12,"Margin":10.276051398302158,"Lower":70.14641388636326,"Upper":90.69851668296758},"Percentiles":{"P0":79.77230715751648,"P25":80.25220680236816,"P50":80.73210644721985,"P67":80.74260421991349,"P80":80.75063192844391,"P85":80.75371950864792,"P90":80.75680708885193,"P95":80.75989466905594,"P100":80.76298224925995}},"Memory":{"Gen0Collections":188,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":8388608,"BytesAllocatedPerOperation":376},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":191077},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":1048370},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":482953},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":511095},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":26960},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":30528},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":47740},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":86511},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":105888},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":181098},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":266518},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":612896},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":1219970},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":2378135},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":4753876},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":9611176},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":13771432},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":20831549},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":40541230},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":82946795},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":86066166},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":169959329},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":338468978},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":690206157},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":35382116},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":35290144},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":35265048},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":8388608,"Nanoseconds":37620691},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":8388608,"Nanoseconds":35344386},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":8388608,"Nanoseconds":37911744},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":8388608,"Nanoseconds":35416480},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":35364083},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":37872531},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":37488143},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":8388608,"Nanoseconds":37275906},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":8388608,"Nanoseconds":35764842},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":8388608,"Nanoseconds":35279595},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":8388608,"Nanoseconds":35297418},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":8388608,"Nanoseconds":35349586},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":8388608,"Nanoseconds":35923188},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":8388608,"Nanoseconds":37217397},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":8388608,"Nanoseconds":30123828},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":8388608,"Nanoseconds":30198487},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":8388608,"Nanoseconds":30017258},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":8388608,"Nanoseconds":30075608},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":8388608,"Nanoseconds":30009935},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":16,"Operations":8388608,"Nanoseconds":30035743},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":17,"Operations":8388608,"Nanoseconds":30097488},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":18,"Operations":8388608,"Nanoseconds":31027737},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":19,"Operations":8388608,"Nanoseconds":30003292},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":30053656},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":717314619},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":704113783},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":718053361},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":702332280},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":710383660},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":710642665},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":669178614},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":677229994},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":677488999}],"Metrics":[{"Value":0.022411346435546875,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":376,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiParameter: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiParameter","MethodTitle":"EmptyApiParameter","Parameters":"","FullName":"performance.EmptyModels.EmptyApiParameter","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[10.433155059814453,11.085811585187912,11.838446527719498],"N":3,"Min":10.433155059814453,"LowerFence":9.7055147215724,"Q1":10.759483322501183,"Median":11.085811585187912,"Mean":11.119137724240622,"Q3":11.462129056453705,"UpperFence":12.516097657382488,"Max":11.838446527719498,"InterquartileRange":0.7026457339525223,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.40601477850762985,"Variance":0.4945440010997991,"StandardDeviation":0.7032382249990391,"Skewness":0.04728311838517129,"Kurtosis":0.6666666666666664,"ConfidenceInterval":{"N":3,"Mean":11.119137724240622,"StandardError":0.40601477850762985,"Level":12,"Margin":12.829683092987379,"Lower":-1.7105453687467573,"Upper":23.948820817228},"Percentiles":{"P0":10.433155059814453,"P25":10.759483322501183,"P50":11.085811585187912,"P67":11.34170746564865,"P80":11.537392550706864,"P85":11.612656044960023,"P90":11.68791953921318,"P95":11.763183033466339,"P100":11.838446527719498}},"Memory":{"Gen0Collections":192,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":96},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":215352},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":306573},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":434813},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":483904},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2455},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":9388},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":25147},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":21961},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":31669},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":26279},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":75572},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":166190},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":186930},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":435584},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":851982},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1682655},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":3286644},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":6954951},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":7601840},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":9079572},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":18975321},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":35556214},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":66443651},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":127931719},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":252585401},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":565756803},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142516281},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":156543512},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":122008327},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121538358},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121428073},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":133913581},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121440124},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121636712},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121473698},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121363000},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121914863},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121445624},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121667660},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121420388},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121494216},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121556463},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121470491},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121665268},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121885157},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121548255},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121436849},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121479569},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":512986161},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":486989966},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":478838650},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":471572808},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":493472327},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":518726565},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":350078592},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":371978111},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":397232349}],"Metrics":[{"Value":0.0057220458984375,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":96,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiPathItem: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiPathItem","MethodTitle":"EmptyApiPathItem","Parameters":"","FullName":"performance.EmptyModels.EmptyApiPathItem","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[15.197120249271393,18.235980182886124,12.13409373164177],"N":3,"Min":12.13409373164177,"LowerFence":9.089192152023315,"Q1":13.665606990456581,"Median":15.197120249271393,"Mean":15.189064721266428,"Q3":16.71655021607876,"UpperFence":21.292965054512024,"Max":18.235980182886124,"InterquartileRange":3.050943225622177,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":1.7614674975351692,"Variance":9.308303234618434,"StandardDeviation":3.050951201612119,"Skewness":-0.002640314877118319,"Kurtosis":0.6666666666666667,"ConfidenceInterval":{"N":3,"Mean":15.189064721266428,"StandardError":1.7614674975351692,"Level":12,"Margin":55.660707364003166,"Lower":-40.47164264273674,"Upper":70.84977208526959},"Percentiles":{"P0":12.13409373164177,"P25":13.665606990456581,"P50":15.197120249271393,"P67":16.2303326267004,"P80":17.02043620944023,"P85":17.324322202801703,"P90":17.62820819616318,"P95":17.93209418952465,"P100":18.235980182886124}},"Memory":{"Gen0Collections":128,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":64},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":200214},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":266538},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":439192},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":502789},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":3006},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":3095},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":17092},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":18905},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":23153},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":23554},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":93796},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":106589},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":194614},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":297917},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":670252},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1311952},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2570155},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5033229},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":10457389},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":10395743},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":18181067},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":32827557},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":61272690},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":154751145},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":303609464},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":508345038},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142396930},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":156450032},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121565429},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121908180},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":122028345},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":123661828},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121662560},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121449092},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121488205},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121581960},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":123164378},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121517630},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":123569726},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121354365},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121488686},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121671527},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121452097},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121542236},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121754253},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121842900},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121647312},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121512069},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":631207924},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":555048695},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":543464599},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":631472974},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":733440193},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":528694859},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":509930738},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":611897957},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":407152623}],"Metrics":[{"Value":0.003814697265625,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":64,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiPaths: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiPaths","MethodTitle":"EmptyApiPaths","Parameters":"","FullName":"performance.EmptyModels.EmptyApiPaths","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[67.66813337802887,67.78638434410095,68.79134142398834],"N":3,"Min":67.66813337802887,"LowerFence":66.8848528265953,"Q1":67.72725886106491,"Median":67.78638434410095,"Mean":68.08195304870605,"Q3":68.28886288404465,"UpperFence":69.13126891851425,"Max":68.79134142398834,"InterquartileRange":0.5616040229797363,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.3563330478562053,"Variance":0.380919722983478,"StandardDeviation":0.6171869433028198,"Skewness":0.3690655060499792,"Kurtosis":0.6666666666666667,"ConfidenceInterval":{"N":3,"Mean":68.08195304870605,"StandardError":0.3563330478562053,"Level":12,"Margin":11.259787381033739,"Lower":56.822165667672316,"Upper":79.34174042973979},"Percentiles":{"P0":67.66813337802887,"P25":67.72725886106491,"P50":67.78638434410095,"P67":68.12806975126267,"P80":68.38935859203339,"P85":68.48985430002213,"P90":68.59035000801086,"P95":68.6908457159996,"P100":68.79134142398834}},"Memory":{"Gen0Collections":124,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":8388608,"BytesAllocatedPerOperation":248},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":254165},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":672217},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":464969},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":520193},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":5760},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":27892},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":40336},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":79428},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":90108},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":154600},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":274563},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":472995},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":943905},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":1871710},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":3669993},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":7256108},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":14273558},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":17884971},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":36165312},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":69082691},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":87334419},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":148158859},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":303022814},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":595741662},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":35397386},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":35548699},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":35256152},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":8388608,"Nanoseconds":35427993},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":8388608,"Nanoseconds":35316274},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":35298471},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":35437211},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":35395382},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":8388608,"Nanoseconds":35329930},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":8388608,"Nanoseconds":35247516},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":8388608,"Nanoseconds":35510027},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":8388608,"Nanoseconds":35287150},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":8388608,"Nanoseconds":35745717},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":8388608,"Nanoseconds":38187503},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":8388608,"Nanoseconds":30397979},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":8388608,"Nanoseconds":30094892},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":8388608,"Nanoseconds":30034228},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":8388608,"Nanoseconds":30064314},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":8388608,"Nanoseconds":30014091},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":8388608,"Nanoseconds":30064294},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":16,"Operations":8388608,"Nanoseconds":30212501},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":17,"Operations":8388608,"Nanoseconds":30120599},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":18,"Operations":8388608,"Nanoseconds":30100512},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":19,"Operations":8388608,"Nanoseconds":30023959},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":30169742},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":598287583},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":601461097},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":592693884},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":597946685},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":598938646},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":607368837},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":567641445},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":568633406},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":577063597}],"Metrics":[{"Value":0.014781951904296875,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":248,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiRequestBody: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiRequestBody","MethodTitle":"EmptyApiRequestBody","Parameters":"","FullName":"performance.EmptyModels.EmptyApiRequestBody","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[10.979056105017662,11.279583871364594,10.212670087814331],"N":3,"Min":10.212670087814331,"LowerFence":9.7956777587533,"Q1":10.595863096415997,"Median":10.979056105017662,"Mean":10.823770021398863,"Q3":11.129319988191128,"UpperFence":11.929505325853825,"Max":11.279583871364594,"InterquartileRange":0.5334568917751312,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.31762744487141575,"Variance":0.3026615812066327,"StandardDeviation":0.5501468723955747,"Skewness":-0.2597743971809504,"Kurtosis":0.6666666666666677,"ConfidenceInterval":{"N":3,"Mean":10.823770021398863,"StandardError":0.31762744487141575,"Level":12,"Margin":10.036726924852575,"Lower":0.787043096546288,"Upper":20.860496946251438},"Percentiles":{"P0":10.212670087814331,"P25":10.595863096415997,"P50":10.979056105017662,"P67":11.081235545575618,"P80":11.159372764825822,"P85":11.189425541460514,"P90":11.219478318095208,"P95":11.2495310947299,"P100":11.279583871364594}},"Memory":{"Gen0Collections":192,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":67108864,"BytesAllocatedPerOperation":48},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":195395},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":244988},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":465209},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":466863},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2264},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":2384},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":2635},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":18334},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":26730},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":23634},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":47208},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":95859},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":188552},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":239648},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":522848},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1008756},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2044151},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":4140170},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":8381831},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":10625424},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":15139234},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":31080136},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":56945954},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":136289850},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":228820322},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":496623714},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":23,"Operations":67108864,"Nanoseconds":898689767},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":297226892},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":243477604},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":243780299},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":67108864,"Nanoseconds":244422320},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":67108864,"Nanoseconds":242927876},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":67108864,"Nanoseconds":243400470},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":67108864,"Nanoseconds":242821939},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":243245810},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":242941102},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":243407913},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":67108864,"Nanoseconds":243052149},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":67108864,"Nanoseconds":250392221},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":67108864,"Nanoseconds":243421269},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":67108864,"Nanoseconds":243363711},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":67108864,"Nanoseconds":243068599},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":67108864,"Nanoseconds":243093797},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":67108864,"Nanoseconds":242953975},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":67108864,"Nanoseconds":243528359},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":67108864,"Nanoseconds":242794750},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":67108864,"Nanoseconds":243195736},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":67108864,"Nanoseconds":242827758},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":67108864,"Nanoseconds":243407282},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":1032971436},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":892405967},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":1033990853},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":979987719},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":1000155796},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":928556424},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":736791983},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":756960060},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":685360688}],"Metrics":[{"Value":0.00286102294921875,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":48,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiResponse: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiResponse","MethodTitle":"EmptyApiResponse","Parameters":"","FullName":"performance.EmptyModels.EmptyApiResponse","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[11.558457612991333,15.096033930778503,15.481343269348145],"N":3,"Min":11.558457612991333,"LowerFence":10.38508152961731,"Q1":13.327245771884918,"Median":15.096033930778503,"Mean":14.045278271039328,"Q3":15.288688600063324,"UpperFence":18.230852842330933,"Max":15.481343269348145,"InterquartileRange":1.9614428281784058,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":1.2483754190370695,"Variance":4.6753235605679375,"StandardDeviation":2.162249652692292,"Skewness":-0.37119557758761185,"Kurtosis":0.666666666666667,"ConfidenceInterval":{"N":3,"Mean":14.045278271039328,"StandardError":1.2483754190370695,"Level":12,"Margin":39.447482838410885,"Lower":-25.402204567371555,"Upper":53.492761109450214},"Percentiles":{"P0":11.558457612991333,"P25":13.327245771884918,"P50":15.096033930778503,"P67":15.227039105892182,"P80":15.327219533920289,"P85":15.365750467777254,"P90":15.404281401634215,"P95":15.44281233549118,"P100":15.481343269348145}},"Memory":{"Gen0Collections":128,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":64},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":223828},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":241552},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":434282},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":458518},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2945},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":9888},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":23023},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":17683},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":24286},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":18525},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":69600},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":103724},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":207207},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":383648},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":610532},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1284352},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2562913},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5065363},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":10017755},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":10127270},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":17574698},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":32774774},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":61426338},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":151099475},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":297342881},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":559883483},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142466917},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":140867237},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121615347},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121516502},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121499932},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121674748},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121675109},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121423418},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121427446},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121478050},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121459034},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":122176647},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121505212},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121752445},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121770277},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121701739},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121639613},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121615608},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121405024},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121766599},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121565364},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121714202},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121813097},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121740131},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121449407},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":554572154},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":525901597},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":503379004},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":509539219},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":628240583},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":641169419},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":387837480},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":506538844},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":519467680}],"Metrics":[{"Value":0.003814697265625,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":64,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiResponses: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiResponses","MethodTitle":"EmptyApiResponses","Parameters":"","FullName":"performance.EmptyModels.EmptyApiResponses","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[63.65819561481476,64.25664842128754,65.144371509552],"N":3,"Min":63.65819561481476,"LowerFence":62.842790096998215,"Q1":63.95742201805115,"Median":64.25664842128754,"Mean":64.35307184855144,"Q3":64.70050996541977,"UpperFence":65.8151418864727,"Max":65.144371509552,"InterquartileRange":0.7430879473686218,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.4317224438295583,"Variance":0.5591528055184984,"StandardDeviation":0.7477652074805957,"Skewness":0.12680466741233234,"Kurtosis":0.6666666666666636,"ConfidenceInterval":{"N":3,"Mean":64.35307184855144,"StandardError":0.4317224438295583,"Level":12,"Margin":13.642021009240656,"Lower":50.71105083931078,"Upper":77.99509285779209},"Percentiles":{"P0":63.65819561481476,"P25":63.95742201805115,"P50":64.25664842128754,"P67":64.55847427129746,"P80":64.7892822742462,"P85":64.87805458307267,"P90":64.9668268918991,"P95":65.05559920072555,"P100":65.144371509552}},"Memory":{"Gen0Collections":124,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":8388608,"BytesAllocatedPerOperation":248},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":195726},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":694478},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":513039},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":526244},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":5711},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":24135},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":34995},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":45716},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":81091},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":138880},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":265196},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":467864},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":922605},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":1819591},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":3659681},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":7491705},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":14865039},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":17633485},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":36811297},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":69137179},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":84131982},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":139554472},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":278456193},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":569044437},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":35332583},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":35289763},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":35291857},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":8388608,"Nanoseconds":35448079},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":8388608,"Nanoseconds":35253656},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":8388608,"Nanoseconds":35241462},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":8388608,"Nanoseconds":35279173},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":8,"Operations":8388608,"Nanoseconds":35356168},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":9,"Operations":8388608,"Nanoseconds":36306894},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":10,"Operations":8388608,"Nanoseconds":30413176},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":30030080},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":30052452},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":30122483},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":8388608,"Nanoseconds":30196732},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":8388608,"Nanoseconds":30048123},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":8388608,"Nanoseconds":30272273},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":8388608,"Nanoseconds":30067621},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":8388608,"Nanoseconds":30010944},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":8388608,"Nanoseconds":30029038},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":8388608,"Nanoseconds":35055524},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":8388608,"Nanoseconds":30065295},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":8388608,"Nanoseconds":30027455},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":8388608,"Nanoseconds":30137581},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":8388608,"Nanoseconds":30041091},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":8388608,"Nanoseconds":30044567},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":576291135},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":579968219},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":568596249},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":564056101},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":569076287},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":576523048},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":8388608,"Nanoseconds":534003649},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":8388608,"Nanoseconds":539023835},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":8388608,"Nanoseconds":546470596}],"Metrics":[{"Value":0.014781951904296875,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":248,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiSchema: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiSchema","MethodTitle":"EmptyApiSchema","Parameters":"","FullName":"performance.EmptyModels.EmptyApiSchema","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[25.247585207223892,25.08825170993805,24.822042495012283],"N":3,"Min":24.822042495012283,"LowerFence":24.63599006831646,"Q1":24.955147102475166,"Median":25.08825170993805,"Mean":25.052626470724743,"Q3":25.16791845858097,"UpperFence":25.487075492739677,"Max":25.247585207223892,"InterquartileRange":0.21277135610580444,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.12412831832537528,"Variance":0.04622351823085709,"StandardDeviation":0.21499655399763293,"Skewness":-0.1611517836438519,"Kurtosis":0.6666666666666704,"ConfidenceInterval":{"N":3,"Mean":25.052626470724743,"StandardError":0.12412831832537528,"Level":12,"Margin":3.922337489373175,"Lower":21.13028898135157,"Upper":28.974963960097917},"Percentiles":{"P0":24.822042495012283,"P25":24.955147102475166,"P50":25.08825170993805,"P67":25.142425099015234,"P80":25.183851808309555,"P85":25.19978515803814,"P90":25.215718507766724,"P95":25.231651857495308,"P100":25.247585207223892}},"Memory":{"Gen0Collections":1027,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":512},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":196507},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":306453},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":433741},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":488824},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2385},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":44383},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":37851},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":76093},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":85851},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":145893},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":297096},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":470950},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":957139},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":1889863},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":3567209},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":7168290},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":4833296},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":6611260},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":11795732},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":16988138},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":36365454},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":76878441},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":152619376},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":242628595},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":469890592},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":970437383},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142447151},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":155033381},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121935215},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121405414},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121612832},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121665932},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121590351},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121576173},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121489752},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":123957345},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":122171446},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":122639782},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":122084504},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121552399},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121851358},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121652647},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121489722},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121501484},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":122051372},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121417667},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121520630},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121605969},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":942029811},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":966500458},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":937183882},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":968774350},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":963428005},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":954495506},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":847168381},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":841822036},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":832889537}],"Metrics":[{"Value":0.030606985092163086,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":512,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiSecurityRequirement: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiSecurityRequirement","MethodTitle":"EmptyApiSecurityRequirement","Parameters":"","FullName":"performance.EmptyModels.EmptyApiSecurityRequirement","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[17.25824573636055,17.32402142882347,17.548952639102936],"N":3,"Min":17.25824573636055,"LowerFence":17.07310340553522,"Q1":17.29113358259201,"Median":17.32402142882347,"Mean":17.377073268095653,"Q3":17.436487033963203,"UpperFence":17.654517211019993,"Max":17.548952639102936,"InterquartileRange":0.14535345137119293,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.08801230797098544,"Variance":0.023238499063138757,"StandardDeviation":0.15244178909714606,"Skewness":0.3058645647340922,"Kurtosis":0.6666666666666572,"ConfidenceInterval":{"N":3,"Mean":17.377073268095653,"StandardError":0.08801230797098544,"Level":12,"Margin":2.781105711719631,"Lower":14.595967556376023,"Upper":20.158178979815283},"Percentiles":{"P0":17.25824573636055,"P25":17.29113358259201,"P50":17.32402142882347,"P67":17.40049804031849,"P80":17.45898015499115,"P85":17.481473276019095,"P90":17.503966397047044,"P95":17.52645951807499,"P100":17.548952639102936}},"Memory":{"Gen0Collections":208,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":104},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":196648},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":313677},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":429453},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":465260},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2836},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":3085},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":19236},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":23424},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":30587},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":39364},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":101009},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":182281},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":237383},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":562311},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":1143408},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":2241521},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":4383044},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":8458092},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":9994034},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":17112301},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":30195139},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":59320028},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":100677434},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":171707022},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":355578416},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":676142210},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":141077822},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":154760230},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":120188690},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":122427305},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":120211964},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":120157151},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":120120162},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":120330625},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":120210741},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":120411647},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":120567989},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":120446201},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":120183099},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":120480295},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":120342688},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":120457262},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":120292133},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":120288156},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":120887576},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":120433909},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":707708792},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":696080518},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":693367131},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":699433321},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":701640387},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":709187826},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":579090633},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":581297699},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":588845138}],"Metrics":[{"Value":0.006198883056640625,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":104,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiSecurityScheme: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiSecurityScheme","MethodTitle":"EmptyApiSecurityScheme","Parameters":"","FullName":"performance.EmptyModels.EmptyApiSecurityScheme","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[10.288318127393723,10.481257379055023,10.309042796492577],"N":3,"Min":10.288318127393723,"LowerFence":10.153976023197174,"Q1":10.29868046194315,"Median":10.309042796492577,"Mean":10.359539434313774,"Q3":10.3951500877738,"UpperFence":10.539854526519775,"Max":10.481257379055023,"InterquartileRange":0.09646962583065033,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.061152327650819564,"Variance":0.011218821531339573,"StandardDeviation":0.1059189384923186,"Skewness":0.3683885752491646,"Kurtosis":0.6666666666666666,"ConfidenceInterval":{"N":3,"Mean":10.359539434313774,"StandardError":0.061152327650819564,"Level":12,"Margin":1.9323557310951447,"Lower":8.42718370321863,"Upper":12.291895165408919},"Percentiles":{"P0":10.288318127393723,"P25":10.29868046194315,"P50":10.309042796492577,"P67":10.367595754563808,"P80":10.412371546030045,"P85":10.42959300428629,"P90":10.446814462542534,"P95":10.464035920798779,"P100":10.481257379055023}},"Memory":{"Gen0Collections":417,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":67108864,"BytesAllocatedPerOperation":104},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":208750},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":258913},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":497019},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":485848},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":6021},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":12704},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":22562},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":34154},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":35136},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":45745},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":87384},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":155681},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":204603},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":457846},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":906384},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1902436},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":3563773},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":7375648},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":7130330},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":9289907},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":17058370},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":36833529},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":70682848},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":133766902},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":234233560},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":462433580},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":23,"Operations":67108864,"Nanoseconds":937331591},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":275370664},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":243913536},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":242791969},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":67108864,"Nanoseconds":243839828},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":67108864,"Nanoseconds":244635736},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":67108864,"Nanoseconds":243086480},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":67108864,"Nanoseconds":243051985},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":8,"Operations":67108864,"Nanoseconds":243089836},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":9,"Operations":67108864,"Nanoseconds":243161492},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":10,"Operations":67108864,"Nanoseconds":243135439},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":242993406},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":243834558},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":243031475},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":67108864,"Nanoseconds":243078704},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":67108864,"Nanoseconds":243774294},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":67108864,"Nanoseconds":243284809},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":67108864,"Nanoseconds":243747674},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":67108864,"Nanoseconds":243010356},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":67108864,"Nanoseconds":242966193},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":67108864,"Nanoseconds":243295479},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":67108864,"Nanoseconds":242976873},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":67108864,"Nanoseconds":243095826},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":67108864,"Nanoseconds":243195643},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":67108864,"Nanoseconds":243258169},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":67108864,"Nanoseconds":243082310},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":920217055},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":941503066},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":930174860},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":933533168},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":946481102},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":934923977},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":690437342},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":703385276},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":691828151}],"Metrics":[{"Value":0.006213784217834473,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":104,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiServer: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiServer","MethodTitle":"EmptyApiServer","Parameters":"","FullName":"performance.EmptyModels.EmptyApiServer","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[14.162274986505508,15.181592643260956,16.42985773086548],"N":3,"Min":14.162274986505508,"LowerFence":12.971246756613255,"Q1":14.671933814883232,"Median":15.181592643260956,"Mean":15.257908453543982,"Q3":15.805725187063217,"UpperFence":17.506412245333195,"Max":16.42985773086548,"InterquartileRange":1.133791372179985,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.655705968862096,"Variance":1.2898509528041395,"StandardDeviation":1.1357160528953263,"Skewness":0.06689279332636021,"Kurtosis":0.6666666666666665,"ConfidenceInterval":{"N":3,"Mean":15.257908453543982,"StandardError":0.655705968862096,"Level":12,"Margin":20.719688612326838,"Lower":-5.461780158782856,"Upper":35.97759706587082},"Percentiles":{"P0":14.162274986505508,"P25":14.671933814883232,"P50":15.181592643260956,"P67":15.606002773046493,"P80":15.93055169582367,"P85":16.055378204584123,"P90":16.180204713344573,"P95":16.305031222105026,"P100":16.42985773086548}},"Memory":{"Gen0Collections":112,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":56},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":248014},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":218539},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":450642},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":490437},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":5761},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":12203},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":3186},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":22642},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":27392},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":19707},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":55784},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":93214},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":177602},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":261429},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":615992},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1163545},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2318234},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":4504120},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":8864342},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":9189139},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":15423964},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":32486592},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":59631317},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":143087154},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":256701509},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":534223010},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142463708},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":135296609},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":122110178},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":122673641},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121599063},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":123573744},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121835614},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121471785},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121529693},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121467496},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121435447},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":123317525},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":130998274},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121468899},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121679964},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121429626},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121474099},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121447670},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121347752},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121718836},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121513824},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121912298},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":655801355},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":571897571},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":526519198},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":596681192},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":630883817},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":672768643},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":475207093},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":509409718},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":551294544}],"Metrics":[{"Value":0.003337860107421875,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":56,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiServerVariable: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiServerVariable","MethodTitle":"EmptyApiServerVariable","Parameters":"","FullName":"performance.EmptyModels.EmptyApiServerVariable","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[8.280867829918861,8.447486519813538,8.365365758538246],"N":3,"Min":8.280867829918861,"LowerFence":8.198152776807547,"Q1":8.323116794228554,"Median":8.365365758538246,"Mean":8.364573369423548,"Q3":8.406426139175892,"UpperFence":8.531390156596899,"Max":8.447486519813538,"InterquartileRange":0.0833093449473381,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.048100304454810505,"Variance":0.006940917865936387,"StandardDeviation":0.08331217117526339,"Skewness":-0.009510224297607816,"Kurtosis":0.6666666666666664,"ConfidenceInterval":{"N":3,"Mean":8.364573369423548,"StandardError":0.048100304454810505,"Level":12,"Margin":1.5199241394604335,"Lower":6.844649229963114,"Upper":9.884497508883982},"Percentiles":{"P0":8.280867829918861,"P25":8.323116794228554,"P50":8.365365758538246,"P67":8.393286817371845,"P80":8.414638215303421,"P85":8.422850291430949,"P90":8.43106236755848,"P95":8.439274443686008,"P100":8.447486519813538}},"Memory":{"Gen0Collections":192,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":67108864,"BytesAllocatedPerOperation":48},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":219170},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":214641},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":452856},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":511927},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":3006},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":2935},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":2736},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":23475},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":23504},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":22742},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":48410},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":117019},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":155792},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":220893},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":520443},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1005199},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2058889},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":4121734},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":8111052},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":10445425},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":14656457},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":30889151},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":56028834},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":111466824},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":196366236},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":421034317},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":23,"Operations":67108864,"Nanoseconds":825948191},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":297001835},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":243166921},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":243001041},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":67108864,"Nanoseconds":243272729},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":67108864,"Nanoseconds":242900292},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":67108864,"Nanoseconds":242965564},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":67108864,"Nanoseconds":242853575},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":243156762},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":244559193},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":243476259},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":67108864,"Nanoseconds":242863813},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":67108864,"Nanoseconds":243370330},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":67108864,"Nanoseconds":243432667},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":67108864,"Nanoseconds":242840871},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":67108864,"Nanoseconds":242989449},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":67108864,"Nanoseconds":242996722},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":67108864,"Nanoseconds":243021250},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":67108864,"Nanoseconds":242899045},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":67108864,"Nanoseconds":242886783},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":67108864,"Nanoseconds":242926446},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":67108864,"Nanoseconds":242954819},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":67108864,"Nanoseconds":242844022},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":873262457},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":819437768},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":835729100},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":798709082},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":809890673},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":804379642},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":67108864,"Nanoseconds":555719633},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":67108864,"Nanoseconds":566901224},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":67108864,"Nanoseconds":561390193}],"Metrics":[{"Value":0.00286102294921875,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":48,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]},{"DisplayInfo":"EmptyModels.EmptyApiTag: ShortRun(IterationCount=3, LaunchCount=1, WarmupCount=3)","Namespace":"performance","Type":"EmptyModels","Method":"EmptyApiTag","MethodTitle":"EmptyApiTag","Parameters":"","FullName":"performance.EmptyModels.EmptyApiTag","HardwareIntrinsics":"AVX2+BMI1+BMI2+F16C+FMA+LZCNT+MOVBE,AVX,SSE3+SSSE3+SSE4.1+SSE4.2+POPCNT,X86Base+SSE+SSE2,AES+PCLMUL VectorSize=256","Statistics":{"OriginalValues":[13.643999069929123,14.406840443611145,14.750795125961304],"N":3,"Min":13.643999069929123,"LowerFence":13.195322714745998,"Q1":14.025419756770134,"Median":14.406840443611145,"Mean":14.267211546500524,"Q3":14.578817784786224,"UpperFence":15.40891482681036,"Max":14.750795125961304,"InterquartileRange":0.5533980280160904,"LowerOutliers":[],"UpperOutliers":[],"AllOutliers":[],"StandardError":0.32704309048061947,"Variance":0.3208715490933439,"StandardDeviation":0.5664552489767783,"Skewness":-0.23151875375504977,"Kurtosis":0.6666666666666673,"ConfidenceInterval":{"N":3,"Mean":14.267211546500524,"StandardError":0.32704309048061947,"Level":12,"Margin":10.334252423126259,"Lower":3.932959123374266,"Upper":24.601463969626785},"Percentiles":{"P0":13.643999069929123,"P25":14.025419756770134,"P50":14.406840443611145,"P67":14.5237850356102,"P80":14.61321325302124,"P85":14.647608721256256,"P90":14.682004189491272,"P95":14.716399657726289,"P100":14.750795125961304}},"Memory":{"Gen0Collections":144,"Gen1Collections":0,"Gen2Collections":0,"TotalOperations":33554432,"BytesAllocatedPerOperation":72},"Measurements":[{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":204963},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":1,"Operations":1,"Nanoseconds":215283},{"IterationMode":"Overhead","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":457145},{"IterationMode":"Workload","IterationStage":"Jitting","LaunchIndex":1,"IterationIndex":2,"Operations":16,"Nanoseconds":491008},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":1,"Operations":16,"Nanoseconds":2234},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":2,"Operations":32,"Nanoseconds":2324},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":3,"Operations":64,"Nanoseconds":27421},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":4,"Operations":128,"Nanoseconds":28273},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":5,"Operations":256,"Nanoseconds":33022},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":6,"Operations":512,"Nanoseconds":38362},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":7,"Operations":1024,"Nanoseconds":80881},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":8,"Operations":2048,"Nanoseconds":136315},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":9,"Operations":4096,"Nanoseconds":236682},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":10,"Operations":8192,"Nanoseconds":429513},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":11,"Operations":16384,"Nanoseconds":720817},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":12,"Operations":32768,"Nanoseconds":1402622},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":13,"Operations":65536,"Nanoseconds":2772071},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":14,"Operations":131072,"Nanoseconds":5271273},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":15,"Operations":262144,"Nanoseconds":9353253},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":16,"Operations":524288,"Nanoseconds":8418737},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":17,"Operations":1048576,"Nanoseconds":16537442},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":18,"Operations":2097152,"Nanoseconds":33595998},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":19,"Operations":4194304,"Nanoseconds":62386873},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":20,"Operations":8388608,"Nanoseconds":154183158},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":21,"Operations":16777216,"Nanoseconds":290391028},{"IterationMode":"Workload","IterationStage":"Pilot","LaunchIndex":1,"IterationIndex":22,"Operations":33554432,"Nanoseconds":715792907},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":142789240},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":135954914},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121544546},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121631459},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121669570},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121701340},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121709775},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121449158},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121453927},{"IterationMode":"Overhead","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121781329},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":121756303},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":121514150},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":121561638},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":4,"Operations":33554432,"Nanoseconds":121818909},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":5,"Operations":33554432,"Nanoseconds":121576797},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":6,"Operations":33554432,"Nanoseconds":121445090},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":7,"Operations":33554432,"Nanoseconds":121468594},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":8,"Operations":33554432,"Nanoseconds":121683947},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":9,"Operations":33554432,"Nanoseconds":121434381},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":10,"Operations":33554432,"Nanoseconds":121578149},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":11,"Operations":33554432,"Nanoseconds":121509701},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":12,"Operations":33554432,"Nanoseconds":121784987},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":13,"Operations":33554432,"Nanoseconds":121624315},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":14,"Operations":33554432,"Nanoseconds":121474005},{"IterationMode":"Overhead","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":15,"Operations":33554432,"Nanoseconds":121548283},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":605303330},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":657770098},{"IterationMode":"Workload","IterationStage":"Warmup","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":584608074},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":579378277},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":604974986},{"IterationMode":"Workload","IterationStage":"Actual","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":616516190},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":1,"Operations":33554432,"Nanoseconds":457816639},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":2,"Operations":33554432,"Nanoseconds":483413348},{"IterationMode":"Workload","IterationStage":"Result","LaunchIndex":1,"IterationIndex":3,"Operations":33554432,"Nanoseconds":494954552}],"Metrics":[{"Value":0.004291534423828125,"Descriptor":{"Id":"Gen0Collects","DisplayName":"Gen0","Legend":"GC Generation 0 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":0}},{"Value":0,"Descriptor":{"Id":"Gen1Collects","DisplayName":"Gen1","Legend":"GC Generation 1 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":1}},{"Value":0,"Descriptor":{"Id":"Gen2Collects","DisplayName":"Gen2","Legend":"GC Generation 2 collects per 1000 operations","NumberFormat":"#0.0000","UnitType":0,"Unit":"Count","TheGreaterTheBetter":false,"PriorityInCategory":2}},{"Value":72,"Descriptor":{"Id":"Allocated Memory","DisplayName":"Allocated","Legend":"Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)","NumberFormat":"0.##","UnitType":2,"Unit":"B","TheGreaterTheBetter":false,"PriorityInCategory":3}}]}]} diff --git a/performance/benchmark/Descriptions.cs b/performance/benchmark/Descriptions.cs new file mode 100644 index 000000000..6c051a3ad --- /dev/null +++ b/performance/benchmark/Descriptions.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Net.Http; +using System.Reflection; +using System.Threading.Tasks; +using BenchmarkDotNet.Attributes; +using Microsoft.OpenApi; +using Microsoft.OpenApi.Reader; + +namespace performance; + +[MemoryDiagnoser] +[JsonExporter] +[ShortRunJob] +public class Descriptions +{ + private enum DescriptionSource + { + PetStoreYaml, + PetStoreJson, + GHESYaml, + GHESJson, + GHESNextYaml, + GHESNextJson + } + + [Benchmark] + public Task PetStoreYaml() => ParseDocumentAsync(DescriptionSource.PetStoreYaml); + + [Benchmark] + public Task PetStoreJson() => ParseDocumentAsync(DescriptionSource.PetStoreJson, OpenApiConstants.Json); + + [Benchmark] + public Task GHESYaml() => ParseDocumentAsync(DescriptionSource.GHESYaml); + + [Benchmark] + public Task GHESJson() => ParseDocumentAsync(DescriptionSource.GHESJson, OpenApiConstants.Json); + + [Benchmark] + public Task GHESNextYaml() => ParseDocumentAsync(DescriptionSource.GHESNextYaml); + + [Benchmark] + public Task GHESNextJson() => ParseDocumentAsync(DescriptionSource.GHESNextJson, OpenApiConstants.Json); + + private readonly Dictionary _streams = new(capacity: 6); + + [GlobalSetup] + public async Task GetAllDescriptions() + { + _httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(60) }; + _readerSettings = new OpenApiReaderSettings { LeaveStreamOpen = true }; + _readerSettings.AddYamlReader(); + + var results = await Task.WhenAll( + LoadFromAssemblyAsync(DescriptionSource.PetStoreYaml, PetStoreYamlResourceName), + LoadFromAssemblyAsync(DescriptionSource.PetStoreJson, PetStoreJsonResourceName), + LoadFromUrlAsync(DescriptionSource.GHESYaml, GHESYamlDescriptionUrl), + LoadFromUrlAsync(DescriptionSource.GHESJson, GHESJsonDescriptionUrl), + LoadFromUrlAsync(DescriptionSource.GHESNextYaml, GHESNextYamlDescriptionUrl), + LoadFromUrlAsync(DescriptionSource.GHESNextJson, GHESNextJsonDescriptionUrl) + ).ConfigureAwait(false); + + foreach (var (source, stream) in results) + { + _streams.Add(source, stream); + } + } + + private OpenApiReaderSettings _readerSettings; + + private const string PetStoreYamlResourceName = "petStore.yaml"; + private const string PetStoreJsonResourceName = "petStore.json"; + + private const string GHESRepoCommitSha = "aef5e31a2d10fdaab311ec6d18a453021a81383d"; + private const string GHESReleaseVersion = "ghes-3.16"; + private const string GHESDescriptionFileName = "ghes-3.16.2022-11-28"; + + // Building the four GHES URLs from shared constants means the pinned commit only needs to + // change in one place when the benchmark data set is refreshed, instead of four near-identical + // literals that can silently drift out of sync with each other. + private static string BuildGHESDescriptionUrl(string descriptionsFolder, string extension) => + $"https://raw.githubusercontent.com/github/rest-api-description/{GHESRepoCommitSha}/{descriptionsFolder}/{GHESReleaseVersion}/{GHESDescriptionFileName}.{extension}"; + + private static readonly string GHESYamlDescriptionUrl = BuildGHESDescriptionUrl("descriptions", "yaml"); + private static readonly string GHESJsonDescriptionUrl = BuildGHESDescriptionUrl("descriptions", "json"); + private static readonly string GHESNextYamlDescriptionUrl = BuildGHESDescriptionUrl("descriptions-next", "yaml"); + private static readonly string GHESNextJsonDescriptionUrl = BuildGHESDescriptionUrl("descriptions-next", "json"); + + private async Task ParseDocumentAsync(DescriptionSource source, string format = null) + { + format ??= OpenApiConstants.Yaml; + var stream = _streams[source]; + stream.Seek(0, SeekOrigin.Begin); + + var (document, _) = await OpenApiDocument.LoadAsync(stream, format, _readerSettings).ConfigureAwait(false); + return document; + } + + private HttpClient _httpClient; + + private async Task<(DescriptionSource Source, MemoryStream Stream)> LoadFromUrlAsync(DescriptionSource source, string url) + { + using var response = await _httpClient.GetAsync(url).ConfigureAwait(false); + response.EnsureSuccessStatusCode(); + + var stream = new MemoryStream(); + await response.Content.CopyToAsync(stream).ConfigureAwait(false); + stream.Seek(0, SeekOrigin.Begin); + return (source, stream); + } + + private static readonly Assembly _assembly = typeof(Descriptions).Assembly; + + private async Task<(DescriptionSource Source, MemoryStream Stream)> LoadFromAssemblyAsync(DescriptionSource source, string resourceFileName) + { + using var resourceStream = _assembly.GetManifestResourceStream($"PerformanceTests.{resourceFileName}"); + var stream = new MemoryStream(); + await resourceStream.CopyToAsync(stream).ConfigureAwait(false); + stream.Seek(0, SeekOrigin.Begin); + return (source, stream); + } + + [GlobalCleanup] + public void Cleanup() + { + foreach (var stream in _streams.Values) + { + stream.Dispose(); + } + _streams.Clear(); + _httpClient.Dispose(); + } +} diff --git a/performance/benchmark/EmptyModels.cs b/performance/benchmark/EmptyModels.cs new file mode 100644 index 000000000..f8c5d258d --- /dev/null +++ b/performance/benchmark/EmptyModels.cs @@ -0,0 +1,151 @@ +using BenchmarkDotNet.Attributes; +using Microsoft.OpenApi; + +namespace performance; +[MemoryDiagnoser] +[JsonExporter] +[ShortRunJob] +// [SimpleJob(launchCount: 1, warmupCount: 30, iterationCount: 50, invocationCount:1000)] +public class EmptyModels +{ + [Benchmark] + public OpenApiCallback EmptyApiCallback() + { + return new OpenApiCallback(); + } + [Benchmark] + public OpenApiComponents EmptyApiComponents() + { + return new OpenApiComponents(); + } + [Benchmark] + public OpenApiContact EmptyApiContact() + { + return new OpenApiContact(); + } + [Benchmark] + public OpenApiDiscriminator EmptyApiDiscriminator() + { + return new OpenApiDiscriminator(); + } + [Benchmark] + public OpenApiDocument EmptyDocument() + { + return new OpenApiDocument(); + } + [Benchmark] + public OpenApiEncoding EmptyApiEncoding() + { + return new OpenApiEncoding(); + } + [Benchmark] + public OpenApiExample EmptyApiExample() + { + return new OpenApiExample(); + } + [Benchmark] + public OpenApiExternalDocs EmptyApiExternalDocs() + { + return new OpenApiExternalDocs(); + } + [Benchmark] + public OpenApiHeader EmptyApiHeader() + { + return new OpenApiHeader(); + } + [Benchmark] + public OpenApiInfo EmptyApiInfo() + { + return new OpenApiInfo(); + } + [Benchmark] + public OpenApiLicense EmptyApiLicense() + { + return new OpenApiLicense(); + } + [Benchmark] + public OpenApiLink EmptyApiLink() + { + return new OpenApiLink(); + } + [Benchmark] + public OpenApiMediaType EmptyApiMediaType() + { + return new OpenApiMediaType(); + } + [Benchmark] + public OpenApiOAuthFlow EmptyApiOAuthFlow() + { + return new OpenApiOAuthFlow(); + } + [Benchmark] + public OpenApiOAuthFlows EmptyApiOAuthFlows() + { + return new OpenApiOAuthFlows(); + } + [Benchmark] + public OpenApiOperation EmptyApiOperation() + { + return new OpenApiOperation(); + } + [Benchmark] + public OpenApiParameter EmptyApiParameter() + { + return new OpenApiParameter(); + } + [Benchmark] + public OpenApiPathItem EmptyApiPathItem() + { + return new OpenApiPathItem(); + } + [Benchmark] + public OpenApiPaths EmptyApiPaths() + { + return new OpenApiPaths(); + } + [Benchmark] + public OpenApiRequestBody EmptyApiRequestBody() + { + return new OpenApiRequestBody(); + } + [Benchmark] + public OpenApiResponse EmptyApiResponse() + { + return new OpenApiResponse(); + } + [Benchmark] + public OpenApiResponses EmptyApiResponses() + { + return new OpenApiResponses(); + } + [Benchmark] + public OpenApiSchema EmptyApiSchema() + { + return new OpenApiSchema(); + } + [Benchmark] + public OpenApiSecurityRequirement EmptyApiSecurityRequirement() + { + return new OpenApiSecurityRequirement(); + } + [Benchmark] + public OpenApiSecurityScheme EmptyApiSecurityScheme() + { + return new OpenApiSecurityScheme(); + } + [Benchmark] + public OpenApiServer EmptyApiServer() + { + return new OpenApiServer(); + } + [Benchmark] + public OpenApiServerVariable EmptyApiServerVariable() + { + return new OpenApiServerVariable(); + } + [Benchmark] + public OpenApiTag EmptyApiTag() + { + return new OpenApiTag(); + } +} diff --git a/performance/benchmark/PerformanceTests.csproj b/performance/benchmark/PerformanceTests.csproj new file mode 100644 index 000000000..89b757f90 --- /dev/null +++ b/performance/benchmark/PerformanceTests.csproj @@ -0,0 +1,29 @@ + + + net8.0 + Exe + + + AnyCPU + pdbonly + true + true + true + Release + false + + CA1822;CS9057; + + + + + + + + + + + + + + \ No newline at end of file diff --git a/performance/benchmark/Program.cs b/performance/benchmark/Program.cs new file mode 100644 index 000000000..a745a2e6a --- /dev/null +++ b/performance/benchmark/Program.cs @@ -0,0 +1,13 @@ +using BenchmarkDotNet.Configs; +using BenchmarkDotNet.Running; + +namespace performance; +public class Program +{ + public static void Main(string[] args) + { + var config = DefaultConfig.Instance; + BenchmarkRunner.Run(config, args); + BenchmarkRunner.Run(config, args); + } +} diff --git a/performance/resultsComparer/Logger.cs b/performance/resultsComparer/Logger.cs new file mode 100644 index 000000000..974389517 --- /dev/null +++ b/performance/resultsComparer/Logger.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +using Microsoft.Extensions.Logging; + +namespace resultsComparer; +public static class Logger +{ + public static ILoggerFactory ConfigureLogger(LogLevel logLevel) + { + // Configure logger options +#if DEBUG + logLevel = logLevel > LogLevel.Debug ? LogLevel.Debug : logLevel; +#endif + + return LoggerFactory.Create((builder) => + { + builder + .AddSimpleConsole(c => c.IncludeScopes = true) +#if DEBUG + .AddDebug() +#endif + .SetMinimumLevel(logLevel); + }); + } +} diff --git a/performance/resultsComparer/Program.cs b/performance/resultsComparer/Program.cs new file mode 100644 index 000000000..9d3c0f871 --- /dev/null +++ b/performance/resultsComparer/Program.cs @@ -0,0 +1,63 @@ +// See https://aka.ms/new-console-template for more information +using System.CommandLine; +using Microsoft.Extensions.Logging; +using resultsComparer.Handlers; +using resultsComparer.Policies; + +namespace resultsComparer; + +public class Program +{ + public static async Task Main(string[] args) + { + var rootCommand = CreateRootCommand(); + var parseResult = rootCommand.Parse(args); + return await parseResult.InvokeAsync(); + } + internal static RootCommand CreateRootCommand() + { + var rootCommand = new RootCommand { }; + + var compareCommand = new Command("compare") + { + Description = "Compare the benchmark results." + }; + var oldResultsPathArgument = new Argument("existingReportPath") + { + DefaultValueFactory = (_) => ExistingReportPath, + Description = "The path to the existing benchmark report.", + }; + compareCommand.Arguments.Add(oldResultsPathArgument); + var newResultsPathArgument = new Argument("newReportPath") + { + DefaultValueFactory = (_) => ExistingReportPath, + Description = "The path to the new benchmark report.", + }; + compareCommand.Arguments.Add(newResultsPathArgument); + var logLevelOption = new Option("--log-level", "-l") + { + DefaultValueFactory = (_) => LogLevel.Warning, + Description = "The log level to use.", + }; + compareCommand.Options.Add(logLevelOption); + var allPolicyNames = IBenchmarkComparisonPolicy.GetAllPolicies().Select(static p => p.Name).Order(StringComparer.OrdinalIgnoreCase).ToArray(); + var policiesOption = new Option("--policies", "-p") + { + Arity = ArgumentArity.ZeroOrMore, + DefaultValueFactory = (_) => ["all"], + Description = $"The policies to use for comparison: {string.Join(',', allPolicyNames)}.", + }; + compareCommand.Options.Add(policiesOption); + var compareCommandHandler = new CompareCommandHandler + { + OldResultsPath = oldResultsPathArgument, + NewResultsPath = newResultsPathArgument, + LogLevel = logLevelOption, + Policies = policiesOption, + }; + compareCommand.SetAction(compareCommandHandler.InvokeAsync); + rootCommand.Add(compareCommand); + return rootCommand; + } + private const string ExistingReportPath = "../benchmark/BenchmarkDotNet.Artifacts/results/performance.EmptyModels-report.json"; +} diff --git a/performance/resultsComparer/handlers/CompareCommandHandler.cs b/performance/resultsComparer/handlers/CompareCommandHandler.cs new file mode 100644 index 000000000..520c6d252 --- /dev/null +++ b/performance/resultsComparer/handlers/CompareCommandHandler.cs @@ -0,0 +1,104 @@ +using System; +using System.CommandLine; +using System.CommandLine.Invocation; +using System.Text.Json; +using System.Text.Json.Serialization; +using Microsoft.Extensions.Logging; +using resultsComparer.Models; +using resultsComparer.Policies; + +namespace resultsComparer.Handlers; + +internal class CompareCommandHandler : AsynchronousCommandLineAction +{ + public required Argument OldResultsPath { get; set; } + public required Argument NewResultsPath { get; set; } + public required Option LogLevel { get; set; } + public required Option Policies { get; set; } + + public override Task InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default) + { + var oldResultsPath = parseResult.GetValue(OldResultsPath); + var newResultsPath = parseResult.GetValue(NewResultsPath); + var policyNames = parseResult.GetValue(Policies) ?? []; + var policies = IBenchmarkComparisonPolicy.GetSelectedPolicies(policyNames).ToArray(); + var logLevel = parseResult.GetValue(LogLevel); + using var loggerFactory = Logger.ConfigureLogger(logLevel); + var logger = loggerFactory.CreateLogger(); + if (string.IsNullOrWhiteSpace(oldResultsPath)) + { + logger.LogError("Old results path is required."); + return Task.FromResult(1); + } + if (string.IsNullOrWhiteSpace(newResultsPath)) + { + logger.LogError("New results path is required."); + return Task.FromResult(1); + } + return CompareResultsAsync(oldResultsPath, newResultsPath, logger, policies, cancellationToken); + } + private static async Task CompareResultsAsync(string existingReportPath, string newReportPath, ILogger logger, IBenchmarkComparisonPolicy[] comparisonPolicies, CancellationToken cancellationToken = default) + { + + var existingBenchmark = await GetBenchmarksAllocatedBytes(existingReportPath, cancellationToken); + if (existingBenchmark is null) + { + logger.LogError("No existing benchmark data found."); + return 1; + } + var newBenchmark = await GetBenchmarksAllocatedBytes(newReportPath, cancellationToken); + if (newBenchmark is null) + { + logger.LogError("No new benchmark data found."); + return 1; + } + var hasErrors = false; + foreach (var existingBenchmarkResult in existingBenchmark) + { + if (!newBenchmark.TryGetValue(existingBenchmarkResult.Key, out var newBenchmarkResult)) + { + logger.LogError("No new benchmark result found for {ExistingBenchmarkResultKey}.", existingBenchmarkResult.Key); + hasErrors = true; + } + foreach (var comparisonPolicy in comparisonPolicies) + { + if (!comparisonPolicy.Equals(existingBenchmarkResult.Value, newBenchmarkResult)) + { + logger.LogError("Benchmark result for {ExistingBenchmarkResultKey} does not match the existing benchmark result (original!=new). {ErrorMessage}", existingBenchmarkResult.Key, comparisonPolicy.GetErrorMessage(existingBenchmarkResult.Value, newBenchmarkResult)); + hasErrors = true; + } + } + } + + if (newBenchmark.Keys.Where(x => !existingBenchmark.ContainsKey(x)).ToArray() is { Length: > 0 } missingKeys) + { + logger.LogError("New benchmark results found that do not exist in the existing benchmark results."); + foreach (var missingKey in missingKeys) + { + logger.LogError("New benchmark result found: {MissingKey}.", missingKey); + } + hasErrors = true; + } + logger.LogInformation("Benchmark comparison complete. {Status}", hasErrors ? "Errors found" : "No errors found"); + return hasErrors ? 1 : 0; + } + + private static async Task?> GetBenchmarksAllocatedBytes(string targetPath, CancellationToken cancellationToken = default) + { + if (!File.Exists(targetPath)) + { + return null; + } + using var stream = new FileStream(targetPath, FileMode.Open, FileAccess.Read); + var report = (await JsonSerializer.DeserializeAsync(stream, BenchmarkSourceGenerationContext.Default.BenchmarkReport, cancellationToken: cancellationToken)) + ?? throw new InvalidOperationException($"Failed to deserialize {targetPath}."); + return report.Benchmarks + .Where(x => x.Memory is not null && x.Method is not null) + .ToDictionary(x => x.Method!, x => x.Memory!, StringComparer.OrdinalIgnoreCase); + } +} + +[JsonSerializable(typeof(BenchmarkReport))] +internal partial class BenchmarkSourceGenerationContext : JsonSerializerContext +{ +} diff --git a/performance/resultsComparer/models/BenchmarkReport.cs b/performance/resultsComparer/models/BenchmarkReport.cs new file mode 100644 index 000000000..c660619b6 --- /dev/null +++ b/performance/resultsComparer/models/BenchmarkReport.cs @@ -0,0 +1,21 @@ +using System.Text.Json.Serialization; + +namespace resultsComparer.Models; +internal sealed record BenchmarkReport +{ + [JsonPropertyName("Benchmarks")] + public Benchmark[] Benchmarks { get; init; } = []; +} +internal sealed record Benchmark +{ + [JsonPropertyName("Method")] + public string Method { get; init; } = string.Empty; + + [JsonPropertyName("Memory")] + public BenchmarkMemory Memory { get; init; } = new BenchmarkMemory(); +} +internal sealed record BenchmarkMemory +{ + [JsonPropertyName("BytesAllocatedPerOperation")] + public long AllocatedBytes { get; init; } +} diff --git a/performance/resultsComparer/policies/BaseBenchmarkComparisonPolicy.cs b/performance/resultsComparer/policies/BaseBenchmarkComparisonPolicy.cs new file mode 100644 index 000000000..86454b5c3 --- /dev/null +++ b/performance/resultsComparer/policies/BaseBenchmarkComparisonPolicy.cs @@ -0,0 +1,17 @@ +using resultsComparer.Models; + +namespace resultsComparer.Policies; + +internal abstract class BaseBenchmarkComparisonPolicy : IBenchmarkComparisonPolicy +{ + protected abstract string TypeName { get; } + public string Name => TypeName[..^6]; // Remove "Policy" suffix + + public abstract bool Equals(BenchmarkMemory? x, BenchmarkMemory? y); + public abstract string GetErrorMessage(BenchmarkMemory? x, BenchmarkMemory? y); + + public int GetHashCode(BenchmarkMemory obj) + { + throw new InvalidOperationException("This method should not be called. Use Equals instead."); + } +} diff --git a/performance/resultsComparer/policies/IBenchmarkComparisonPolicy.cs b/performance/resultsComparer/policies/IBenchmarkComparisonPolicy.cs new file mode 100644 index 000000000..6e3f518a1 --- /dev/null +++ b/performance/resultsComparer/policies/IBenchmarkComparisonPolicy.cs @@ -0,0 +1,40 @@ +using resultsComparer.Models; + +namespace resultsComparer.Policies; + +internal interface IBenchmarkComparisonPolicy : IEqualityComparer +{ + string GetErrorMessage(BenchmarkMemory? x, BenchmarkMemory? y); + string Name { get;} + public static IEnumerable GetSelectedPolicies(string[] names) + { + if (names is []) + { + yield break; + } + var allPolicies = GetAllPolicies(); + if (names is ["all"]) + { + foreach (var policy in allPolicies) + { + yield return policy; + } + } + var indexedNames = names.ToHashSet(StringComparer.OrdinalIgnoreCase); + foreach (var policy in allPolicies.Where(x => indexedNames.Contains(x.Name))) + { + yield return policy; + } + } + public static IBenchmarkComparisonPolicy[] GetAllPolicies() + { + return [ + IdenticalMemoryUsagePolicy.Instance, + ZeroPointOnePercentDifferenceMemoryUsagePolicy.Instance, + ZeroPointTwoPercentDifferenceMemoryUsagePolicy.Instance, + OnePercentDifferenceMemoryUsagePolicy.Instance, + TwoPercentDifferenceMemoryUsagePolicy.Instance, + FivePercentDifferenceMemoryUsagePolicy.Instance, + ]; + } +} diff --git a/performance/resultsComparer/policies/IdenticalMemoryUsagePolicy.cs b/performance/resultsComparer/policies/IdenticalMemoryUsagePolicy.cs new file mode 100644 index 000000000..fd5ab1fe4 --- /dev/null +++ b/performance/resultsComparer/policies/IdenticalMemoryUsagePolicy.cs @@ -0,0 +1,17 @@ +using resultsComparer.Models; + +namespace resultsComparer.Policies; +internal sealed class IdenticalMemoryUsagePolicy : BaseBenchmarkComparisonPolicy +{ + public static IdenticalMemoryUsagePolicy Instance { get; } = new IdenticalMemoryUsagePolicy(); + protected override string TypeName => nameof(IdenticalMemoryUsagePolicy); + public override bool Equals(BenchmarkMemory? x, BenchmarkMemory? y) + { + return x?.AllocatedBytes == y?.AllocatedBytes; + } + + public override string GetErrorMessage(BenchmarkMemory? x, BenchmarkMemory? y) + { + return $"Allocated bytes differ: {x?.AllocatedBytes} != {y?.AllocatedBytes}"; + } +} diff --git a/performance/resultsComparer/policies/PercentageMemoryUsagePolicy.cs b/performance/resultsComparer/policies/PercentageMemoryUsagePolicy.cs new file mode 100644 index 000000000..40ae2490f --- /dev/null +++ b/performance/resultsComparer/policies/PercentageMemoryUsagePolicy.cs @@ -0,0 +1,73 @@ +using resultsComparer.Models; + +namespace resultsComparer.Policies; + +internal sealed class ZeroPointOnePercentDifferenceMemoryUsagePolicy : PercentageMemoryUsagePolicy +{ + public static ZeroPointOnePercentDifferenceMemoryUsagePolicy Instance { get; } = new ZeroPointOnePercentDifferenceMemoryUsagePolicy(); + protected override string TypeName => nameof(ZeroPointOnePercentDifferenceMemoryUsagePolicy); + public ZeroPointOnePercentDifferenceMemoryUsagePolicy():base(0.1f) {} +} + +internal sealed class ZeroPointTwoPercentDifferenceMemoryUsagePolicy : PercentageMemoryUsagePolicy +{ + public static ZeroPointTwoPercentDifferenceMemoryUsagePolicy Instance { get; } = new ZeroPointTwoPercentDifferenceMemoryUsagePolicy(); + protected override string TypeName => nameof(ZeroPointTwoPercentDifferenceMemoryUsagePolicy); + public ZeroPointTwoPercentDifferenceMemoryUsagePolicy():base(0.2f) {} +} + +internal sealed class OnePercentDifferenceMemoryUsagePolicy : PercentageMemoryUsagePolicy +{ + public static OnePercentDifferenceMemoryUsagePolicy Instance { get; } = new OnePercentDifferenceMemoryUsagePolicy(); + protected override string TypeName => nameof(OnePercentDifferenceMemoryUsagePolicy); + public OnePercentDifferenceMemoryUsagePolicy():base(1) {} +} + +internal sealed class TwoPercentDifferenceMemoryUsagePolicy : PercentageMemoryUsagePolicy +{ + public static TwoPercentDifferenceMemoryUsagePolicy Instance { get; } = new TwoPercentDifferenceMemoryUsagePolicy(); + protected override string TypeName => nameof(TwoPercentDifferenceMemoryUsagePolicy); + public TwoPercentDifferenceMemoryUsagePolicy():base(2) {} +} + +internal sealed class FivePercentDifferenceMemoryUsagePolicy : PercentageMemoryUsagePolicy +{ + public static FivePercentDifferenceMemoryUsagePolicy Instance { get; } = new FivePercentDifferenceMemoryUsagePolicy(); + protected override string TypeName => nameof(FivePercentDifferenceMemoryUsagePolicy); + public FivePercentDifferenceMemoryUsagePolicy():base(1) {} +} + +internal abstract class PercentageMemoryUsagePolicy(float tolerancePercentagePoints) : BaseBenchmarkComparisonPolicy +{ + private float TolerancePercentagePoints { get; } = Math.Abs(tolerancePercentagePoints); + public override bool Equals(BenchmarkMemory? x, BenchmarkMemory? y) + { + if (x is null && y is null) + { + return true; + } + if (x is null || y is null) + { + return false; + } + var forwardRatio = GetPercentageDifference(x, y); + var backwardRatio = GetPercentageDifference(y, x); + return forwardRatio <= TolerancePercentagePoints && backwardRatio <= TolerancePercentagePoints; + } + private static double GetPercentageDifference(BenchmarkMemory x, BenchmarkMemory y) + { + return Math.Truncate(Math.Abs(GetRatio(x, y)) * 10000) / 100; + } + private static double GetRatio(BenchmarkMemory x, BenchmarkMemory y) + { + return (double)(y.AllocatedBytes - x.AllocatedBytes) / x.AllocatedBytes; + } + public override string GetErrorMessage(BenchmarkMemory? x, BenchmarkMemory? y) + { + if (x is null || y is null) + { + return "One of the benchmarks is null."; + } + return $"Allocated bytes differ: {x.AllocatedBytes} != {y.AllocatedBytes}, Ratio: {GetRatio(x, y)}, Allowed: {TolerancePercentagePoints}%"; + } +} diff --git a/performance/resultsComparer/resultsComparer.csproj b/performance/resultsComparer/resultsComparer.csproj new file mode 100644 index 000000000..9767a28ba --- /dev/null +++ b/performance/resultsComparer/resultsComparer.csproj @@ -0,0 +1,19 @@ + + + + Exe + net8.0 + enable + enable + + + + + + + + + + + + diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 000000000..783268015 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,30 @@ +{ + "bootstrap-sha": "8943e2ad40babb0204dedb11ad6f9273adf9cd53", + "exclude-paths": [ + ".azure-pipelines", + ".github", + ".idea", + ".vs", + ".vscode" + ], + "release-type": "simple", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "include-component-in-tag": false, + "include-v-in-tag": true, + "draft": false, + "packages": { + ".": { + "package-name": "Microsoft.OpenApi", + "changelog-path": "CHANGELOG.md", + "extra-files": [ + { + "type": "xml", + "path": "Directory.Build.props", + "xpath": "//Project/PropertyGroup/Version" + } + ] + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +} \ No newline at end of file diff --git a/scripts/check-nuget-package-published.ps1 b/scripts/check-nuget-package-published.ps1 new file mode 100644 index 000000000..0f31961ec --- /dev/null +++ b/scripts/check-nuget-package-published.ps1 @@ -0,0 +1,89 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +<# +.SYNOPSIS +Checks whether a NuGet artifact's version exists in an authenticated Azure Artifacts feed. +.DESCRIPTION +Resolves the package content endpoint from the private feed's NuGet v3 service index. +Sets nugetAlreadyPublished for the ESRP release steps; only a missing package or version +permits publishing. Feed authentication and other lookup failures fail the step. +#> +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)] + [string]$PackageDirectory, + [Parameter(Mandatory = $true)] + [string]$PackageId, + [Parameter(Mandatory = $true)] + [string]$NuGetServiceIndexUrl, + [string]$FeedAccessToken = $env:FEED_ACCESS_TOKEN +) + +$ErrorActionPreference = 'Stop' + +function Assert-PrivateFeedUrl { + param([string]$Url) + + $uri = [uri]$Url + if (-not $uri.IsAbsoluteUri -or $uri.Scheme -ne 'https' -or + ($uri.Host -ne 'pkgs.dev.azure.com' -and -not $uri.Host.EndsWith('.pkgs.visualstudio.com'))) { + throw "NuGet lookups must use an HTTPS Azure Artifacts feed: $Url" + } +} + +Assert-PrivateFeedUrl -Url $NuGetServiceIndexUrl +if ([string]::IsNullOrWhiteSpace($FeedAccessToken)) { + throw 'FEED_ACCESS_TOKEN is required to query the private NuGet feed.' +} + +$packagePattern = '^' + [regex]::Escape($PackageId) + '\.(\d[\w\.\-]*)\.nupkg$' +$packages = @(Get-ChildItem -Path $PackageDirectory -File -Filter "$PackageId.*.nupkg" | + Where-Object { $_.Name -match $packagePattern }) +if ($packages.Count -ne 1) { + throw "Expected exactly one $PackageId nupkg to publish; found $($packages.Count)." +} +$version = [regex]::Match($packages[0].Name, $packagePattern, 'IgnoreCase').Groups[1].Value +$id = $PackageId.ToLowerInvariant() +$credentials = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("AzureDevOps:$FeedAccessToken")) +$headers = @{ + 'Authorization' = "Basic $credentials" + 'User-Agent' = 'openapi-azdo-pipeline' +} + +$index = Invoke-RestMethod -Uri $NuGetServiceIndexUrl -Headers $headers -MaximumRedirection 0 +$resource = $index.resources | Where-Object { $_.'@type' -eq 'PackageBaseAddress/3.0.0' } | Select-Object -First 1 +if ([string]::IsNullOrWhiteSpace($resource.'@id')) { + throw "No PackageBaseAddress resource found in the NuGet service index at $NuGetServiceIndexUrl" +} +$uri = "$($resource.'@id'.TrimEnd('/'))/$id/index.json" +Assert-PrivateFeedUrl -Url $uri + +try { + $response = Invoke-RestMethod -Uri $uri -Headers $headers -MaximumRedirection 0 + if ($null -eq $response.versions) { + throw "No versions returned for NuGet $id by the private feed." + } + if ($response.versions -isnot [array] -or @($response.versions | Where-Object { + $_ -isnot [string] -or $_ -notmatch '^\d[\w\.\-]*$' + }).Count -gt 0) { + throw "Invalid version list returned for NuGet $id by the private feed." + } + $alreadyPublished = $response.versions -contains $version +} +catch { + if ([int]$_.Exception.Response.StatusCode -eq 404) { + $alreadyPublished = $false + } + else { + throw + } +} + +if ($alreadyPublished) { + Write-Host "NuGet $id $version already present in the private feed; skipping ESRP release (idempotent re-run)." +} +else { + Write-Host "NuGet $id $version not found in the private feed; will publish via ESRP." +} +Write-Host "##vso[task.setvariable variable=nugetAlreadyPublished]$($alreadyPublished.ToString().ToLowerInvariant())" \ No newline at end of file diff --git a/scripts/promoteUnshipped.ps1 b/scripts/promoteUnshipped.ps1 new file mode 100644 index 000000000..4ba6ca4b4 --- /dev/null +++ b/scripts/promoteUnshipped.ps1 @@ -0,0 +1,13 @@ +$nullableConstant = "#nullable enable" +$unshippedDocuments = Get-ChildItem -Filter *.Unshipped* -Recurse | Select-Object -ExpandProperty FullName +foreach ($unshippedDocumentPath in $unshippedDocuments) { + $shippedDocumentPath = $unshippedDocumentPath -replace '\.Unshipped', '.Shipped' + $unshippedDocumentContent = Get-Content $unshippedDocumentPath -Raw + $unshippedDocumentContent = ($unshippedDocumentContent -replace [regex]::Escape($nullableConstant), '').Trim() + if ([string]::IsNullOrWhiteSpace($unshippedDocumentContent)) { + Write-Host "No content to promote for $unshippedDocumentPath, skipping." -ForegroundColor Yellow + continue + } + Add-Content -Path $shippedDocumentPath -Value $unshippedDocumentContent -Verbose + Set-Content -Path $unshippedDocumentPath -Value $nullableConstant -Verbose +} \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props deleted file mode 100644 index adb086cc1..000000000 --- a/src/Directory.Build.props +++ /dev/null @@ -1,8 +0,0 @@ - - - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - - - - - \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/Interface/IDiagnostic.cs b/src/Microsoft.OpenApi.Readers/Interface/IDiagnostic.cs deleted file mode 100644 index 22d31e7a7..000000000 --- a/src/Microsoft.OpenApi.Readers/Interface/IDiagnostic.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -namespace Microsoft.OpenApi.Readers.Interface -{ - /// - /// Interface for the entity containing diagnostic information from the reading process. - /// - public interface IDiagnostic - { - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/Interface/IOpenApiReader.cs b/src/Microsoft.OpenApi.Readers/Interface/IOpenApiReader.cs deleted file mode 100644 index 170cde6fb..000000000 --- a/src/Microsoft.OpenApi.Readers/Interface/IOpenApiReader.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Models; - -namespace Microsoft.OpenApi.Readers.Interface -{ - /// - /// Interface for Open API readers. - /// - /// The type of input to read from. - /// The type of diagnostic for information from reading process. - public interface IOpenApiReader where TDiagnostic : IDiagnostic - { - /// - /// Reads the input and parses it into an Open API document. - /// - /// The input to read from. - /// The diagnostic entity containing information from the reading process. - /// The Open API document. - OpenApiDocument Read(TInput input, out TDiagnostic diagnostic); - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/Interface/IOpenApiVersionService.cs b/src/Microsoft.OpenApi.Readers/Interface/IOpenApiVersionService.cs deleted file mode 100644 index 32dd420f4..000000000 --- a/src/Microsoft.OpenApi.Readers/Interface/IOpenApiVersionService.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.Interface -{ - /// - /// Interface to a version specific parsing implementations. - /// - internal interface IOpenApiVersionService - { - - /// - /// Parse the string to a object. - /// - /// The reference string. - /// The type of the reference. - /// The object or null. - OpenApiReference ConvertToOpenApiReference(string reference, ReferenceType? type); - - /// - /// Loads an OpenAPI Element from a document fragment - /// - /// Type of element to load - /// document fragment node - /// Instance of OpenAPIElement - T LoadElement(ParseNode node) where T : IOpenApiElement; - - /// - /// Converts a generic RootNode instance into a strongly typed OpenApiDocument - /// - /// RootNode containing the information to be converted into an OpenAPI Document - /// Instance of OpenApiDocument populated with data from rootNode - OpenApiDocument LoadDocument(RootNode rootNode); - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj b/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj deleted file mode 100644 index f519fd340..000000000 --- a/src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj +++ /dev/null @@ -1,55 +0,0 @@ - - - net46; netstandard2.0 - true - http://go.microsoft.com/fwlink/?LinkID=288890 - https://github.com/Microsoft/OpenAPI.NET - https://raw.githubusercontent.com/Microsoft/OpenAPI.NET/master/LICENSE - true - Microsoft - Microsoft - Microsoft.OpenApi.Readers - Microsoft.OpenApi.Readers - 1.1.4 - OpenAPI.NET Readers for JSON and YAML documents - © Microsoft Corporation. All rights reserved. - OpenAPI .NET - - Microsoft.OpenApi.Readers - Microsoft.OpenApi.Readers - true - - - - bin\$(Configuration)\$(TargetFramework)\Microsoft.OpenApi.xml - ..\Microsoft.OpenApi.snk - - - - - - - - - - - - - True - True - Resource.resx - - - True - True - SRResource.resx - - - - - - ResXFileCodeGenerator - SRResource.Designer.cs - - - diff --git a/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs b/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs deleted file mode 100644 index cd3258eaa..000000000 --- a/src/Microsoft.OpenApi.Readers/OpenApiDiagnostic.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.Collections.Generic; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Interface; - -namespace Microsoft.OpenApi.Readers -{ - /// - /// Object containing all diagnostic information related to Open API parsing. - /// - public class OpenApiDiagnostic : IDiagnostic - { - /// - /// List of all errors. - /// - public IList Errors { get; set; } = new List(); - - /// - /// Open API specification version of the document parsed. - /// - public OpenApiSpecVersion SpecificationVersion { get; set; } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs b/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs deleted file mode 100644 index 1b1c2f367..000000000 --- a/src/Microsoft.OpenApi.Readers/OpenApiReaderSettings.cs +++ /dev/null @@ -1,57 +0,0 @@ -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Readers.ParseNodes; -using Microsoft.OpenApi.Validations; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Microsoft.OpenApi.Readers -{ - /// - /// Indicates if and when the reader should convert unresolved references into resolved objects - /// - public enum ReferenceResolutionSetting - { - /// - /// Create placeholder objects with an OpenApiReference instance and UnresolvedReference set to true. - /// - DoNotResolveReferences, - /// - /// Convert local references to references of valid domain objects. - /// - ResolveLocalReferences, - /// - /// Convert all references to references of valid domain objects. - /// - ResolveAllReferences - } - - /// - /// Configuration settings to control how OpenAPI documents are parsed - /// - public class OpenApiReaderSettings - { - /// - /// Indicates how references in the source document should be handled. - /// - public ReferenceResolutionSetting ReferenceResolution { get; set; } = ReferenceResolutionSetting.ResolveLocalReferences; - - /// - /// Dictionary of parsers for converting extensions into strongly typed classes - /// - public Dictionary> ExtensionParsers { get; set; } = new Dictionary>(); - - /// - /// Rules to use for validating OpenAPI specification. If none are provided a default set of rules are applied. - /// - public ValidationRuleSet RuleSet { get; set; } = ValidationRuleSet.GetDefaultRuleSet(); - - /// - /// URL where relative references should be resolved from if the description does not contain Server definitions - /// - public Uri BaseUrl { get; set; } - } -} diff --git a/src/Microsoft.OpenApi.Readers/OpenApiStreamReader.cs b/src/Microsoft.OpenApi.Readers/OpenApiStreamReader.cs deleted file mode 100644 index 1e0c08695..000000000 --- a/src/Microsoft.OpenApi.Readers/OpenApiStreamReader.cs +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.IO; -using System.Linq; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Interface; -using Microsoft.OpenApi.Readers.Services; -using Microsoft.OpenApi.Services; -using SharpYaml; -using SharpYaml.Serialization; - -namespace Microsoft.OpenApi.Readers -{ - /// - /// Service class for converting streams into OpenApiDocument instances - /// - public class OpenApiStreamReader : IOpenApiReader - { - private OpenApiReaderSettings _settings; - - /// - /// Create stream reader with custom settings if desired. - /// - /// - public OpenApiStreamReader(OpenApiReaderSettings settings = null) - { - _settings = settings ?? new OpenApiReaderSettings(); - - } - /// - /// Reads the stream input and parses it into an Open API document. - /// - /// Stream containing OpenAPI description to parse. - /// Returns diagnostic object containing errors detected during parsing - /// Instance of newly created OpenApiDocument - public OpenApiDocument Read(Stream input, out OpenApiDiagnostic diagnostic) - { - ParsingContext context; - YamlDocument yamlDocument; - diagnostic = new OpenApiDiagnostic(); - - // Parse the YAML/JSON - try - { - yamlDocument = LoadYamlDocument(input); - } - catch (YamlException ex) - { - diagnostic.Errors.Add(new OpenApiError($"#char={ex.Start.Line}", ex.Message)); - return new OpenApiDocument(); - } - - context = new ParsingContext - { - ExtensionParsers = _settings.ExtensionParsers, - BaseUrl = _settings.BaseUrl - }; - - OpenApiDocument document = null; - - try - { - // Parse the OpenAPI Document - document = context.Parse(yamlDocument, diagnostic); - - // Resolve References if requested - switch (_settings.ReferenceResolution) - { - case ReferenceResolutionSetting.ResolveAllReferences: - throw new ArgumentException(Properties.SRResource.CannotResolveRemoteReferencesSynchronously); - case ReferenceResolutionSetting.ResolveLocalReferences: - var resolver = new OpenApiReferenceResolver(document); - var walker = new OpenApiWalker(resolver); - walker.Walk(document); - foreach (var item in resolver.Errors) - { - diagnostic.Errors.Add(item); - } - break; - case ReferenceResolutionSetting.DoNotResolveReferences: - break; - } - } - catch (OpenApiException ex) - { - diagnostic.Errors.Add(new OpenApiError(ex)); - } - - // Validate the document - if (_settings.RuleSet != null && _settings.RuleSet.Rules.Count > 0) - { - var errors = document.Validate(_settings.RuleSet); - foreach (var item in errors) - { - diagnostic.Errors.Add(item); - } - } - - return document; - } - - /// - /// Reads the stream input and parses the fragment of an OpenAPI description into an Open API Element. - /// - /// Stream containing OpenAPI description to parse. - /// Version of the OpenAPI specification that the fragment conforms to. - /// Returns diagnostic object containing errors detected during parsing - /// Instance of newly created OpenApiDocument - public T ReadFragment(Stream input, OpenApiSpecVersion version, out OpenApiDiagnostic diagnostic) where T : IOpenApiElement - { - ParsingContext context; - YamlDocument yamlDocument; - diagnostic = new OpenApiDiagnostic(); - - // Parse the YAML/JSON - try - { - yamlDocument = LoadYamlDocument(input); - } - catch (YamlException ex) - { - diagnostic.Errors.Add(new OpenApiError($"#line={ex.Start.Line}", ex.Message)); - return default(T); - } - - context = new ParsingContext - { - ExtensionParsers = _settings.ExtensionParsers - }; - - IOpenApiElement element = null; - - try - { - // Parse the OpenAPI element - element = context.ParseFragment(yamlDocument, version, diagnostic); - } - catch (OpenApiException ex) - { - diagnostic.Errors.Add(new OpenApiError(ex)); - } - - // Validate the element - if (_settings.RuleSet != null && _settings.RuleSet.Rules.Count > 0) - { - var errors = element.Validate(_settings.RuleSet); - foreach (var item in errors) - { - diagnostic.Errors.Add(item); - } - } - - return (T)element; - } - - /// - /// Helper method to turn streams into YamlDocument - /// - /// Stream containing YAML formatted text - /// Instance of a YamlDocument - internal static YamlDocument LoadYamlDocument(Stream input) - { - YamlDocument yamlDocument; - using (var streamReader = new StreamReader(input)) - { - var yamlStream = new YamlStream(); - yamlStream.Load(streamReader); - yamlDocument = yamlStream.Documents.First(); - } - return yamlDocument; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/OpenApiStringReader.cs b/src/Microsoft.OpenApi.Readers/OpenApiStringReader.cs deleted file mode 100644 index 82b3a3ce7..000000000 --- a/src/Microsoft.OpenApi.Readers/OpenApiStringReader.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.IO; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Interface; - -namespace Microsoft.OpenApi.Readers -{ - /// - /// Service class for converting strings into OpenApiDocument instances - /// - public class OpenApiStringReader : IOpenApiReader - { - private readonly OpenApiReaderSettings _settings; - - /// - /// Constructor tha allows reader to use non-default settings - /// - /// - public OpenApiStringReader(OpenApiReaderSettings settings = null) - { - _settings = settings ?? new OpenApiReaderSettings(); - } - - /// - /// Reads the string input and parses it into an Open API document. - /// - public OpenApiDocument Read(string input, out OpenApiDiagnostic diagnostic) - { - using (var memoryStream = new MemoryStream()) - { - var writer = new StreamWriter(memoryStream); - writer.Write(input); - writer.Flush(); - memoryStream.Position = 0; - - return new OpenApiStreamReader(_settings).Read(memoryStream, out diagnostic); - } - } - - /// - /// Reads the string input and parses it into an Open API element. - /// - public T ReadFragment(string input, OpenApiSpecVersion version, out OpenApiDiagnostic diagnostic) where T : IOpenApiElement - { - using (var memoryStream = new MemoryStream()) - { - var writer = new StreamWriter(memoryStream); - writer.Write(input); - writer.Flush(); - memoryStream.Position = 0; - - return new OpenApiStreamReader(_settings).ReadFragment(memoryStream, version, out diagnostic); - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/FixedFieldMap.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/FixedFieldMap.cs deleted file mode 100644 index 26c1cfda2..000000000 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/FixedFieldMap.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; - -namespace Microsoft.OpenApi.Readers.ParseNodes -{ - internal class FixedFieldMap : Dictionary> - { - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/JsonPointerExtensions.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/JsonPointerExtensions.cs deleted file mode 100644 index de4d14aa3..000000000 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/JsonPointerExtensions.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using SharpYaml.Serialization; - -namespace Microsoft.OpenApi.Readers.ParseNodes -{ - /// - /// Extensions for JSON pointers. - /// - public static class JsonPointerExtensions - { - /// - /// Finds the YAML node that corresponds to this JSON pointer based on the base YAML node. - /// - public static YamlNode Find(this JsonPointer currentPointer, YamlNode baseYamlNode) - { - if (currentPointer.Tokens.Length == 0) - { - return baseYamlNode; - } - - try - { - var pointer = baseYamlNode; - foreach (var token in currentPointer.Tokens) - { - var sequence = pointer as YamlSequenceNode; - - if (sequence != null) - { - pointer = sequence.Children[Convert.ToInt32(token)]; - } - else - { - var map = pointer as YamlMappingNode; - if (map != null) - { - if (!map.Children.TryGetValue(new YamlScalarNode(token), out pointer)) - { - return null; - } - } - } - } - - return pointer; - } - catch (Exception) - { - return null; - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs deleted file mode 100644 index ee3553ad4..000000000 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using SharpYaml.Serialization; - -namespace Microsoft.OpenApi.Readers.ParseNodes -{ - internal class ListNode : ParseNode, IEnumerable - { - private readonly YamlSequenceNode _nodeList; - - public ListNode(ParsingContext context, OpenApiDiagnostic diagnostic, YamlSequenceNode sequenceNode) : base( - context, - diagnostic) - { - _nodeList = sequenceNode; - } - - public override List CreateList(Func map) - { - if (_nodeList == null) - { - throw new OpenApiException( - $"Expected list at line {_nodeList.Start.Line} while parsing {typeof(T).Name}"); - } - - return _nodeList.Select(n => map(new MapNode(Context, Diagnostic, n as YamlMappingNode))) - .Where(i => i != null) - .ToList(); - } - - public override List CreateListOfAny() - { - return _nodeList.Select(n => ParseNode.Create(Context, Diagnostic,n).CreateAny()) - .Where(i => i != null) - .ToList(); - } - - public override List CreateSimpleList(Func map) - { - if (_nodeList == null) - { - throw new OpenApiException( - $"Expected list at line {_nodeList.Start.Line} while parsing {typeof(T).Name}"); - } - - return _nodeList.Select(n => map(new ValueNode(Context, Diagnostic, n))).ToList(); - } - - public IEnumerator GetEnumerator() - { - return _nodeList.Select(n => Create(Context, Diagnostic, n)).ToList().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - /// - /// Create a - /// - /// The created Any object. - public override IOpenApiAny CreateAny() - { - var array = new OpenApiArray(); - foreach (var node in this) - { - array.Add(node.CreateAny()); - } - - return array; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs deleted file mode 100644 index 95aa4ff62..000000000 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Exceptions; -using SharpYaml.Schemas; -using SharpYaml.Serialization; - -namespace Microsoft.OpenApi.Readers.ParseNodes -{ - /// - /// Abstraction of a Map to isolate semantic parsing from details of - /// - internal class MapNode : ParseNode, IEnumerable - { - private readonly YamlMappingNode _node; - private readonly List _nodes; - - public MapNode(ParsingContext context, OpenApiDiagnostic diagnostic, string yamlString) : - this(context, diagnostic, (YamlMappingNode)YamlHelper.ParseYamlString(yamlString)) - { - } - - public MapNode(ParsingContext context, OpenApiDiagnostic diagnostic, YamlNode node) : base( - context, - diagnostic) - { - if (!(node is YamlMappingNode mapNode)) - { - throw new OpenApiReaderException("Expected map.", node); - } - - this._node = mapNode; - - _nodes = this._node.Children - .Select(kvp => new PropertyNode(Context, Diagnostic, kvp.Key.GetScalarValue(), kvp.Value)) - .Cast() - .ToList(); - } - - public PropertyNode this[string key] - { - get - { - YamlNode node = null; - if (this._node.Children.TryGetValue(new YamlScalarNode(key), out node)) - { - return new PropertyNode(Context, Diagnostic, key, this._node.Children[new YamlScalarNode(key)]); - } - - return null; - } - } - - public override Dictionary CreateMap(Func map) - { - var yamlMap = _node; - if (yamlMap == null) - { - throw new OpenApiException($"Expected map at line {yamlMap.Start.Line} while parsing {typeof(T).Name}"); - } - - var nodes = yamlMap.Select( - n => new - { - key = n.Key.GetScalarValue(), - value = n.Value as YamlMappingNode == null - ? default(T) - : map(new MapNode(Context, Diagnostic, n.Value as YamlMappingNode)) - }); - - return nodes.ToDictionary(k => k.key, v => v.value); - } - - public override Dictionary CreateMapWithReference( - ReferenceType referenceType, - Func map) - { - var yamlMap = _node; - if (yamlMap == null) - { - throw new OpenApiException($"Expected map at line {yamlMap.Start.Line} while parsing {typeof(T).Name}"); - } - - var nodes = yamlMap.Select( - n => { - var entry = new - { - key = n.Key.GetScalarValue(), - value = map(new MapNode(Context, Diagnostic, (YamlMappingNode)n.Value)) - }; - if (entry.value == null) - { - return null; // Body Parameters shouldn't be converted to Parameters - } - entry.value.Reference = new OpenApiReference() - { - Type = referenceType, - Id = entry.key - }; - return entry; - } - ); - return nodes.Where(n => n!= null).ToDictionary(k => k.key, v => v.value); - } - - public override Dictionary CreateSimpleMap(Func map) - { - var yamlMap = _node; - if (yamlMap == null) - { - throw new OpenApiException($"Expected map at line {yamlMap.Start.Line} while parsing {typeof(T).Name}"); - } - - var nodes = yamlMap.Select( - n => new - { - key = n.Key.GetScalarValue(), - value = map(new ValueNode(Context, Diagnostic, (YamlScalarNode)n.Value)) - }); - return nodes.ToDictionary(k => k.key, v => v.value); - } - - public IEnumerator GetEnumerator() - { - return _nodes.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return _nodes.GetEnumerator(); - } - - public override string GetRaw() - { - var x = new Serializer(new SerializerSettings(new JsonSchema()) {EmitJsonComptible = true}); - return x.Serialize(_node); - } - - public T GetReferencedObject(ReferenceType referenceType, string referenceId) - where T : IOpenApiReferenceable, new() - { - return new T() - { - UnresolvedReference = true, - Reference = Context.VersionService.ConvertToOpenApiReference(referenceId,referenceType) - }; - } - - public string GetReferencePointer() - { - YamlNode refNode; - - if (!_node.Children.TryGetValue(new YamlScalarNode("$ref"), out refNode)) - { - return null; - } - - return refNode.GetScalarValue(); - } - - public string GetScalarValue(ValueNode key) - { - var scalarNode = _node.Children[new YamlScalarNode(key.GetScalarValue())] as YamlScalarNode; - if (scalarNode == null) - { - throw new OpenApiException($"Expected scalar at line {_node.Start.Line} for key {key.GetScalarValue()}"); - } - - return scalarNode.Value; - } - - /// - /// Create a - /// - /// The created Any object. - public override IOpenApiAny CreateAny() - { - var apiObject = new OpenApiObject(); - foreach (var node in this) - { - apiObject.Add(node.Name, node.Value.CreateAny()); - } - - return apiObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/OpenApiAnyConverter.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/OpenApiAnyConverter.cs deleted file mode 100644 index 50ec431cc..000000000 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/OpenApiAnyConverter.cs +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Globalization; -using System.Linq; -using System.Text; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Models; - -namespace Microsoft.OpenApi.Readers.ParseNodes -{ - internal static class OpenApiAnyConverter - { - /// - /// Converts the s in the given - /// into the most specific type based on the value. - /// - public static IOpenApiAny GetSpecificOpenApiAny(IOpenApiAny openApiAny) - { - if (openApiAny is OpenApiArray openApiArray) - { - var newArray = new OpenApiArray(); - foreach (var element in openApiArray) - { - newArray.Add(GetSpecificOpenApiAny(element)); - } - - return newArray; - } - - if (openApiAny is OpenApiObject openApiObject) - { - var newObject = new OpenApiObject(); - - foreach (var key in openApiObject.Keys.ToList()) - { - newObject[key] = GetSpecificOpenApiAny(openApiObject[key]); - } - - return newObject; - } - - if ( !(openApiAny is OpenApiString)) - { - return openApiAny; - } - - var value = ((OpenApiString)openApiAny).Value; - - if (value == null || value == "null") - { - return new OpenApiNull(); - } - - if (value == "true") - { - return new OpenApiBoolean(true); - } - - if (value == "false") - { - return new OpenApiBoolean(false); - } - - if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intValue)) - { - return new OpenApiInteger(intValue); - } - - if (long.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var longValue)) - { - return new OpenApiLong(longValue); - } - - if (double.TryParse(value, NumberStyles.Float | NumberStyles.AllowThousands, CultureInfo.InvariantCulture, out var doubleValue)) - { - return new OpenApiDouble(doubleValue); - } - - if (DateTimeOffset.TryParse(value, CultureInfo.InvariantCulture, DateTimeStyles.None, out var dateTimeValue)) - { - return new OpenApiDateTime(dateTimeValue); - } - - // if we can't identify the type of value, return it as string. - return new OpenApiString(value); - } - - /// - /// Converts the s in the given - /// into the appropriate type based on the given . - /// For those strings that the schema does not specify the type for, convert them into - /// the most specific type based on the value. - /// - public static IOpenApiAny GetSpecificOpenApiAny(IOpenApiAny openApiAny, OpenApiSchema schema) - { - if (openApiAny is OpenApiArray openApiArray) - { - var newArray = new OpenApiArray(); - foreach (var element in openApiArray) - { - newArray.Add(GetSpecificOpenApiAny(element, schema?.Items)); - } - - return newArray; - } - - if (openApiAny is OpenApiObject openApiObject) - { - var newObject = new OpenApiObject(); - - foreach (var key in openApiObject.Keys.ToList()) - { - if ( schema != null && schema.Properties != null && schema.Properties.ContainsKey(key) ) - { - newObject[key] = GetSpecificOpenApiAny(openApiObject[key], schema.Properties[key]); - } - else - { - newObject[key] = GetSpecificOpenApiAny(openApiObject[key], schema?.AdditionalProperties); - } - } - - return newObject; - } - - if (!(openApiAny is OpenApiString)) - { - return openApiAny; - } - - if (schema?.Type == null) - { - return GetSpecificOpenApiAny(openApiAny); - } - - var type = schema.Type; - var format = schema.Format; - - var value = ((OpenApiString)openApiAny).Value; - - if (value == null || value == "null") - { - return new OpenApiNull(); - } - - if (type == "integer" && format == "int32") - { - if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intValue)) - { - return new OpenApiInteger(intValue); - } - } - - if (type == "integer" && format == "int64") - { - if (long.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var longValue)) - { - return new OpenApiLong(longValue); - } - } - - if (type == "integer") - { - if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intValue)) - { - return new OpenApiInteger(intValue); - } - } - - if (type == "number" && format == "float") - { - if (float.TryParse(value, NumberStyles.Float | NumberStyles.AllowThousands, CultureInfo.InvariantCulture, out var floatValue)) - { - return new OpenApiFloat(floatValue); - } - } - - if (type == "number" && format == "double" ) - { - if (double.TryParse(value, NumberStyles.Float | NumberStyles.AllowThousands, CultureInfo.InvariantCulture, out var doubleValue)) - { - return new OpenApiDouble(doubleValue); - } - } - - if (type == "number") - { - if (double.TryParse(value, NumberStyles.Float | NumberStyles.AllowThousands, CultureInfo.InvariantCulture, out var doubleValue)) - { - return new OpenApiDouble(doubleValue); - } - } - - if (type == "string" && format == "byte") - { - try - { - return new OpenApiByte(Convert.FromBase64String(value)); - } - catch(FormatException) - { } - } - - // binary - if (type == "string" && format == "binary") - { - try - { - return new OpenApiBinary(Encoding.UTF8.GetBytes(value)); - } - catch(EncoderFallbackException) - { } - } - - if (type == "string" && format == "date") - { - if (DateTimeOffset.TryParse(value, CultureInfo.InvariantCulture, DateTimeStyles.None, out var dateValue)) - { - return new OpenApiDate(dateValue.Date); - } - } - - if (type == "string" && format == "date-time") - { - if (DateTimeOffset.TryParse(value, CultureInfo.InvariantCulture, DateTimeStyles.None, out var dateTimeValue)) - { - return new OpenApiDateTime(dateTimeValue); - } - } - - if (type == "string" && format == "password") - { - return new OpenApiPassword(value); - } - - if (type == "string") - { - return new OpenApiString(value); - } - - if (type == "boolean") - { - if (bool.TryParse(value, out var booleanValue)) - { - return new OpenApiBoolean(booleanValue); - } - } - - // If data conflicts with the given type, return a string. - // 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 new OpenApiString(value); - } - } -} diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/ParseNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/ParseNode.cs deleted file mode 100644 index abeee3d26..000000000 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/ParseNode.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using System.Text.RegularExpressions; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Exceptions; -using SharpYaml.Serialization; - -namespace Microsoft.OpenApi.Readers.ParseNodes -{ - internal abstract class ParseNode - { - protected ParseNode(ParsingContext parsingContext, OpenApiDiagnostic diagnostic) - { - Context = parsingContext; - Diagnostic = diagnostic; - } - - public ParsingContext Context { get; } - - public OpenApiDiagnostic Diagnostic { get; } - - public MapNode CheckMapNode(string nodeName) - { - if (!(this is MapNode mapNode)) - { - throw new OpenApiReaderException($"{nodeName} must be a map/object"); - } - - return mapNode; - } - - public static ParseNode Create(ParsingContext context, OpenApiDiagnostic diagnostic, YamlNode node) - { - - if (node is YamlSequenceNode listNode) - { - return new ListNode(context, diagnostic, listNode); - } - - if (node is YamlMappingNode mapNode) - { - return new MapNode(context, diagnostic, mapNode); - } - - return new ValueNode(context, diagnostic, node as YamlScalarNode); - } - - public virtual List CreateList(Func map) - { - throw new OpenApiReaderException("Cannot create list from this type of node."); - } - - public virtual Dictionary CreateMap(Func map) - { - throw new OpenApiReaderException("Cannot create map from this type of node."); - } - - public virtual Dictionary CreateMapWithReference( - ReferenceType referenceType, - Func map) - where T : class, IOpenApiReferenceable - { - throw new OpenApiReaderException("Cannot create map from this reference."); - } - - public virtual List CreateSimpleList(Func map) - { - throw new OpenApiReaderException("Cannot create simple list from this type of node."); - } - - public virtual Dictionary CreateSimpleMap(Func map) - { - throw new OpenApiReaderException("Cannot create simple map from this type of node."); - } - - public virtual IOpenApiAny CreateAny() - { - throw new OpenApiReaderException("Cannot create an Any object this type of node."); - } - - public virtual string GetRaw() - { - throw new OpenApiReaderException("Cannot get raw value from this type of node."); - } - - public virtual string GetScalarValue() - { - throw new OpenApiReaderException("Cannot create a scalar value from this type of node."); - } - - public virtual List CreateListOfAny() - { - throw new OpenApiReaderException("Cannot create a list from this type of node."); - } - - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/PatternFieldMap.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/PatternFieldMap.cs deleted file mode 100644 index 8dadfcee2..000000000 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/PatternFieldMap.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; - -namespace Microsoft.OpenApi.Readers.ParseNodes -{ - internal class PatternFieldMap : Dictionary, Action> - { - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/PropertyNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/PropertyNode.cs deleted file mode 100644 index 39b9370f8..000000000 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/PropertyNode.cs +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Exceptions; -using SharpYaml.Serialization; - -namespace Microsoft.OpenApi.Readers.ParseNodes -{ - internal class PropertyNode : ParseNode - { - public PropertyNode(ParsingContext context, OpenApiDiagnostic diagnostic, string name, YamlNode node) : base( - context, - diagnostic) - { - Name = name; - Value = Create(context, diagnostic, node); - } - - public string Name { get; set; } - - public ParseNode Value { get; set; } - - public void ParseField( - T parentInstance, - IDictionary> fixedFields, - IDictionary, Action> patternFields) - { - Action fixedFieldMap; - var found = fixedFields.TryGetValue(Name, out fixedFieldMap); - - if (fixedFieldMap != null) - { - try - { - Context.StartObject(Name); - fixedFieldMap(parentInstance, Value); - } - catch (OpenApiReaderException ex) - { - Diagnostic.Errors.Add(new OpenApiError(ex)); - } - catch (OpenApiException ex) - { - ex.Pointer = Context.GetLocation(); - Diagnostic.Errors.Add(new OpenApiError(ex)); - } - finally - { - Context.EndObject(); - } - } - else - { - var map = patternFields.Where(p => p.Key(Name)).Select(p => p.Value).FirstOrDefault(); - if (map != null) - { - try - { - Context.StartObject(Name); - map(parentInstance, Name, Value); - } - catch (OpenApiReaderException ex) - { - Diagnostic.Errors.Add(new OpenApiError(ex)); - } - catch (OpenApiException ex) - { - ex.Pointer = Context.GetLocation(); - Diagnostic.Errors.Add(new OpenApiError(ex)); - } - finally - { - Context.EndObject(); - } - } - else - { - Diagnostic.Errors.Add( - new OpenApiError("", $"{Name} is not a valid property at {Context.GetLocation()}")); - } - } - } - - public override IOpenApiAny CreateAny() - { - throw new NotImplementedException(); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/RootNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/RootNode.cs deleted file mode 100644 index 014e2e71f..000000000 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/RootNode.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using SharpYaml.Serialization; - -namespace Microsoft.OpenApi.Readers.ParseNodes -{ - /// - /// Wrapper class around YamlDocument to isolate semantic parsing from details of Yaml DOM. - /// - internal class RootNode : ParseNode - { - private readonly YamlDocument _yamlDocument; - - public RootNode( - ParsingContext context, - OpenApiDiagnostic diagnostic, - YamlDocument yamlDocument) : base(context, diagnostic) - { - _yamlDocument = yamlDocument; - } - - public ParseNode Find(JsonPointer referencePointer) - { - var yamlNode = referencePointer.Find(_yamlDocument.RootNode); - if (yamlNode == null) - { - return null; - } - - return Create(Context, Diagnostic, yamlNode); - } - - public MapNode GetMap() - { - return new MapNode(Context, Diagnostic, (YamlMappingNode)_yamlDocument.RootNode); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/ParseNodes/ValueNode.cs b/src/Microsoft.OpenApi.Readers/ParseNodes/ValueNode.cs deleted file mode 100644 index b7669b538..000000000 --- a/src/Microsoft.OpenApi.Readers/ParseNodes/ValueNode.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Globalization; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Readers.Exceptions; -using SharpYaml.Serialization; - -namespace Microsoft.OpenApi.Readers.ParseNodes -{ - internal class ValueNode : ParseNode - { - private readonly YamlScalarNode _node; - - public ValueNode(ParsingContext context, OpenApiDiagnostic diagnostic, YamlNode node) : base( - context, - diagnostic) - { - if (!(node is YamlScalarNode scalarNode)) - { - throw new OpenApiReaderException("Expected a value.", node); - } - _node = scalarNode; - } - - public override string GetScalarValue() - { - return _node.Value; - } - - /// - /// Create a - /// - /// The created Any object. - public override IOpenApiAny CreateAny() - { - var value = GetScalarValue(); - return new OpenApiString(value); - } - } -} diff --git a/src/Microsoft.OpenApi.Readers/ParsingContext.cs b/src/Microsoft.OpenApi.Readers/ParsingContext.cs deleted file mode 100644 index e88e00423..000000000 --- a/src/Microsoft.OpenApi.Readers/ParsingContext.cs +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Exceptions; -using Microsoft.OpenApi.Readers.Interface; -using Microsoft.OpenApi.Readers.ParseNodes; -using Microsoft.OpenApi.Readers.V2; -using Microsoft.OpenApi.Readers.V3; -using SharpYaml.Serialization; - -namespace Microsoft.OpenApi.Readers -{ - /// - /// The Parsing Context holds temporary state needed whilst parsing an OpenAPI Document - /// - public class ParsingContext - { - private readonly Stack _currentLocation = new Stack(); - private readonly Dictionary _tempStorage = new Dictionary(); - private readonly Dictionary> _scopedTempStorage = new Dictionary>(); - private IOpenApiVersionService _versionService; - private readonly Dictionary> _loopStacks = new Dictionary>(); - internal Dictionary> ExtensionParsers { get; set; } = new Dictionary>(); - internal RootNode RootNode { get; set; } - internal List Tags { get; private set; } = new List(); - internal Uri BaseUrl { get; set; } - - /// - /// Initiates the parsing process. Not thread safe and should only be called once on a parsing context - /// - /// Yaml document to parse. - /// Diagnostic object which will return diagnostic results of the operation. - /// An OpenApiDocument populated based on the passed yamlDocument - internal OpenApiDocument Parse(YamlDocument yamlDocument, OpenApiDiagnostic diagnostic) - { - RootNode = new RootNode(this, diagnostic, yamlDocument); - - var inputVersion = GetVersion(RootNode); - - OpenApiDocument doc; - - switch (inputVersion) - { - case string version when version == "2.0": - VersionService = new OpenApiV2VersionService(); - doc = VersionService.LoadDocument(RootNode); - diagnostic.SpecificationVersion = OpenApiSpecVersion.OpenApi2_0; - break; - - case string version when version.StartsWith("3.0"): - VersionService = new OpenApiV3VersionService(); - doc = VersionService.LoadDocument(RootNode); - diagnostic.SpecificationVersion = OpenApiSpecVersion.OpenApi3_0; - break; - - default: - throw new OpenApiUnsupportedSpecVersionException(inputVersion); - } - - return doc; - } - - /// - /// Initiates the parsing process of a fragment. Not thread safe and should only be called once on a parsing context - /// - /// - /// OpenAPI version of the fragment - /// Diagnostic object which will return diagnostic results of the operation. - /// An OpenApiDocument populated based on the passed yamlDocument - internal T ParseFragment(YamlDocument yamlDocument, OpenApiSpecVersion version, OpenApiDiagnostic diagnostic) where T : IOpenApiElement - { - var node = ParseNode.Create(this, diagnostic, yamlDocument.RootNode); - - T element = default(T); - - switch (version) - { - case OpenApiSpecVersion.OpenApi2_0: - VersionService = new OpenApiV2VersionService(); - element = this.VersionService.LoadElement(node); - break; - - case OpenApiSpecVersion.OpenApi3_0: - this.VersionService = new OpenApiV3VersionService(); - element = this.VersionService.LoadElement(node); - break; - } - - return element; - } - - /// - /// Gets the version of the Open API document. - /// - private static string GetVersion(RootNode rootNode) - { - var versionNode = rootNode.Find(new JsonPointer("/openapi")); - - if (versionNode != null) - { - return versionNode.GetScalarValue(); - } - - versionNode = rootNode.Find(new JsonPointer("/swagger")); - - return versionNode?.GetScalarValue(); - } - - /// - /// Service providing all Version specific conversion functions - /// - internal IOpenApiVersionService VersionService - { - get - { - return _versionService; - } - set - { - _versionService = value; - } - } - - /// - /// End the current object. - /// - public void EndObject() - { - _currentLocation.Pop(); - } - - /// - /// Get the current location as string representing JSON pointer. - /// - public string GetLocation() - { - return "#/" + string.Join("/", _currentLocation.Reverse().ToArray()); - } - - /// - /// Gets the value from the temporary storage matching the given key. - /// - public T GetFromTempStorage(string key, object scope = null) where T : class - { - Dictionary storage; - - if (scope == null) - { - storage = _tempStorage; - } - else if (!_scopedTempStorage.TryGetValue(scope, out storage)) - { - return null; - } - - return storage.TryGetValue(key, out var value) ? (T)value : null; - } - - /// - /// Sets the temporary storge for this key and value. - /// - public void SetTempStorage(string key, object value, object scope = null) - { - Dictionary storage; - - if (scope == null) - { - storage = _tempStorage; - } - else if (!_scopedTempStorage.TryGetValue(scope, out storage)) - { - storage = _scopedTempStorage[scope] = new Dictionary(); - } - - if (value == null) - { - storage.Remove(key); - } - else - { - storage[key] = value; - } - } - - /// - /// Starts an object with the given object name. - /// - public void StartObject(string objectName) - { - _currentLocation.Push(objectName); - } - - /// - /// Maintain history of traversals to avoid stack overflows from cycles - /// - /// Any unique identifier for a stack. - /// Identifier used for current context. - /// If method returns false a loop was detected and the key is not added. - public bool PushLoop(string loopId, string key) - { - Stack stack; - if (!_loopStacks.TryGetValue(loopId, out stack)) - { - stack = new Stack(); - _loopStacks.Add(loopId, stack); - } - - if (!stack.Contains(key)) - { - stack.Push(key); - return true; - } - else - { - return false; // Loop detected - } - } - - /// - /// Reset loop tracking stack - /// - /// Identifier of loop to clear - internal void ClearLoop(string loopid) - { - _loopStacks[loopid].Clear(); - } - - /// - /// Exit from the context in cycle detection - /// - /// Identifier of loop - public void PopLoop(string loopid) - { - if (_loopStacks[loopid].Count > 0) - { - _loopStacks[loopid].Pop(); - } - } - - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/Services/OpenApiReferenceResolver.cs b/src/Microsoft.OpenApi.Readers/Services/OpenApiReferenceResolver.cs deleted file mode 100644 index 60a9bbfb6..000000000 --- a/src/Microsoft.OpenApi.Readers/Services/OpenApiReferenceResolver.cs +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Services; - -namespace Microsoft.OpenApi.Readers.Services -{ - /// - /// This class is used to walk an OpenApiDocument and convert unresolved references to references to populated objects - /// - internal class OpenApiReferenceResolver : OpenApiVisitorBase - { - private OpenApiDocument _currentDocument; - private bool _resolveRemoteReferences; - private List _errors = new List(); - - public OpenApiReferenceResolver(OpenApiDocument currentDocument, bool resolveRemoteReferences = true) - { - _currentDocument = currentDocument; - _resolveRemoteReferences = resolveRemoteReferences; - } - - public IEnumerable Errors - { - get - { - return _errors; - } - } - - public override void Visit(OpenApiDocument doc) - { - if (doc.Tags != null) - { - ResolveTags(doc.Tags); - } - } - - public override void Visit(OpenApiComponents components) - { - ResolveMap(components.Parameters); - ResolveMap(components.RequestBodies); - ResolveMap(components.Responses); - ResolveMap(components.Links); - ResolveMap(components.Callbacks); - ResolveMap(components.Examples); - ResolveMap(components.Schemas); - ResolveMap(components.SecuritySchemes); - } - - public override void Visit(IDictionary callbacks) - { - ResolveMap(callbacks); - } - - /// - /// Resolve all references used in an operation - /// - public override void Visit(OpenApiOperation operation) - { - ResolveObject(operation.RequestBody, r => operation.RequestBody = r); - ResolveList(operation.Parameters); - - if (operation.Tags != null) - { - ResolveTags(operation.Tags); - } - } - - /// - /// Resolve all references using in mediaType object - /// - /// - public override void Visit(OpenApiMediaType mediaType) - { - ResolveObject(mediaType.Schema, r => mediaType.Schema = r); - } - - /// - /// Resolve all references to examples - /// - /// - public override void Visit(IDictionary examples) - { - ResolveMap(examples); - } - - /// - /// Resolve all references to responses - /// - public override void Visit(OpenApiResponses responses) - { - ResolveMap(responses); - } - - /// - /// Resolve all references to SecuritySchemes - /// - public override void Visit(OpenApiSecurityRequirement securityRequirement) - { - foreach (var scheme in securityRequirement.Keys.ToList()) - { - ResolveObject(scheme, (resolvedScheme) => - { - if (resolvedScheme != null) - { - // If scheme was unresolved - // copy Scopes and remove old unresolved scheme - var scopes = securityRequirement[scheme]; - securityRequirement.Remove(scheme); - securityRequirement.Add(resolvedScheme, scopes); - } - }); - } - } - - /// - /// Resolve all references to parameters - /// - public override void Visit(IList parameters) - { - ResolveList(parameters); - } - - /// - /// Resolve all references to links - /// - public override void Visit(IDictionary links) - { - ResolveMap(links); - } - - /// - /// Resolve all references used in a schema - /// - public override void Visit(OpenApiSchema schema) - { - ResolveObject(schema.Items, r => schema.Items = r); - ResolveList(schema.OneOf); - ResolveList(schema.AllOf); - ResolveList(schema.AnyOf); - ResolveMap(schema.Properties); - ResolveObject(schema.AdditionalProperties, r => schema.AdditionalProperties = r); - } - - - /// - /// Replace references to tags with either tag objects declared in components, or inline tag object - /// - private void ResolveTags(IList tags) - { - for (int i = 0; i < tags.Count; i++) - { - var tag = tags[i]; - if (IsUnresolvedReference(tag)) - { - var resolvedTag = ResolveReference(tag.Reference); - - if (resolvedTag == null) - { - resolvedTag = new OpenApiTag() - { - Name = tag.Reference.Id - }; - } - tags[i] = resolvedTag; - } - } - } - - private void ResolveObject(T entity, Action assign) where T : class, IOpenApiReferenceable, new() - { - if (entity == null) return; - - if (IsUnresolvedReference(entity)) - { - assign(ResolveReference(entity.Reference)); - } - } - - private void ResolveList(IList list) where T : class, IOpenApiReferenceable, new() - { - if (list == null) return; - - for (int i = 0; i < list.Count; i++) - { - var entity = list[i]; - if (IsUnresolvedReference(entity)) - { - list[i] = ResolveReference(entity.Reference); - } - } - } - - private void ResolveMap(IDictionary map) where T : class, IOpenApiReferenceable, new() - { - if (map == null) return; - - foreach (var key in map.Keys.ToList()) - { - var entity = map[key]; - if (IsUnresolvedReference(entity)) - { - map[key] = ResolveReference(entity.Reference); - } - } - } - - private T ResolveReference(OpenApiReference reference) where T : class, IOpenApiReferenceable, new() - { - if (string.IsNullOrEmpty(reference.ExternalResource)) - { - try - { - return _currentDocument.ResolveReference(reference) as T; - } - catch (OpenApiException ex) - { - _errors.Add(new OpenApiError(ex)); - return null; - } - } - else if (_resolveRemoteReferences == true) - { - // TODO: Resolve Remote reference (Targeted for 1.1 release) - return new T() - { - UnresolvedReference = true, - Reference = reference - }; - } - else - { - // Leave as unresolved reference - return new T() - { - UnresolvedReference = true, - Reference = reference - }; - } - } - - private bool IsUnresolvedReference(IOpenApiReferenceable possibleReference) - { - return (possibleReference != null && possibleReference.UnresolvedReference); - } - } -} diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiContactDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiContactDeserializer.cs deleted file mode 100644 index 2469c887f..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiContactDeserializer.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static FixedFieldMap _contactFixedFields = new FixedFieldMap - { - { - "name", (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - "url", (o, n) => - { - o.Url = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - { - "email", (o, n) => - { - o.Email = n.GetScalarValue(); - } - }, - }; - - private static PatternFieldMap _contactPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - public static OpenApiContact LoadContact(ParseNode node) - { - var mapNode = node as MapNode; - var contact = new OpenApiContact(); - - ParseMap(mapNode, contact, _contactFixedFields, _contactPatternFields); - - return contact; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiDocumentDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiDocumentDeserializer.cs deleted file mode 100644 index debd3cfcd..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiDocumentDeserializer.cs +++ /dev/null @@ -1,327 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; -using Microsoft.OpenApi.Services; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static FixedFieldMap _openApiFixedFields = new FixedFieldMap - { - { - "swagger", (o, n) => - { - } /* Version is valid field but we already parsed it */ - }, - {"info", (o, n) => o.Info = LoadInfo(n)}, - {"host", (o, n) => n.Context.SetTempStorage("host", n.GetScalarValue())}, - {"basePath", (o, n) => n.Context.SetTempStorage("basePath", n.GetScalarValue())}, - { - "schemes", (o, n) => n.Context.SetTempStorage( - "schemes", - n.CreateSimpleList( - s => s.GetScalarValue())) - }, - { - "consumes", - (o, n) => n.Context.SetTempStorage(TempStorageKeys.GlobalConsumes, n.CreateSimpleList(s => s.GetScalarValue())) - }, - { - "produces", - (o, n) => n.Context.SetTempStorage(TempStorageKeys.GlobalProduces, n.CreateSimpleList(s => s.GetScalarValue())) - }, - {"paths", (o, n) => o.Paths = LoadPaths(n)}, - { - "definitions", - (o, n) => - { - if (o.Components == null) - { - o.Components = new OpenApiComponents(); - } - - o.Components.Schemas = n.CreateMapWithReference( - ReferenceType.Schema, - LoadSchema); - } - }, - { - "parameters", - (o, n) => - { - if (o.Components == null) - { - o.Components = new OpenApiComponents(); - } - - o.Components.Parameters = n.CreateMapWithReference( - ReferenceType.Parameter, - LoadParameter); - - o.Components.RequestBodies = n.CreateMapWithReference(ReferenceType.RequestBody, p => - { - var parameter = LoadParameter(p, loadRequestBody: true); - if (parameter != null) - { - return CreateRequestBody(n.Context, parameter); - } - - return null; - } - ); - } - }, - { - "responses", (o, n) => - { - if (o.Components == null) - { - o.Components = new OpenApiComponents(); - } - - o.Components.Responses = n.CreateMapWithReference( - ReferenceType.Response, - LoadResponse); - } - }, - { - "securityDefinitions", (o, n) => - { - if (o.Components == null) - { - o.Components = new OpenApiComponents(); - } - - o.Components.SecuritySchemes = n.CreateMapWithReference( - ReferenceType.SecurityScheme, - LoadSecurityScheme - ); - } - }, - {"security", (o, n) => o.SecurityRequirements = n.CreateList(LoadSecurityRequirement)}, - {"tags", (o, n) => o.Tags = n.CreateList(LoadTag)}, - {"externalDocs", (o, n) => o.ExternalDocs = LoadExternalDocs(n)} - }; - - private static PatternFieldMap _openApiPatternFields = new PatternFieldMap - { - // We have no semantics to verify X- nodes, therefore treat them as just values. - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - private static void MakeServers(IList servers, ParsingContext context, RootNode rootNode) - { - var host = context.GetFromTempStorage("host"); - var basePath = context.GetFromTempStorage("basePath"); - var schemes = context.GetFromTempStorage>("schemes"); - Uri defaultUrl = rootNode.Context.BaseUrl; - - // If nothing is provided, don't create a server - if (host == null && basePath == null && schemes == null) - { - return; - } - - //Validate host - if (host != null && !IsHostValid(host)) - { - rootNode.Diagnostic.Errors.Add(new OpenApiError(rootNode.Context.GetLocation(), "Invalid host")); - return; - } - - // Fill in missing information based on the defaultUrl - if (defaultUrl != null) - { - host = host ?? defaultUrl.GetComponents(UriComponents.NormalizedHost, UriFormat.SafeUnescaped); - basePath = basePath ?? defaultUrl.GetComponents(UriComponents.Path, UriFormat.SafeUnescaped); - schemes = schemes ?? new List { defaultUrl.GetComponents(UriComponents.Scheme, UriFormat.SafeUnescaped) }; - } - else if (String.IsNullOrEmpty(host) && String.IsNullOrEmpty(basePath)) - { - return; // Can't make a server object out of just a Scheme - } - - // Create the Server objects - if (schemes != null && schemes.Count > 0) - { - foreach (var scheme in schemes) - { - var server = new OpenApiServer - { - Url = BuildUrl(scheme, host, basePath) - }; - - servers.Add(server); - } - } - else - { - var server = new OpenApiServer - { - Url = BuildUrl(null, host, basePath) - }; - - servers.Add(server); - } - - foreach (var server in servers) - { - // Server Urls are always appended to Paths and Paths must start with / - // so removing the slash prevents a double slash. - if (server.Url.EndsWith("/")) - { - server.Url = server.Url.Substring(0, server.Url.Length - 1); - } - } - } - - private static string BuildUrl(string scheme, string host, string basePath) - { - if (String.IsNullOrEmpty(scheme) && !String.IsNullOrEmpty(host)) - { - host = "//" + host; // The double slash prefix creates a relative url where the scheme is defined by the BaseUrl - } - - int? port = null; - - if (!String.IsNullOrEmpty(host) && host.Contains(":")) - { - var pieces = host.Split(':'); - host = pieces.First(); - port = int.Parse(pieces.Last(), CultureInfo.InvariantCulture); - } - - var uriBuilder = new UriBuilder() - { - Scheme = scheme, - Host = host, - Path = basePath - }; - - if (port != null) - { - uriBuilder.Port = port.Value; - } - - return uriBuilder.ToString(); - } - - public static OpenApiDocument LoadOpenApi(RootNode rootNode) - { - var openApidoc = new OpenApiDocument(); - - var openApiNode = rootNode.GetMap(); - - ParseMap(openApiNode, openApidoc, _openApiFixedFields, _openApiPatternFields); - - if (openApidoc.Paths != null) - { - ProcessResponsesMediaTypes( - rootNode.GetMap(), - openApidoc.Paths.Values - .SelectMany(path => path.Operations?.Values ?? Enumerable.Empty()) - .SelectMany(operation => operation.Responses?.Values ?? Enumerable.Empty()), - openApiNode.Context); - } - - ProcessResponsesMediaTypes(rootNode.GetMap(), openApidoc.Components?.Responses?.Values, openApiNode.Context); - - // Post Process OpenApi Object - if (openApidoc.Servers == null) - { - openApidoc.Servers = new List(); - } - - MakeServers(openApidoc.Servers, openApiNode.Context, rootNode); - - FixRequestBodyReferences(openApidoc); - return openApidoc; - } - - private static void ProcessResponsesMediaTypes(MapNode mapNode, IEnumerable responses, ParsingContext context) - { - if (responses != null) - { - foreach (var response in responses) - { - ProcessProduces(mapNode, response, context); - - if (response.Content != null) - { - foreach (var mediaType in response.Content.Values) - { - ProcessAnyFields(mapNode, mediaType, _mediaTypeAnyFields); - } - } - } - } - } - - private static void FixRequestBodyReferences(OpenApiDocument doc) - { - // Walk all unresolved parameter references - // if id matches with request body Id, change type - if (doc.Components?.RequestBodies != null && doc.Components?.RequestBodies.Count > 0) - { - var fixer = new RequestBodyReferenceFixer(doc.Components?.RequestBodies); - var walker = new OpenApiWalker(fixer); - walker.Walk(doc); - } - } - - private static bool IsHostValid(string host) - { - //Check if the host contains :// - if (host.Contains(Uri.SchemeDelimiter)) - { - return false; - } - - //Check if the host (excluding port number) is a valid dns/ip address. - var hostPart = host.Split(':').First(); - return Uri.CheckHostName(hostPart) != UriHostNameType.Unknown; - } - } - - internal class RequestBodyReferenceFixer : OpenApiVisitorBase - { - private IDictionary _requestBodies; - public RequestBodyReferenceFixer(IDictionary requestBodies) - { - _requestBodies = requestBodies; - } - public override void Visit(OpenApiOperation operation) - { - var body = operation.Parameters.Where(p => p.UnresolvedReference == true - && _requestBodies.ContainsKey(p.Reference.Id)).FirstOrDefault(); - - if (body != null) - { - operation.Parameters.Remove(body); - operation.RequestBody = new OpenApiRequestBody() - { - UnresolvedReference = true, - Reference = new OpenApiReference() - { - Id = body.Reference.Id, - Type = ReferenceType.RequestBody - } - }; - } - } - - - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiExternalDocsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiExternalDocsDeserializer.cs deleted file mode 100644 index b0d2df871..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiExternalDocsDeserializer.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static readonly FixedFieldMap _externalDocsFixedFields = - new FixedFieldMap - { - { - OpenApiConstants.Description, (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - OpenApiConstants.Url, (o, n) => - { - o.Url = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - }; - - private static readonly PatternFieldMap _externalDocsPatternFields = - new PatternFieldMap(); - - public static OpenApiExternalDocs LoadExternalDocs(ParseNode node) - { - var mapNode = node.CheckMapNode("externalDocs"); - - var externalDocs = new OpenApiExternalDocs(); - - ParseMap(mapNode, externalDocs, _externalDocsFixedFields, _externalDocsPatternFields); - - return externalDocs; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiHeaderDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiHeaderDeserializer.cs deleted file mode 100644 index 3ebdb0e1d..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiHeaderDeserializer.cs +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Globalization; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Exceptions; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static readonly FixedFieldMap _headerFixedFields = new FixedFieldMap - { - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "type", (o, n) => - { - GetOrCreateSchema(o).Type = n.GetScalarValue(); - } - }, - { - "format", (o, n) => - { - GetOrCreateSchema(o).Format = n.GetScalarValue(); - } - }, - { - "items", (o, n) => - { - GetOrCreateSchema(o).Items = LoadSchema(n); - } - }, - { - "collectionFormat", (o, n) => - { - LoadStyle(o, n.GetScalarValue()); - } - }, - { - "default", (o, n) => - { - GetOrCreateSchema(o).Default = n.CreateAny(); - } - }, - { - "maximum", (o, n) => - { - GetOrCreateSchema(o).Maximum = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "exclusiveMaximum", (o, n) => - { - GetOrCreateSchema(o).ExclusiveMaximum = bool.Parse(n.GetScalarValue()); - } - }, - { - "minimum", (o, n) => - { - GetOrCreateSchema(o).Minimum = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "exclusiveMinimum", (o, n) => - { - GetOrCreateSchema(o).ExclusiveMinimum = bool.Parse(n.GetScalarValue()); - } - }, - { - "maxLength", (o, n) => - { - GetOrCreateSchema(o).MaxLength = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "minLength", (o, n) => - { - GetOrCreateSchema(o).MinLength = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "pattern", (o, n) => - { - GetOrCreateSchema(o).Pattern = n.GetScalarValue(); - } - }, - { - "maxItems", (o, n) => - { - GetOrCreateSchema(o).MaxItems = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "minItems", (o, n) => - { - GetOrCreateSchema(o).MinItems = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "uniqueItems", (o, n) => - { - GetOrCreateSchema(o).UniqueItems = bool.Parse(n.GetScalarValue()); - } - }, - { - "multipleOf", (o, n) => - { - GetOrCreateSchema(o).MultipleOf = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "enum", (o, n) => - { - GetOrCreateSchema(o).Enum = n.CreateListOfAny(); - } - } - }; - - private static readonly PatternFieldMap _headerPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - private static readonly AnyFieldMap _headerAnyFields = - new AnyFieldMap - { - { - OpenApiConstants.Default, - new AnyFieldMapParameter( - p => p.Schema.Default, - (p, v) => p.Schema.Default = v, - p => p.Schema) - } - }; - - private static readonly AnyListFieldMap _headerAnyListFields = - new AnyListFieldMap - { - { - OpenApiConstants.Enum, - new AnyListFieldMapParameter( - p => p.Schema.Enum, - (p, v) => p.Schema.Enum = v, - p => p.Schema) - }, - }; - - public static OpenApiHeader LoadHeader(ParseNode node) - { - var mapNode = node.CheckMapNode("header"); - var header = new OpenApiHeader(); - foreach (var property in mapNode) - { - property.ParseField(header, _headerFixedFields, _headerPatternFields); - } - - var schema = node.Context.GetFromTempStorage("schema"); - if (schema != null) - { - header.Schema = schema; - node.Context.SetTempStorage("schema", null); - } - - ProcessAnyFields(mapNode, header, _headerAnyFields); - ProcessAnyListFields(mapNode, header, _headerAnyListFields); - - return header; - } - - private static void LoadStyle(OpenApiHeader header, string style) - { - switch (style) - { - case "csv": - header.Style = ParameterStyle.Simple; - return; - case "ssv": - header.Style = ParameterStyle.SpaceDelimited; - return; - case "pipes": - header.Style = ParameterStyle.PipeDelimited; - return; - case "tsv": - throw new NotSupportedException(); - default: - throw new OpenApiReaderException("Unrecognized header style: " + style); - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiInfoDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiInfoDeserializer.cs deleted file mode 100644 index b2a3083f7..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiInfoDeserializer.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static FixedFieldMap _infoFixedFields = new FixedFieldMap - { - { - "title", (o, n) => - { - o.Title = n.GetScalarValue(); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "termsOfService", (o, n) => - { - o.TermsOfService = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - { - "contact", (o, n) => - { - o.Contact = LoadContact(n); - } - }, - { - "license", (o, n) => - { - o.License = LoadLicense(n); - } - }, - { - "version", (o, n) => - { - o.Version = n.GetScalarValue(); - } - } - }; - - private static PatternFieldMap _infoPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - public static OpenApiInfo LoadInfo(ParseNode node) - { - var mapNode = node.CheckMapNode("Info"); - - var info = new OpenApiInfo(); - - ParseMap(mapNode, info, _infoFixedFields, _infoPatternFields); - - return info; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiLicenseDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiLicenseDeserializer.cs deleted file mode 100644 index 567d37de1..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiLicenseDeserializer.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static FixedFieldMap _licenseFixedFields = new FixedFieldMap - { - { - "name", (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - "url", (o, n) => - { - o.Url = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - }; - - private static PatternFieldMap _licensePatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - public static OpenApiLicense LoadLicense(ParseNode node) - { - var mapNode = node.CheckMapNode("OpenApiLicense"); - - var license = new OpenApiLicense(); - - ParseMap(mapNode, license, _licenseFixedFields, _licensePatternFields); - - return license; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiOperationDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiOperationDeserializer.cs deleted file mode 100644 index ca4da470f..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiOperationDeserializer.cs +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.Collections.Generic; -using System.Linq; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static readonly FixedFieldMap _operationFixedFields = - new FixedFieldMap - { - { - "tags", (o, n) => o.Tags = n.CreateSimpleList( - valueNode => - LoadTagByReference( - valueNode.Context, - valueNode.Diagnostic, - valueNode.GetScalarValue())) - }, - { - "summary", (o, n) => - { - o.Summary = n.GetScalarValue(); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "externalDocs", (o, n) => - { - o.ExternalDocs = LoadExternalDocs(n); - } - }, - { - "operationId", (o, n) => - { - o.OperationId = n.GetScalarValue(); - } - }, - { - "parameters", (o, n) => - { - o.Parameters = n.CreateList(LoadParameter); - } - }, - { - "consumes", (o, n) => n.Context.SetTempStorage( - TempStorageKeys.OperationConsumes, - n.CreateSimpleList(s => s.GetScalarValue())) - }, - { - "produces", (o, n) => n.Context.SetTempStorage( - TempStorageKeys.OperationProduces, - n.CreateSimpleList(s => s.GetScalarValue())) - }, - { - "responses", (o, n) => - { - o.Responses = LoadResponses(n); - } - }, - { - "deprecated", (o, n) => - { - o.Deprecated = bool.Parse(n.GetScalarValue()); - } - }, - { - "security", (o, n) => - { - o.Security = n.CreateList(LoadSecurityRequirement); - } - }, - }; - - private static readonly PatternFieldMap _operationPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - private static readonly FixedFieldMap _responsesFixedFields = - new FixedFieldMap(); - - private static readonly PatternFieldMap _responsesPatternFields = - new PatternFieldMap - { - {s => !s.StartsWith("x-"), (o, p, n) => o.Add(p, LoadResponse(n))}, - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - internal static OpenApiOperation LoadOperation(ParseNode node) - { - // Reset these temp storage parameters for each operation. - node.Context.SetTempStorage(TempStorageKeys.BodyParameter, null); - node.Context.SetTempStorage(TempStorageKeys.FormParameters, null); - node.Context.SetTempStorage(TempStorageKeys.OperationProduces, null); - node.Context.SetTempStorage(TempStorageKeys.OperationConsumes, null); - - var mapNode = node.CheckMapNode("Operation"); - - var operation = new OpenApiOperation(); - - ParseMap(mapNode, operation, _operationFixedFields, _operationPatternFields); - - // Build request body based on information determined while parsing OpenApiOperation - var bodyParameter = node.Context.GetFromTempStorage(TempStorageKeys.BodyParameter); - if (bodyParameter != null) - { - operation.RequestBody = CreateRequestBody(node.Context, bodyParameter); - } - else - { - var formParameters = node.Context.GetFromTempStorage>(TempStorageKeys.FormParameters); - if (formParameters != null) - { - operation.RequestBody = CreateFormBody(node.Context, formParameters); - } - } - - foreach (var response in operation.Responses.Values) - { - ProcessProduces(node.CheckMapNode("responses"), response, node.Context); - } - - // Reset so that it's not picked up later - node.Context.SetTempStorage(TempStorageKeys.OperationProduces, null); - - return operation; - } - - public static OpenApiResponses LoadResponses(ParseNode node) - { - var mapNode = node.CheckMapNode("Responses"); - - var domainObject = new OpenApiResponses(); - - ParseMap(mapNode, domainObject, _responsesFixedFields, _responsesPatternFields); - - return domainObject; - } - - private static OpenApiRequestBody CreateFormBody(ParsingContext context, List formParameters) - { - var mediaType = new OpenApiMediaType - { - Schema = new OpenApiSchema - { - Properties = formParameters.ToDictionary( - k => k.Name, - v => - { - var schema = v.Schema; - schema.Description = v.Description; - return schema; - }), - Required = new HashSet(formParameters.Where(p => p.Required).Select(p => p.Name)) - } - }; - - var consumes = context.GetFromTempStorage>(TempStorageKeys.OperationConsumes) ?? - context.GetFromTempStorage>(TempStorageKeys.GlobalConsumes) ?? - new List { "application/x-www-form-urlencoded" }; - - var formBody = new OpenApiRequestBody - { - Content = consumes.ToDictionary( - k => k, - v => mediaType) - }; - - return formBody; - } - - internal static OpenApiRequestBody CreateRequestBody( - ParsingContext context, - OpenApiParameter bodyParameter) - { - var consumes = context.GetFromTempStorage>(TempStorageKeys.OperationConsumes) ?? - context.GetFromTempStorage>(TempStorageKeys.GlobalConsumes) ?? - new List { "application/json" }; - - var requestBody = new OpenApiRequestBody - { - Description = bodyParameter.Description, - Required = bodyParameter.Required, - Content = consumes.ToDictionary( - k => k, - v => new OpenApiMediaType - { - Schema = bodyParameter.Schema - }) - }; - - return requestBody; - } - - private static OpenApiTag LoadTagByReference( - ParsingContext context, - OpenApiDiagnostic diagnostic, - string tagName) - { - var tagObject = new OpenApiTag() - { - UnresolvedReference = true, - Reference = new OpenApiReference() { Id = tagName, Type = ReferenceType.Tag } - }; - - return tagObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiParameterDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiParameterDeserializer.cs deleted file mode 100644 index 601003862..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiParameterDeserializer.cs +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using System.Globalization; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static readonly FixedFieldMap _parameterFixedFields = - new FixedFieldMap - { - { - "name", (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - "in", (o, n) => - { - ProcessIn(o, n); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "required", (o, n) => - { - o.Required = bool.Parse(n.GetScalarValue()); - } - }, - { - "deprecated", (o, n) => - { - o.Deprecated = bool.Parse(n.GetScalarValue()); - } - }, - { - "allowEmptyValue", (o, n) => - { - o.AllowEmptyValue = bool.Parse(n.GetScalarValue()); - } - }, - { - "type", (o, n) => - { - GetOrCreateSchema(o).Type = n.GetScalarValue(); - } - }, - { - "items", (o, n) => - { - GetOrCreateSchema(o).Items = LoadSchema(n); - } - }, - { - "collectionFormat", (o, n) => - { - LoadStyle(o, n.GetScalarValue()); - } - }, - { - "format", (o, n) => - { - GetOrCreateSchema(o).Format = n.GetScalarValue(); - } - }, - { - "minimum", (o, n) => - { - GetOrCreateSchema(o).Minimum = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "maximum", (o, n) => - { - GetOrCreateSchema(o).Maximum = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "maxLength", (o, n) => - { - GetOrCreateSchema(o).MaxLength = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "minLength", (o, n) => - { - GetOrCreateSchema(o).MinLength = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "readOnly", (o, n) => - { - GetOrCreateSchema(o).ReadOnly = bool.Parse(n.GetScalarValue()); - } - }, - { - "default", (o, n) => - { - GetOrCreateSchema(o).Default = n.CreateAny(); - } - }, - { - "pattern", (o, n) => - { - GetOrCreateSchema(o).Pattern = n.GetScalarValue(); - } - }, - { - "enum", (o, n) => - { - GetOrCreateSchema(o).Enum = n.CreateListOfAny(); - } - }, - { - "schema", (o, n) => - { - o.Schema = LoadSchema(n); - } - }, - }; - - private static readonly PatternFieldMap _parameterPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - private static readonly AnyFieldMap _parameterAnyFields = - new AnyFieldMap - { - { - OpenApiConstants.Default, - new AnyFieldMapParameter( - p => p.Schema?.Default, - (p, v) => { - if (p.Schema != null || v != null) - { - GetOrCreateSchema(p).Default = v; - } - }, - p => p.Schema) - } - }; - - private static readonly AnyListFieldMap _parameterAnyListFields = - new AnyListFieldMap - { - { - OpenApiConstants.Enum, - new AnyListFieldMapParameter( - p => p.Schema?.Enum, - (p, v) => { - if (p.Schema != null || v != null && v.Count > 0) - { - GetOrCreateSchema(p).Enum = v; - } - }, - p => p.Schema) - }, - }; - - private static void LoadStyle(OpenApiParameter p, string v) - { - switch (v) - { - case "csv": - if (p.In == ParameterLocation.Query) - { - p.Style = ParameterStyle.Form; - } - else - { - p.Style = ParameterStyle.Simple; - } - return; - case "ssv": - p.Style = ParameterStyle.SpaceDelimited; - return; - case "pipes": - p.Style = ParameterStyle.PipeDelimited; - return; - case "tsv": - throw new NotSupportedException(); - case "multi": - p.Style = ParameterStyle.Form; - p.Explode = true; - return; - } - } - - private static OpenApiSchema GetOrCreateSchema(OpenApiParameter p) - { - if (p.Schema == null) - { - p.Schema = new OpenApiSchema(); - } - - return p.Schema; - } - - private static OpenApiSchema GetOrCreateSchema(OpenApiHeader p) - { - if (p.Schema == null) - { - p.Schema = new OpenApiSchema(); - } - - return p.Schema; - } - - private static void ProcessIn(OpenApiParameter o, ParseNode n) - { - var value = n.GetScalarValue(); - switch (value) - { - case "body": - n.Context.SetTempStorage(TempStorageKeys.ParameterIsBodyOrFormData, true); - n.Context.SetTempStorage(TempStorageKeys.BodyParameter, o); - break; - case "formData": - n.Context.SetTempStorage(TempStorageKeys.ParameterIsBodyOrFormData, true); - var formParameters = n.Context.GetFromTempStorage>("formParameters"); - if (formParameters == null) - { - formParameters = new List(); - n.Context.SetTempStorage("formParameters", formParameters); - } - - formParameters.Add(o); - break; - case "query": - case "header": - case "path": - o.In = value.GetEnumFromDisplayName(); - break; - default: - o.In = null; - break; - } - } - - public static OpenApiParameter LoadParameter(ParseNode node) - { - return LoadParameter(node, false); - } - - public static OpenApiParameter LoadParameter(ParseNode node, bool loadRequestBody) - { - // Reset the local variables every time this method is called. - node.Context.SetTempStorage(TempStorageKeys.ParameterIsBodyOrFormData, false); - - var mapNode = node.CheckMapNode("parameter"); - - var pointer = mapNode.GetReferencePointer(); - - if (pointer != null) - { - return mapNode.GetReferencedObject(ReferenceType.Parameter, pointer); - } - - var parameter = new OpenApiParameter(); - - ParseMap(mapNode, parameter, _parameterFixedFields, _parameterPatternFields); - - ProcessAnyFields(mapNode, parameter, _parameterAnyFields); - ProcessAnyListFields(mapNode, parameter, _parameterAnyListFields); - - var schema = node.Context.GetFromTempStorage("schema"); - if (schema != null) - { - parameter.Schema = schema; - node.Context.SetTempStorage("schema", null); - } - - bool isBodyOrFormData = (bool)node.Context.GetFromTempStorage(TempStorageKeys.ParameterIsBodyOrFormData); - if (isBodyOrFormData && !loadRequestBody) - { - return null; // Don't include Form or Body parameters when normal parameters are loaded. - } - - if (loadRequestBody && !isBodyOrFormData) - { - return null; // Don't include non-Body or non-Form parameters when request bodies are loaded. - } - - return parameter; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiPathItemDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiPathItemDeserializer.cs deleted file mode 100644 index 5b3a782e9..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiPathItemDeserializer.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static readonly FixedFieldMap _pathItemFixedFields = new FixedFieldMap - { - { - "$ref", (o, n) => - { - /* Not supported yet */ - } - }, - {"get", (o, n) => o.AddOperation(OperationType.Get, LoadOperation(n))}, - {"put", (o, n) => o.AddOperation(OperationType.Put, LoadOperation(n))}, - {"post", (o, n) => o.AddOperation(OperationType.Post, LoadOperation(n))}, - {"delete", (o, n) => o.AddOperation(OperationType.Delete, LoadOperation(n))}, - {"options", (o, n) => o.AddOperation(OperationType.Options, LoadOperation(n))}, - {"head", (o, n) => o.AddOperation(OperationType.Head, LoadOperation(n))}, - {"patch", (o, n) => o.AddOperation(OperationType.Patch, LoadOperation(n))}, - { - "parameters", (o, n) => - { - o.Parameters = n.CreateList(LoadParameter); - } - }, - }; - - private static readonly PatternFieldMap _pathItemPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))}, - }; - - public static OpenApiPathItem LoadPathItem(ParseNode node) - { - var mapNode = node.CheckMapNode("PathItem"); - - var pathItem = new OpenApiPathItem(); - - ParseMap(mapNode, pathItem, _pathItemFixedFields, _pathItemPatternFields); - - return pathItem; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiPathsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiPathsDeserializer.cs deleted file mode 100644 index 5b8a1a24a..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiPathsDeserializer.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static FixedFieldMap _pathsFixedFields = new FixedFieldMap(); - - private static PatternFieldMap _pathsPatternFields = new PatternFieldMap - { - {s => s.StartsWith("/"), (o, k, n) => o.Add(k, LoadPathItem(n))}, - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - public static OpenApiPaths LoadPaths(ParseNode node) - { - var mapNode = node.CheckMapNode("Paths"); - - var domainObject = new OpenApiPaths(); - - ParseMap(mapNode, domainObject, _pathsFixedFields, _pathsPatternFields); - - return domainObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiResponseDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiResponseDeserializer.cs deleted file mode 100644 index c28508848..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiResponseDeserializer.cs +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.Collections.Generic; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static readonly FixedFieldMap _responseFixedFields = new FixedFieldMap - { - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "headers", (o, n) => - { - o.Headers = n.CreateMap(LoadHeader); - } - }, - { - "examples", (o, n) => - { - LoadExamples(o, n); - } - }, - { - "schema", (o, n) => - { - n.Context.SetTempStorage(TempStorageKeys.ResponseSchema, LoadSchema(n), o); - } - }, - }; - - private static readonly PatternFieldMap _responsePatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - private static readonly AnyFieldMap _mediaTypeAnyFields = - new AnyFieldMap - { - { - OpenApiConstants.Example, - new AnyFieldMapParameter( - m => m.Example, - (m, v) => m.Example = v, - m => m.Schema) - } - }; - - private static void ProcessProduces(MapNode mapNode, OpenApiResponse response, ParsingContext context) - { - var produces = context.GetFromTempStorage>(TempStorageKeys.OperationProduces) ?? - context.GetFromTempStorage>(TempStorageKeys.GlobalProduces); - - if (response.Content == null) - { - response.Content = new Dictionary(); - } - - if (produces != null) - { - foreach (var produce in produces) - { - var schema = context.GetFromTempStorage(TempStorageKeys.ResponseSchema, response); - - if (response.Content.ContainsKey(produce) && response.Content[produce] != null) - { - if (schema != null) - { - response.Content[produce].Schema = schema; - ProcessAnyFields(mapNode, response.Content[produce], _mediaTypeAnyFields); - } - } - else - { - var mediaType = new OpenApiMediaType - { - Schema = schema - }; - - response.Content.Add(produce, mediaType); - } - } - - context.SetTempStorage(TempStorageKeys.ResponseSchema, null, response); - } - } - - private static void LoadExamples(OpenApiResponse response, ParseNode node) - { - var mapNode = node.CheckMapNode("examples"); - foreach (var mediaTypeNode in mapNode) - { - LoadExample(response, mediaTypeNode.Name, mediaTypeNode.Value); - } - } - - private static void LoadExample(OpenApiResponse response, string mediaType, ParseNode node) - { - var exampleNode = node.CreateAny(); - - if (response.Content == null) - { - response.Content = new Dictionary(); - } - - OpenApiMediaType mediaTypeObject; - if (response.Content.ContainsKey(mediaType)) - { - mediaTypeObject = response.Content[mediaType]; - } - else - { - mediaTypeObject = new OpenApiMediaType(); - response.Content.Add(mediaType, mediaTypeObject); - } - - mediaTypeObject.Example = exampleNode; - } - - public static OpenApiResponse LoadResponse(ParseNode node) - { - var mapNode = node.CheckMapNode("response"); - - var pointer = mapNode.GetReferencePointer(); - if (pointer != null) - { - return mapNode.GetReferencedObject(ReferenceType.Response, pointer); - } - - var response = new OpenApiResponse(); - foreach (var property in mapNode) - { - property.ParseField(response, _responseFixedFields, _responsePatternFields); - } - - foreach (var mediaType in response.Content.Values) - { - if (mediaType.Schema != null) - { - ProcessAnyFields(mapNode, mediaType, _mediaTypeAnyFields); - } - } - - return response; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiSchemaDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiSchemaDeserializer.cs deleted file mode 100644 index 195965cbd..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiSchemaDeserializer.cs +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.Collections.Generic; -using System.Globalization; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static readonly FixedFieldMap _schemaFixedFields = new FixedFieldMap - { - { - "title", (o, n) => - { - o.Title = n.GetScalarValue(); - } - }, - { - "multipleOf", (o, n) => - { - o.MultipleOf = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "maximum", (o, n) => - { - o.Maximum = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "exclusiveMaximum", (o, n) => - { - o.ExclusiveMaximum = bool.Parse(n.GetScalarValue()); - } - }, - { - "minimum", (o, n) => - { - o.Minimum = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "exclusiveMinimum", (o, n) => - { - o.ExclusiveMinimum = bool.Parse(n.GetScalarValue()); - } - }, - { - "maxLength", (o, n) => - { - o.MaxLength = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "minLength", (o, n) => - { - o.MinLength = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "pattern", (o, n) => - { - o.Pattern = n.GetScalarValue(); - } - }, - { - "maxItems", (o, n) => - { - o.MaxItems = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "minItems", (o, n) => - { - o.MinItems = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "uniqueItems", (o, n) => - { - o.UniqueItems = bool.Parse(n.GetScalarValue()); - } - }, - { - "maxProperties", (o, n) => - { - o.MaxProperties = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "minProperties", (o, n) => - { - o.MinProperties = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "required", (o, n) => - { - o.Required = new HashSet(n.CreateSimpleList(n2 => n2.GetScalarValue())); - } - }, - { - "enum", (o, n) => - { - o.Enum = n.CreateListOfAny(); - } - }, - - { - "type", (o, n) => - { - o.Type = n.GetScalarValue(); - } - }, - { - "allOf", (o, n) => - { - o.AllOf = n.CreateList(LoadSchema); - } - }, - { - "items", (o, n) => - { - o.Items = LoadSchema(n); - } - }, - { - "properties", (o, n) => - { - o.Properties = n.CreateMap(LoadSchema); - } - }, - { - "additionalProperties", (o, n) => - { - if (n is ValueNode) - { - o.AdditionalPropertiesAllowed = bool.Parse(n.GetScalarValue()); - } - else - { - o.AdditionalProperties = LoadSchema(n); - } - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "format", (o, n) => - { - o.Format = n.GetScalarValue(); - } - }, - { - "default", (o, n) => - { - o.Default = n.CreateAny(); - } - }, - { - "discriminator", (o, n) => - { - o.Discriminator = new OpenApiDiscriminator - { - PropertyName = n.GetScalarValue() - }; - } - }, - { - "readOnly", (o, n) => - { - o.ReadOnly = bool.Parse(n.GetScalarValue()); - } - }, - { - "xml", (o, n) => - { - o.Xml = LoadXml(n); - } - }, - { - "externalDocs", (o, n) => - { - o.ExternalDocs = LoadExternalDocs(n); - } - }, - { - "example", (o, n) => - { - o.Example = n.CreateAny(); - } - }, - }; - - private static readonly PatternFieldMap _schemaPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - private static readonly AnyFieldMap _schemaAnyFields = new AnyFieldMap - { - { - OpenApiConstants.Default, - new AnyFieldMapParameter( - s => s.Default, - (s, v) => s.Default = v, - s => s) - }, - { - OpenApiConstants.Example, - new AnyFieldMapParameter( - s => s.Example, - (s, v) => s.Example = v, - s => s) } - }; - - private static readonly AnyListFieldMap _schemaAnyListFields = new AnyListFieldMap - { - { - OpenApiConstants.Enum, - new AnyListFieldMapParameter( - s => s.Enum, - (s, v) => s.Enum = v, - s => s) - } - }; - - public static OpenApiSchema LoadSchema(ParseNode node) - { - var mapNode = node.CheckMapNode("schema"); - - var pointer = mapNode.GetReferencePointer(); - if (pointer != null) - { - return mapNode.GetReferencedObject(ReferenceType.Schema, pointer); - } - - var schema = new OpenApiSchema(); - - foreach (var propertyNode in mapNode) - { - propertyNode.ParseField(schema, _schemaFixedFields, _schemaPatternFields); - } - - ProcessAnyFields(mapNode, schema, _schemaAnyFields); - ProcessAnyListFields(mapNode, schema, _schemaAnyListFields); - - return schema; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiSecurityRequirementDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiSecurityRequirementDeserializer.cs deleted file mode 100644 index d214a9b11..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiSecurityRequirementDeserializer.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - public static OpenApiSecurityRequirement LoadSecurityRequirement(ParseNode node) - { - var mapNode = node.CheckMapNode("security"); - - var securityRequirement = new OpenApiSecurityRequirement(); - - foreach (var property in mapNode) - { - var scheme = LoadSecuritySchemeByReference( - mapNode.Context, - mapNode.Diagnostic, - property.Name); - - var scopes = property.Value.CreateSimpleList(n2 => n2.GetScalarValue()); - - if (scheme != null) - { - securityRequirement.Add(scheme, scopes); - } - else - { - node.Diagnostic.Errors.Add( - new OpenApiError(node.Context.GetLocation(), - $"Scheme {property.Name} is not found")); - } - } - - return securityRequirement; - } - - private static OpenApiSecurityScheme LoadSecuritySchemeByReference( - ParsingContext context, - OpenApiDiagnostic diagnostic, - string schemeName) - { - var securitySchemeObject = new OpenApiSecurityScheme() - { - UnresolvedReference = true, - Reference = new OpenApiReference() - { - Id = schemeName, - Type = ReferenceType.SecurityScheme - } - }; - - return securitySchemeObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs deleted file mode 100644 index 117d1f3c4..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiSecuritySchemeDeserializer.cs +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static string _flowValue; - - private static OpenApiOAuthFlow _flow; - - private static readonly FixedFieldMap _securitySchemeFixedFields = - new FixedFieldMap - { - { - "type", - (o, n) => - { - var type = n.GetScalarValue(); - switch (type) - { - case "basic": - o.Type = SecuritySchemeType.Http; - o.Scheme = "basic"; - break; - - case "apiKey": - o.Type = SecuritySchemeType.ApiKey; - break; - - case "oauth2": - o.Type = SecuritySchemeType.OAuth2; - break; - } - } - }, - {"description", (o, n) => o.Description = n.GetScalarValue()}, - {"name", (o, n) => o.Name = n.GetScalarValue()}, - {"in", (o, n) => o.In = n.GetScalarValue().GetEnumFromDisplayName()}, - { - "flow", (o, n) => - { - _flowValue = n.GetScalarValue(); - } - }, - { - "authorizationUrl", - (o, n) => - { - _flow.AuthorizationUrl = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - { - "tokenUrl", - (o, n) => - { - _flow.TokenUrl = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - { - "scopes", (o, n) => - { - _flow.Scopes = n.CreateSimpleMap(LoadString); - } - } - }; - - private static readonly PatternFieldMap _securitySchemePatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - public static OpenApiSecurityScheme LoadSecurityScheme(ParseNode node) - { - // Reset the local variables every time this method is called. - // TODO: Change _flow to a tempStorage variable to make the deserializer thread-safe. - _flowValue = null; - _flow = new OpenApiOAuthFlow(); - - var mapNode = node.CheckMapNode("securityScheme"); - - var securityScheme = new OpenApiSecurityScheme(); - foreach (var property in mapNode) - { - property.ParseField(securityScheme, _securitySchemeFixedFields, _securitySchemePatternFields); - } - - // Put the Flow object in the right Flows property based on the string in "flow" - if (_flowValue == OpenApiConstants.Implicit) - { - securityScheme.Flows = new OpenApiOAuthFlows - { - Implicit = _flow - }; - } - else if (_flowValue == OpenApiConstants.Password) - { - securityScheme.Flows = new OpenApiOAuthFlows - { - Password = _flow - }; - } - else if (_flowValue == OpenApiConstants.Application) - { - securityScheme.Flows = new OpenApiOAuthFlows - { - ClientCredentials = _flow - }; - } - else if (_flowValue == OpenApiConstants.AccessCode) - { - securityScheme.Flows = new OpenApiOAuthFlows - { - AuthorizationCode = _flow - }; - } - - return securityScheme; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiTagDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiTagDeserializer.cs deleted file mode 100644 index 380999475..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiTagDeserializer.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static readonly FixedFieldMap _tagFixedFields = new FixedFieldMap - { - { - OpenApiConstants.Name, (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - OpenApiConstants.Description, (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - OpenApiConstants.ExternalDocs, (o, n) => - { - o.ExternalDocs = LoadExternalDocs(n); - } - } - }; - - private static readonly PatternFieldMap _tagPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - public static OpenApiTag LoadTag(ParseNode n) - { - var mapNode = n.CheckMapNode("tag"); - - var domainObject = new OpenApiTag(); - - foreach (var propertyNode in mapNode) - { - propertyNode.ParseField(domainObject, _tagFixedFields, _tagPatternFields); - } - - return domainObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiV2Deserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiV2Deserializer.cs deleted file mode 100644 index ace68921b..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiV2Deserializer.cs +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.Collections.Generic; -using System.Linq; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V2 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static void ParseMap( - MapNode mapNode, - T domainObject, - FixedFieldMap fixedFieldMap, - PatternFieldMap patternFieldMap, - List requiredFields = null) - { - if (mapNode == null) - { - return; - } - - foreach (var propertyNode in mapNode) - { - propertyNode.ParseField(domainObject, fixedFieldMap, patternFieldMap); - requiredFields?.Remove(propertyNode.Name); - } - } - - private static void ProcessAnyFields( - MapNode mapNode, - T domainObject, - AnyFieldMap anyFieldMap) - { - foreach (var anyFieldName in anyFieldMap.Keys.ToList()) - { - try - { - mapNode.Context.StartObject(anyFieldName); - - var convertedOpenApiAny = OpenApiAnyConverter.GetSpecificOpenApiAny( - anyFieldMap[anyFieldName].PropertyGetter(domainObject), - anyFieldMap[anyFieldName].SchemaGetter(domainObject)); - - anyFieldMap[anyFieldName].PropertySetter(domainObject, convertedOpenApiAny); - } - catch (OpenApiException exception) - { - exception.Pointer = mapNode.Context.GetLocation(); - mapNode.Diagnostic.Errors.Add(new OpenApiError(exception)); - } - finally - { - mapNode.Context.EndObject(); - } - } - } - - private static void ProcessAnyListFields( - MapNode mapNode, - T domainObject, - AnyListFieldMap anyListFieldMap) - { - foreach (var anyListFieldName in anyListFieldMap.Keys.ToList()) - { - try - { - var newProperty = new List(); - - mapNode.Context.StartObject(anyListFieldName); - - var list = anyListFieldMap[anyListFieldName].PropertyGetter(domainObject); - if (list != null) - { - foreach (var propertyElement in list) - { - newProperty.Add( - OpenApiAnyConverter.GetSpecificOpenApiAny( - propertyElement, - anyListFieldMap[anyListFieldName].SchemaGetter(domainObject))); - } - } - - anyListFieldMap[anyListFieldName].PropertySetter(domainObject, newProperty); - } - catch (OpenApiException exception) - { - exception.Pointer = mapNode.Context.GetLocation(); - mapNode.Diagnostic.Errors.Add(new OpenApiError(exception)); - } - finally - { - mapNode.Context.EndObject(); - } - } - } - - private static void ProcessAnyMapFields( - MapNode mapNode, - T domainObject, - AnyMapFieldMap anyMapFieldMap) - { - foreach (var anyMapFieldName in anyMapFieldMap.Keys.ToList()) - { - try - { - var newProperty = new List(); - - mapNode.Context.StartObject(anyMapFieldName); - - foreach (var propertyMapElement in anyMapFieldMap[anyMapFieldName].PropertyMapGetter(domainObject)) - { - if (propertyMapElement.Value != null) - { - mapNode.Context.StartObject(propertyMapElement.Key); - - var any = anyMapFieldMap[anyMapFieldName].PropertyGetter(propertyMapElement.Value); - - var newAny = OpenApiAnyConverter.GetSpecificOpenApiAny( - any, - anyMapFieldMap[anyMapFieldName].SchemaGetter(domainObject)); - - anyMapFieldMap[anyMapFieldName].PropertySetter(propertyMapElement.Value, newAny); - } - } - } - catch (OpenApiException exception) - { - exception.Pointer = mapNode.Context.GetLocation(); - mapNode.Diagnostic.Errors.Add(new OpenApiError(exception)); - } - finally - { - mapNode.Context.EndObject(); - } - } - } - - public static IOpenApiAny LoadAny(ParseNode node) - { - return OpenApiAnyConverter.GetSpecificOpenApiAny(node.CreateAny()); - } - - private static IOpenApiExtension LoadExtension(string name, ParseNode node) - { - if (node.Context.ExtensionParsers.TryGetValue(name, out var parser)) - { - return parser( - OpenApiAnyConverter.GetSpecificOpenApiAny(node.CreateAny()), - OpenApiSpecVersion.OpenApi2_0); - } - else - { - return OpenApiAnyConverter.GetSpecificOpenApiAny(node.CreateAny()); - } - } - - private static string LoadString(ParseNode node) - { - return node.GetScalarValue(); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs deleted file mode 100644 index e9561b367..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Exceptions; -using Microsoft.OpenApi.Readers.Interface; -using Microsoft.OpenApi.Readers.ParseNodes; -using Microsoft.OpenApi.Readers.Properties; - - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// The version specific implementations for OpenAPI V2.0. - /// - internal class OpenApiV2VersionService : IOpenApiVersionService - { - private IDictionary> _loaders = new Dictionary> - { - [typeof(IOpenApiAny)] = OpenApiV2Deserializer.LoadAny, - [typeof(OpenApiExternalDocs)] = OpenApiV2Deserializer.LoadExternalDocs, - [typeof(OpenApiHeader)] = OpenApiV2Deserializer.LoadHeader, - [typeof(OpenApiInfo)] = OpenApiV2Deserializer.LoadInfo, - [typeof(OpenApiLicense)] = OpenApiV2Deserializer.LoadLicense, - [typeof(OpenApiOperation)] = OpenApiV2Deserializer.LoadOperation, - [typeof(OpenApiParameter)] = OpenApiV2Deserializer.LoadParameter, - [typeof(OpenApiPathItem)] = OpenApiV2Deserializer.LoadPathItem, - [typeof(OpenApiPaths)] = OpenApiV2Deserializer.LoadPaths, - [typeof(OpenApiResponse)] = OpenApiV2Deserializer.LoadResponse, - [typeof(OpenApiResponses)] = OpenApiV2Deserializer.LoadResponses, - [typeof(OpenApiSchema)] = OpenApiV2Deserializer.LoadSchema, - [typeof(OpenApiSecurityRequirement)] = OpenApiV2Deserializer.LoadSecurityRequirement, - [typeof(OpenApiSecurityScheme)] = OpenApiV2Deserializer.LoadSecurityScheme, - [typeof(OpenApiTag)] = OpenApiV2Deserializer.LoadTag, - [typeof(OpenApiXml)] = OpenApiV2Deserializer.LoadXml - }; - - private static OpenApiReference ParseLocalReference(string localReference) - { - if (string.IsNullOrWhiteSpace(localReference)) - { - throw new ArgumentException( - string.Format( - SRResource.ArgumentNullOrWhiteSpace, - nameof(localReference))); - } - - var segments = localReference.Split('/'); - - // /definitions/Pet/... - if (segments.Length >= 3) - { - var referenceType = ParseReferenceType(segments[1]); - var id = localReference.Substring( - segments[0].Length + "/".Length + segments[1].Length + "/".Length); - - return new OpenApiReference {Type = referenceType, Id = id}; - } - - throw new OpenApiException( - string.Format( - SRResource.ReferenceHasInvalidFormat, - localReference)); - } - - private static ReferenceType ParseReferenceType(string referenceTypeName) - { - switch (referenceTypeName) - { - case "definitions": - return ReferenceType.Schema; - - case "parameters": - return ReferenceType.Parameter; - - case "responses": - return ReferenceType.Response; - - case "headers": - return ReferenceType.Header; - - case "tags": - return ReferenceType.Tag; - - case "securityDefinitions": - return ReferenceType.SecurityScheme; - - default: - throw new OpenApiReaderException($"Unknown reference type '{referenceTypeName}'"); - } - } - - private static string GetReferenceTypeV2Name(ReferenceType referenceType) - { - switch (referenceType) - { - case ReferenceType.Schema: - return "definitions"; - - case ReferenceType.Parameter: - return "parameters"; - - case ReferenceType.Response: - return "responses"; - - case ReferenceType.Tag: - return "tags"; - - case ReferenceType.SecurityScheme: - return "securityDefinitions"; - - default: - throw new ArgumentException(); - } - } - - /// - /// Parse the string to a object. - /// - public OpenApiReference ConvertToOpenApiReference(string reference, ReferenceType? type) - { - if (!string.IsNullOrWhiteSpace(reference)) - { - var segments = reference.Split('#'); - if (segments.Length == 1) - { - // Either this is an external reference as an entire file - // or a simple string-style reference for tag and security scheme. - if (type == null) - { - // "$ref": "Pet.json" - return new OpenApiReference - { - ExternalResource = segments[0] - }; - } - - if (type == ReferenceType.Tag || type == ReferenceType.SecurityScheme) - { - return new OpenApiReference - { - Type = type, - Id = reference - }; - } - } - else if (segments.Length == 2) - { - if (reference.StartsWith("#")) - { - // "$ref": "#/definitions/Pet" - return ParseLocalReference(segments[1]); - } - - // $ref: externalSource.yaml#/Pet - return new OpenApiReference - { - ExternalResource = segments[0], - Id = segments[1].Substring(1) - }; - } - } - - throw new OpenApiException(string.Format(SRResource.ReferenceHasInvalidFormat, reference)); - } - - public OpenApiDocument LoadDocument(RootNode rootNode) - { - return OpenApiV2Deserializer.LoadOpenApi(rootNode); - } - - public T LoadElement(ParseNode node) where T : IOpenApiElement - { - return (T)_loaders[typeof(T)](node); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V2/OpenApiXmlDeserializer.cs b/src/Microsoft.OpenApi.Readers/V2/OpenApiXmlDeserializer.cs deleted file mode 100644 index 6e2273839..000000000 --- a/src/Microsoft.OpenApi.Readers/V2/OpenApiXmlDeserializer.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Exceptions; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V2 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV2Deserializer - { - private static readonly FixedFieldMap _xmlFixedFields = new FixedFieldMap - { - { - "name", (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - "namespace", (o, n) => - { - if (Uri.IsWellFormedUriString(n.GetScalarValue(), UriKind.Absolute)) - { - o.Namespace = new Uri(n.GetScalarValue(), UriKind.Absolute); - } - else - { - throw new OpenApiReaderException($"Xml Namespace requires absolute URL. '{n.GetScalarValue()}' is not valid."); - } - } - }, - { - "prefix", (o, n) => - { - o.Prefix = n.GetScalarValue(); - } - }, - { - "attribute", (o, n) => - { - o.Attribute = bool.Parse(n.GetScalarValue()); - } - }, - { - "wrapped", (o, n) => - { - o.Wrapped = bool.Parse(n.GetScalarValue()); - } - }, - }; - - private static readonly PatternFieldMap _xmlPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiXml LoadXml(ParseNode node) - { - var mapNode = node.CheckMapNode("xml"); - - var xml = new OpenApiXml(); - foreach (var property in mapNode) - { - property.ParseField(xml, _xmlFixedFields, _xmlPatternFields); - } - - return xml; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiCallbackDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiCallbackDeserializer.cs deleted file mode 100644 index 60d69b9e5..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiCallbackDeserializer.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Expressions; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _callbackFixedFields = - new FixedFieldMap(); - - private static readonly PatternFieldMap _callbackPatternFields = - new PatternFieldMap - { - {s => !s.StartsWith("x-"), (o, p, n) => o.AddPathItem(RuntimeExpression.Build(p), LoadPathItem(n))}, - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))}, - }; - - public static OpenApiCallback LoadCallback(ParseNode node) - { - var mapNode = node.CheckMapNode("callback"); - - var pointer = mapNode.GetReferencePointer(); - if (pointer != null) - { - return mapNode.GetReferencedObject(ReferenceType.Callback, pointer); - } - - var domainObject = new OpenApiCallback(); - - ParseMap(mapNode, domainObject, _callbackFixedFields, _callbackPatternFields); - - return domainObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiComponentsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiComponentsDeserializer.cs deleted file mode 100644 index febeda730..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiComponentsDeserializer.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static FixedFieldMap _componentsFixedFields = new FixedFieldMap - { - { - "schemas", (o, n) => o.Schemas = n.CreateMapWithReference(ReferenceType.Schema, LoadSchema) - }, - {"responses", (o, n) => o.Responses = n.CreateMapWithReference(ReferenceType.Response, LoadResponse)}, - {"parameters", (o, n) => o.Parameters = n.CreateMapWithReference(ReferenceType.Parameter, LoadParameter)}, - {"examples", (o, n) => o.Examples = n.CreateMapWithReference(ReferenceType.Example, LoadExample)}, - {"requestBodies", (o, n) => o.RequestBodies = n.CreateMapWithReference(ReferenceType.RequestBody, LoadRequestBody)}, - {"headers", (o, n) => o.Headers = n.CreateMapWithReference(ReferenceType.Header, LoadHeader)}, - {"securitySchemes", (o, n) => o.SecuritySchemes = n.CreateMapWithReference(ReferenceType.SecurityScheme, LoadSecurityScheme)}, - {"links", (o, n) => o.Links = n.CreateMapWithReference(ReferenceType.Link, LoadLink)}, - {"callbacks", (o, n) => o.Callbacks = n.CreateMapWithReference(ReferenceType.Callback, LoadCallback)}, - }; - - - private static PatternFieldMap _componentsPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - public static OpenApiComponents LoadComponents(ParseNode node) - { - var mapNode = node.CheckMapNode("components"); - var components = new OpenApiComponents(); - - ParseMap(mapNode, components, _componentsFixedFields, _componentsPatternFields); - - return components; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiContactDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiContactDeserializer.cs deleted file mode 100644 index 154ed23c0..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiContactDeserializer.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static FixedFieldMap _contactFixedFields = new FixedFieldMap - { - { - "name", (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - "email", (o, n) => - { - o.Email = n.GetScalarValue(); - } - }, - { - "url", (o, n) => - { - o.Url = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - }; - - private static PatternFieldMap _contactPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiContact LoadContact(ParseNode node) - { - var mapNode = node as MapNode; - var contact = new OpenApiContact(); - - ParseMap(mapNode, contact, _contactFixedFields, _contactPatternFields); - - return contact; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiDiscriminatorDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiDiscriminatorDeserializer.cs deleted file mode 100644 index 8978e4238..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiDiscriminatorDeserializer.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _discriminatorFixedFields = - new FixedFieldMap - { - { - "propertyName", (o, n) => - { - o.PropertyName = n.GetScalarValue(); - } - }, - { - "mapping", (o, n) => - { - o.Mapping = n.CreateSimpleMap(LoadString); - } - } - }; - - private static readonly PatternFieldMap _discriminatorPatternFields = - new PatternFieldMap(); - - public static OpenApiDiscriminator LoadDiscriminator(ParseNode node) - { - var mapNode = node.CheckMapNode("discriminator"); - - var discriminator = new OpenApiDiscriminator(); - foreach (var property in mapNode) - { - property.ParseField(discriminator, _discriminatorFixedFields, _discriminatorPatternFields); - } - - return discriminator; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiDocumentDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiDocumentDeserializer.cs deleted file mode 100644 index 2221584f1..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiDocumentDeserializer.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.Collections.Generic; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static FixedFieldMap _openApiFixedFields = new FixedFieldMap - { - { - "openapi", (o, n) => - { - } /* Version is valid field but we already parsed it */ - }, - {"info", (o, n) => o.Info = LoadInfo(n)}, - {"servers", (o, n) => o.Servers = n.CreateList(LoadServer)}, - {"paths", (o, n) => o.Paths = LoadPaths(n)}, - {"components", (o, n) => o.Components = LoadComponents(n)}, - {"tags", (o, n) => {o.Tags = n.CreateList(LoadTag); - foreach (var tag in o.Tags) - { - tag.Reference = new OpenApiReference() - { - Id = tag.Name, - Type = ReferenceType.Tag - }; - } - } }, - {"externalDocs", (o, n) => o.ExternalDocs = LoadExternalDocs(n)}, - {"security", (o, n) => o.SecurityRequirements = n.CreateList(LoadSecurityRequirement)} - }; - - private static PatternFieldMap _openApiPatternFields = new PatternFieldMap - { - // We have no semantics to verify X- nodes, therefore treat them as just values. - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p, n))} - }; - - public static OpenApiDocument LoadOpenApi(RootNode rootNode) - { - var openApidoc = new OpenApiDocument(); - - var openApiNode = rootNode.GetMap(); - - ParseMap(openApiNode, openApidoc, _openApiFixedFields, _openApiPatternFields); - - return openApidoc; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs deleted file mode 100644 index 18f1154c3..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiEncodingDeserializer.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _encodingFixedFields = new FixedFieldMap - { - { - "contentType", (o, n) => - { - o.ContentType = n.GetScalarValue(); - } - }, - { - "headers", (o, n) => - { - o.Headers = n.CreateMap(LoadHeader); - } - }, - { - "style", (o, n) => - { - ParameterStyle style; - if (Enum.TryParse(n.GetScalarValue(), out style)) - { - o.Style = style; - } - else - { - o.Style = null; - } - } - }, - { - "explode", (o, n) => - { - o.Explode = bool.Parse(n.GetScalarValue()); - } - }, - { - "allowedReserved", (o, n) => - { - o.AllowReserved = bool.Parse(n.GetScalarValue()); - } - }, - }; - - private static readonly PatternFieldMap _encodingPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiEncoding LoadEncoding(ParseNode node) - { - var mapNode = node.CheckMapNode("encoding"); - - var encoding = new OpenApiEncoding(); - foreach (var property in mapNode) - { - property.ParseField(encoding, _encodingFixedFields, _encodingPatternFields); - } - - return encoding; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiExampleDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiExampleDeserializer.cs deleted file mode 100644 index 36f591a9a..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiExampleDeserializer.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _exampleFixedFields = new FixedFieldMap - { - { - "summary", (o, n) => - { - o.Summary = n.GetScalarValue(); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "value", (o, n) => - { - o.Value = n.CreateAny(); - } - }, - { - "externalValue", (o, n) => - { - o.ExternalValue = n.GetScalarValue(); - } - }, - - }; - - private static readonly PatternFieldMap _examplePatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiExample LoadExample(ParseNode node) - { - var mapNode = node.CheckMapNode("example"); - - var pointer = mapNode.GetReferencePointer(); - if (pointer != null) - { - return mapNode.GetReferencedObject(ReferenceType.Example, pointer); - } - - var example = new OpenApiExample(); - foreach (var property in mapNode) - { - property.ParseField(example, _exampleFixedFields, _examplePatternFields); - } - - return example; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiExternalDocsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiExternalDocsDeserializer.cs deleted file mode 100644 index ec2c16ff1..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiExternalDocsDeserializer.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _externalDocsFixedFields = - new FixedFieldMap - { - // $ref - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "url", (o, n) => - { - o.Url = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - }; - - private static readonly PatternFieldMap _externalDocsPatternFields = - new PatternFieldMap(); - - public static OpenApiExternalDocs LoadExternalDocs(ParseNode node) - { - var mapNode = node.CheckMapNode("externalDocs"); - - var externalDocs = new OpenApiExternalDocs(); - - ParseMap(mapNode, externalDocs, _externalDocsFixedFields, _externalDocsPatternFields); - - return externalDocs; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiHeaderDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiHeaderDeserializer.cs deleted file mode 100644 index 86e86237e..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiHeaderDeserializer.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _headerFixedFields = new FixedFieldMap - { - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "required", (o, n) => - { - o.Required = bool.Parse(n.GetScalarValue()); - } - }, - { - "deprecated", (o, n) => - { - o.Deprecated = bool.Parse(n.GetScalarValue()); - } - }, - { - "allowEmptyValue", (o, n) => - { - o.AllowEmptyValue = bool.Parse(n.GetScalarValue()); - } - }, - { - "allowReserved", (o, n) => - { - o.AllowReserved = bool.Parse(n.GetScalarValue()); - } - }, - { - "style", (o, n) => - { - o.Style = n.GetScalarValue().GetEnumFromDisplayName(); - } - }, - { - "explode", (o, n) => - { - o.Explode = bool.Parse(n.GetScalarValue()); - } - }, - { - "schema", (o, n) => - { - o.Schema = LoadSchema(n); - } - }, - { - "examples", (o, n) => - { - o.Examples = n.CreateMap(LoadExample); - } - }, - { - "example", (o, n) => - { - o.Example = n.CreateAny(); - } - }, - }; - - private static readonly PatternFieldMap _headerPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiHeader LoadHeader(ParseNode node) - { - var mapNode = node.CheckMapNode("header"); - - var pointer = mapNode.GetReferencePointer(); - if (pointer != null) - { - return mapNode.GetReferencedObject(ReferenceType.Header, pointer); - } - - var header = new OpenApiHeader(); - foreach (var property in mapNode) - { - property.ParseField(header, _headerFixedFields, _headerPatternFields); - } - - return header; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiInfoDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiInfoDeserializer.cs deleted file mode 100644 index 17a97c117..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiInfoDeserializer.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - public static FixedFieldMap InfoFixedFields = new FixedFieldMap - { - { - "title", (o, n) => - { - o.Title = n.GetScalarValue(); - } - }, - { - "version", (o, n) => - { - o.Version = n.GetScalarValue(); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "termsOfService", (o, n) => - { - o.TermsOfService = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - { - "contact", (o, n) => - { - o.Contact = LoadContact(n); - } - }, - { - "license", (o, n) => - { - o.License = LoadLicense(n); - } - } - }; - - public static PatternFieldMap InfoPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, k, n) => o.AddExtension(k,LoadExtension(k, n))} - }; - - public static OpenApiInfo LoadInfo(ParseNode node) - { - var mapNode = node.CheckMapNode("Info"); - - var info = new OpenApiInfo(); - var required = new List {"title", "version"}; - - ParseMap(mapNode, info, InfoFixedFields, InfoPatternFields); - - return info; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiLicenseDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiLicenseDeserializer.cs deleted file mode 100644 index 6bd352f53..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiLicenseDeserializer.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static FixedFieldMap _licenseFixedFields = new FixedFieldMap - { - { - "name", (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - "url", (o, n) => - { - o.Url = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - }; - - private static PatternFieldMap _licensePatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - internal static OpenApiLicense LoadLicense(ParseNode node) - { - var mapNode = node.CheckMapNode("License"); - - var license = new OpenApiLicense(); - - ParseMap(mapNode, license, _licenseFixedFields, _licensePatternFields); - - return license; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiLinkDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiLinkDeserializer.cs deleted file mode 100644 index 06ec8de3e..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiLinkDeserializer.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _linkFixedFields = new FixedFieldMap - { - { - "operationRef", (o, n) => - { - o.OperationRef = n.GetScalarValue(); - } - }, - { - "operationId", (o, n) => - { - o.OperationId = n.GetScalarValue(); - } - }, - { - "parameters", (o, n) => - { - o.Parameters = n.CreateSimpleMap(LoadRuntimeExpressionAnyWrapper); - } - }, - { - "requestBody", (o, n) => - { - o.RequestBody = LoadRuntimeExpressionAnyWrapper(n); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - {"server", (o, n) => o.Server = LoadServer(n)} - }; - - private static readonly PatternFieldMap _linkPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))}, - }; - - public static OpenApiLink LoadLink(ParseNode node) - { - var mapNode = node.CheckMapNode("link"); - var link = new OpenApiLink(); - - var pointer = mapNode.GetReferencePointer(); - if (pointer != null) - { - return mapNode.GetReferencedObject(ReferenceType.Link, pointer); - } - - ParseMap(mapNode, link, _linkFixedFields, _linkPatternFields); - - return link; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs deleted file mode 100644 index 52e99a8f9..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiMediaTypeDeserializer.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _mediaTypeFixedFields = - new FixedFieldMap - { - { - OpenApiConstants.Schema, (o, n) => - { - o.Schema = LoadSchema(n); - } - }, - { - OpenApiConstants.Examples, (o, n) => - { - o.Examples = n.CreateMap(LoadExample); - } - }, - { - OpenApiConstants.Example, (o, n) => - { - o.Example = n.CreateAny(); - } - }, - { - OpenApiConstants.Encoding, (o, n) => - { - o.Encoding = n.CreateMap(LoadEncoding); - } - }, - }; - - private static readonly PatternFieldMap _mediaTypePatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - private static readonly AnyFieldMap _mediaTypeAnyFields = new AnyFieldMap - { - { - OpenApiConstants.Example, - new AnyFieldMapParameter( - s => s.Example, - (s, v) => s.Example = v, - s => s.Schema) - } - }; - - - private static readonly AnyMapFieldMap _mediaTypeAnyMapOpenApiExampleFields = - new AnyMapFieldMap - { - { - OpenApiConstants.Examples, - new AnyMapFieldMapParameter( - m => m.Examples, - e => e.Value, - (e, v) => e.Value = v, - m => m.Schema) - } - }; - - public static OpenApiMediaType LoadMediaType(ParseNode node) - { - var mapNode = node.CheckMapNode(OpenApiConstants.Content); - - if (!mapNode.Any()) - { - return null; - } - - var mediaType = new OpenApiMediaType(); - - ParseMap(mapNode, mediaType, _mediaTypeFixedFields, _mediaTypePatternFields); - - ProcessAnyFields(mapNode, mediaType, _mediaTypeAnyFields); - ProcessAnyMapFields(mapNode, mediaType, _mediaTypeAnyMapOpenApiExampleFields); - - return mediaType; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowDeserializer.cs deleted file mode 100644 index adc814f33..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowDeserializer.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _oAuthFlowFixedFileds = - new FixedFieldMap - { - { - "authorizationUrl", (o, n) => - { - o.AuthorizationUrl = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - { - "tokenUrl", (o, n) => - { - o.TokenUrl = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - { - "refreshUrl", (o, n) => - { - o.RefreshUrl = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - {"scopes", (o, n) => o.Scopes = n.CreateSimpleMap(LoadString)} - }; - - private static readonly PatternFieldMap _oAuthFlowPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiOAuthFlow LoadOAuthFlow(ParseNode node) - { - var mapNode = node.CheckMapNode("OAuthFlow"); - - var oauthFlow = new OpenApiOAuthFlow(); - foreach (var property in mapNode) - { - property.ParseField(oauthFlow, _oAuthFlowFixedFileds, _oAuthFlowPatternFields); - } - - return oauthFlow; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowsDeserializer.cs deleted file mode 100644 index 022ed35fd..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiOAuthFlowsDeserializer.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _oAuthFlowsFixedFileds = - new FixedFieldMap - { - {"implicit", (o, n) => o.Implicit = LoadOAuthFlow(n)}, - {"password", (o, n) => o.Password = LoadOAuthFlow(n)}, - {"clientCredentials", (o, n) => o.ClientCredentials = LoadOAuthFlow(n)}, - {"authorizationCode", (o, n) => o.AuthorizationCode = LoadOAuthFlow(n)} - }; - - private static readonly PatternFieldMap _oAuthFlowsPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiOAuthFlows LoadOAuthFlows(ParseNode node) - { - var mapNode = node.CheckMapNode("OAuthFlows"); - - var oAuthFlows = new OpenApiOAuthFlows(); - foreach (var property in mapNode) - { - property.ParseField(oAuthFlows, _oAuthFlowsFixedFileds, _oAuthFlowsPatternFields); - } - - return oAuthFlows; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiOperationDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiOperationDeserializer.cs deleted file mode 100644 index 3ab39c828..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiOperationDeserializer.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _operationFixedFields = - new FixedFieldMap - { - { - "tags", (o, n) => o.Tags = n.CreateSimpleList( - valueNode => - LoadTagByReference( - valueNode.Context, - valueNode.Diagnostic, - valueNode.GetScalarValue())) - }, - { - "summary", (o, n) => - { - o.Summary = n.GetScalarValue(); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "externalDocs", (o, n) => - { - o.ExternalDocs = LoadExternalDocs(n); - } - }, - { - "operationId", (o, n) => - { - o.OperationId = n.GetScalarValue(); - } - }, - { - "parameters", (o, n) => - { - o.Parameters = n.CreateList(LoadParameter); - } - }, - { - "requestBody", (o, n) => - { - o.RequestBody = LoadRequestBody(n); - } - }, - { - "responses", (o, n) => - { - o.Responses = LoadResponses(n); - } - }, - { - "callbacks", (o, n) => - { - o.Callbacks = n.CreateMap(LoadCallback); - } - }, - { - "deprecated", (o, n) => - { - o.Deprecated = bool.Parse(n.GetScalarValue()); - } - }, - { - "security", (o, n) => - { - o.Security = n.CreateList(LoadSecurityRequirement); - } - }, - { - "servers", (o, n) => - { - o.Servers = n.CreateList(LoadServer); - } - }, - }; - - private static readonly PatternFieldMap _operationPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))}, - }; - - internal static OpenApiOperation LoadOperation(ParseNode node) - { - var mapNode = node.CheckMapNode("Operation"); - - var operation = new OpenApiOperation(); - - ParseMap(mapNode, operation, _operationFixedFields, _operationPatternFields); - - return operation; - } - - private static OpenApiTag LoadTagByReference( - ParsingContext context, - OpenApiDiagnostic diagnostic, - string tagName) - { - var tagObject = new OpenApiTag() - { - UnresolvedReference = true, - Reference = new OpenApiReference() - { - Type = ReferenceType.Tag, - Id = tagName - } - }; - - return tagObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiParameterDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiParameterDeserializer.cs deleted file mode 100644 index 61dbbc7fa..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiParameterDeserializer.cs +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Linq; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _parameterFixedFields = - new FixedFieldMap - { - { - "name", (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - "in", (o, n) => - { - var inString = n.GetScalarValue(); - - if ( Enum.GetValues(typeof(ParameterLocation)).Cast() - .Select( e => e.GetDisplayName() ) - .Contains(inString) ) - { - o.In = n.GetScalarValue().GetEnumFromDisplayName(); - } - else - { - o.In = null; - } - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "required", (o, n) => - { - o.Required = bool.Parse(n.GetScalarValue()); - } - }, - { - "deprecated", (o, n) => - { - o.Deprecated = bool.Parse(n.GetScalarValue()); - } - }, - { - "allowEmptyValue", (o, n) => - { - o.AllowEmptyValue = bool.Parse(n.GetScalarValue()); - } - }, - { - "allowReserved", (o, n) => - { - o.AllowReserved = bool.Parse(n.GetScalarValue()); - } - }, - { - "style", (o, n) => - { - o.Style = n.GetScalarValue().GetEnumFromDisplayName(); - } - }, - { - "explode", (o, n) => - { - o.Explode = bool.Parse(n.GetScalarValue()); - } - }, - { - "schema", (o, n) => - { - o.Schema = LoadSchema(n); - } - }, - { - "content", (o, n) => - { - o.Content = n.CreateMap(LoadMediaType); - } - }, - { - "examples", (o, n) => - { - o.Examples = n.CreateMap(LoadExample); - } - }, - { - "example", (o, n) => - { - o.Example = n.CreateAny(); - } - }, - }; - - private static readonly PatternFieldMap _parameterPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - private static readonly AnyFieldMap _parameterAnyFields = new AnyFieldMap - { - { - OpenApiConstants.Example, - new AnyFieldMapParameter( - s => s.Example, - (s, v) => s.Example = v, - s => s.Schema) - } - }; - - private static readonly AnyMapFieldMap _parameterAnyMapOpenApiExampleFields = - new AnyMapFieldMap - { - { - OpenApiConstants.Examples, - new AnyMapFieldMapParameter( - m => m.Examples, - e => e.Value, - (e, v) => e.Value = v, - m => m.Schema) - } - }; - - public static OpenApiParameter LoadParameter(ParseNode node) - { - var mapNode = node.CheckMapNode("parameter"); - - var pointer = mapNode.GetReferencePointer(); - if (pointer != null) - { - return mapNode.GetReferencedObject(ReferenceType.Parameter, pointer); - } - - var parameter = new OpenApiParameter(); - - ParseMap(mapNode, parameter, _parameterFixedFields, _parameterPatternFields); - ProcessAnyFields(mapNode, parameter, _parameterAnyFields); - ProcessAnyMapFields(mapNode, parameter, _parameterAnyMapOpenApiExampleFields); - - return parameter; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiPathItemDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiPathItemDeserializer.cs deleted file mode 100644 index ff08ce186..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiPathItemDeserializer.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _pathItemFixedFields = new FixedFieldMap - { - // $ref - { - "summary", (o, n) => - { - o.Summary = n.GetScalarValue(); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - {"get", (o, n) => o.AddOperation(OperationType.Get, LoadOperation(n))}, - {"put", (o, n) => o.AddOperation(OperationType.Put, LoadOperation(n))}, - {"post", (o, n) => o.AddOperation(OperationType.Post, LoadOperation(n))}, - {"delete", (o, n) => o.AddOperation(OperationType.Delete, LoadOperation(n))}, - {"options", (o, n) => o.AddOperation(OperationType.Options, LoadOperation(n))}, - {"head", (o, n) => o.AddOperation(OperationType.Head, LoadOperation(n))}, - {"patch", (o, n) => o.AddOperation(OperationType.Patch, LoadOperation(n))}, - {"trace", (o, n) => o.AddOperation(OperationType.Trace, LoadOperation(n))}, - {"servers", (o, n) => o.Servers = n.CreateList(LoadServer)}, - {"parameters", (o, n) => o.Parameters = n.CreateList(LoadParameter)} - }; - - private static readonly PatternFieldMap _pathItemPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiPathItem LoadPathItem(ParseNode node) - { - var mapNode = node.CheckMapNode("PathItem"); - - var pathItem = new OpenApiPathItem(); - - ParseMap(mapNode, pathItem, _pathItemFixedFields, _pathItemPatternFields); - - return pathItem; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiPathsDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiPathsDeserializer.cs deleted file mode 100644 index 2020628d0..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiPathsDeserializer.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static FixedFieldMap _pathsFixedFields = new FixedFieldMap(); - - private static PatternFieldMap _pathsPatternFields = new PatternFieldMap - { - {s => s.StartsWith("/"), (o, k, n) => o.Add(k, LoadPathItem(n))}, - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiPaths LoadPaths(ParseNode node) - { - var mapNode = node.CheckMapNode("Paths"); - - var domainObject = new OpenApiPaths(); - - ParseMap(mapNode, domainObject, _pathsFixedFields, _pathsPatternFields); - - return domainObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiRequestBodyDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiRequestBodyDeserializer.cs deleted file mode 100644 index efd54b101..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiRequestBodyDeserializer.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _requestBodyFixedFields = - new FixedFieldMap - { - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "content", (o, n) => - { - o.Content = n.CreateMap(LoadMediaType); - } - }, - { - "required", (o, n) => - { - o.Required = bool.Parse(n.GetScalarValue()); - } - }, - }; - - private static readonly PatternFieldMap _requestBodyPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiRequestBody LoadRequestBody(ParseNode node) - { - var mapNode = node.CheckMapNode("requestBody"); - - var pointer = mapNode.GetReferencePointer(); - if (pointer != null) - { - return mapNode.GetReferencedObject(ReferenceType.RequestBody, pointer); - } - - var requestBody = new OpenApiRequestBody(); - foreach (var property in mapNode) - { - property.ParseField(requestBody, _requestBodyFixedFields, _requestBodyPatternFields); - } - - return requestBody; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiResponseDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiResponseDeserializer.cs deleted file mode 100644 index 30ea4a52e..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiResponseDeserializer.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.Collections.Generic; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _responseFixedFields = new FixedFieldMap - { - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "headers", (o, n) => - { - o.Headers = n.CreateMap(LoadHeader); - } - }, - { - "content", (o, n) => - { - o.Content = n.CreateMap(LoadMediaType); - } - }, - { - "links", (o, n) => - { - o.Links = n.CreateMap(LoadLink); - } - } - }; - - private static readonly PatternFieldMap _responsePatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiResponse LoadResponse(ParseNode node) - { - var mapNode = node.CheckMapNode("response"); - - var pointer = mapNode.GetReferencePointer(); - if (pointer != null) - { - return mapNode.GetReferencedObject(ReferenceType.Response, pointer); - } - - var requiredFields = new List {"description"}; - var response = new OpenApiResponse(); - ParseMap(mapNode, response, _responseFixedFields, _responsePatternFields); - - return response; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiResponsesDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiResponsesDeserializer.cs deleted file mode 100644 index 580d3ff67..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiResponsesDeserializer.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - public static FixedFieldMap ResponsesFixedFields = new FixedFieldMap(); - - public static PatternFieldMap ResponsesPatternFields = new PatternFieldMap - { - {s => !s.StartsWith("x-"), (o, p, n) => o.Add(p, LoadResponse(n))}, - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiResponses LoadResponses(ParseNode node) - { - var mapNode = node.CheckMapNode("Responses"); - - var domainObject = new OpenApiResponses(); - - ParseMap(mapNode, domainObject, ResponsesFixedFields, ResponsesPatternFields); - - return domainObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiSchemaDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiSchemaDeserializer.cs deleted file mode 100644 index db1380bd8..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiSchemaDeserializer.cs +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; -using System.Collections.Generic; -using System.Globalization; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _schemaFixedFields = new FixedFieldMap - { - { - "title", (o, n) => - { - o.Title = n.GetScalarValue(); - } - }, - { - "multipleOf", (o, n) => - { - o.MultipleOf = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "maximum", (o, n) => - { - o.Maximum = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "exclusiveMaximum", (o, n) => - { - o.ExclusiveMaximum = bool.Parse(n.GetScalarValue()); - } - }, - { - "minimum", (o, n) => - { - o.Minimum = decimal.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "exclusiveMinimum", (o, n) => - { - o.ExclusiveMinimum = bool.Parse(n.GetScalarValue()); - } - }, - { - "maxLength", (o, n) => - { - o.MaxLength = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "minLength", (o, n) => - { - o.MinLength = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "pattern", (o, n) => - { - o.Pattern = n.GetScalarValue(); - } - }, - { - "maxItems", (o, n) => - { - o.MaxItems = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "minItems", (o, n) => - { - o.MinItems = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "uniqueItems", (o, n) => - { - o.UniqueItems = bool.Parse(n.GetScalarValue()); - } - }, - { - "maxProperties", (o, n) => - { - o.MaxProperties = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "minProperties", (o, n) => - { - o.MinProperties = int.Parse(n.GetScalarValue(), CultureInfo.InvariantCulture); - } - }, - { - "required", (o, n) => - { - o.Required = new HashSet(n.CreateSimpleList(n2 => n2.GetScalarValue())); - } - }, - { - "enum", (o, n) => - { - o.Enum = n.CreateListOfAny(); - } - }, - { - "type", (o, n) => - { - o.Type = n.GetScalarValue(); - } - }, - { - "allOf", (o, n) => - { - o.AllOf = n.CreateList(LoadSchema); - } - }, - { - "oneOf", (o, n) => - { - o.OneOf = n.CreateList(LoadSchema); - } - }, - { - "anyOf", (o, n) => - { - o.AnyOf = n.CreateList(LoadSchema); - } - }, - { - "not", (o, n) => - { - o.Not = LoadSchema(n); - } - }, - { - "items", (o, n) => - { - o.Items = LoadSchema(n); - } - }, - { - "properties", (o, n) => - { - o.Properties = n.CreateMap(LoadSchema); - } - }, - { - "additionalProperties", (o, n) => - { - if (n is ValueNode) - { - o.AdditionalPropertiesAllowed = bool.Parse(n.GetScalarValue()); - } - else - { - o.AdditionalProperties = LoadSchema(n); - } - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "format", (o, n) => - { - o.Format = n.GetScalarValue(); - } - }, - { - "default", (o, n) => - { - o.Default = n.CreateAny(); - } - }, - - { - "nullable", (o, n) => - { - o.Nullable = bool.Parse(n.GetScalarValue()); - } - }, - { - "discriminator", (o, n) => - { - o.Discriminator = LoadDiscriminator(n); - } - }, - { - "readOnly", (o, n) => - { - o.ReadOnly = bool.Parse(n.GetScalarValue()); - } - }, - { - "writeOnly", (o, n) => - { - o.WriteOnly = bool.Parse(n.GetScalarValue()); - } - }, - { - "xml", (o, n) => - { - o.Xml = LoadXml(n); - } - }, - { - "externalDocs", (o, n) => - { - o.ExternalDocs = LoadExternalDocs(n); - } - }, - { - "example", (o, n) => - { - o.Example = n.CreateAny(); - } - }, - { - "deprecated", (o, n) => - { - o.Deprecated = bool.Parse(n.GetScalarValue()); - } - }, - }; - - private static readonly PatternFieldMap _schemaPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - private static readonly AnyFieldMap _schemaAnyFields = new AnyFieldMap - { - { - OpenApiConstants.Default, - new AnyFieldMapParameter( - s => s.Default, - (s, v) => s.Default = v, - s => s) - }, - { - OpenApiConstants.Example, - new AnyFieldMapParameter( - s => s.Example, - (s, v) => s.Example = v, - s => s) - } - }; - - private static readonly AnyListFieldMap _schemaAnyListFields = new AnyListFieldMap - { - { - OpenApiConstants.Enum, - new AnyListFieldMapParameter( - s => s.Enum, - (s, v) => s.Enum = v, - s => s) - } - }; - - public static OpenApiSchema LoadSchema(ParseNode node) - { - var mapNode = node.CheckMapNode(OpenApiConstants.Schema); - - var pointer = mapNode.GetReferencePointer(); - - if (pointer != null) - { - return new OpenApiSchema() - { - UnresolvedReference = true, - Reference = node.Context.VersionService.ConvertToOpenApiReference(pointer,ReferenceType.Schema) - }; - } - - var schema = new OpenApiSchema(); - - foreach (var propertyNode in mapNode) - { - propertyNode.ParseField(schema, _schemaFixedFields, _schemaPatternFields); - } - - ProcessAnyFields(mapNode, schema, _schemaAnyFields); - ProcessAnyListFields(mapNode, schema, _schemaAnyListFields); - - return schema; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiSecurityRequirementDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiSecurityRequirementDeserializer.cs deleted file mode 100644 index b8c3c38bb..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiSecurityRequirementDeserializer.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - public static OpenApiSecurityRequirement LoadSecurityRequirement(ParseNode node) - { - var mapNode = node.CheckMapNode("security"); - - var securityRequirement = new OpenApiSecurityRequirement(); - - foreach (var property in mapNode) - { - var scheme = LoadSecuritySchemeByReference( - mapNode.Context, - mapNode.Diagnostic, - property.Name); - - var scopes = property.Value.CreateSimpleList(value => value.GetScalarValue()); - - if (scheme != null) - { - securityRequirement.Add(scheme, scopes); - } - else - { - node.Diagnostic.Errors.Add( - new OpenApiError(node.Context.GetLocation(), $"Scheme {property.Name} is not found")); - } - } - - return securityRequirement; - } - - private static OpenApiSecurityScheme LoadSecuritySchemeByReference( - ParsingContext context, - OpenApiDiagnostic diagnostic, - string schemeName) - { - var securitySchemeObject = new OpenApiSecurityScheme() - { - UnresolvedReference = true, - Reference = new OpenApiReference() - { - Id = schemeName, - Type = ReferenceType.SecurityScheme - } - }; - - return securitySchemeObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiSecuritySchemeDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiSecuritySchemeDeserializer.cs deleted file mode 100644 index 8657faceb..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiSecuritySchemeDeserializer.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _securitySchemeFixedFields = - new FixedFieldMap - { - { - "type", (o, n) => - { - o.Type = n.GetScalarValue().GetEnumFromDisplayName(); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "name", (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - "in", (o, n) => - { - o.In = n.GetScalarValue().GetEnumFromDisplayName(); - } - }, - { - "scheme", (o, n) => - { - o.Scheme = n.GetScalarValue(); - } - }, - { - "bearerFormat", (o, n) => - { - o.BearerFormat = n.GetScalarValue(); - } - }, - { - "openIdConnectUrl", (o, n) => - { - o.OpenIdConnectUrl = new Uri(n.GetScalarValue(), UriKind.RelativeOrAbsolute); - } - }, - { - "flows", (o, n) => - { - o.Flows = LoadOAuthFlows(n); - } - } - }; - - private static readonly PatternFieldMap _securitySchemePatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiSecurityScheme LoadSecurityScheme(ParseNode node) - { - var mapNode = node.CheckMapNode("securityScheme"); - - var securityScheme = new OpenApiSecurityScheme(); - foreach (var property in mapNode) - { - property.ParseField(securityScheme, _securitySchemeFixedFields, _securitySchemePatternFields); - } - - return securityScheme; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiServerDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiServerDeserializer.cs deleted file mode 100644 index 39842c974..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiServerDeserializer.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _serverFixedFields = new FixedFieldMap - { - { - "url", (o, n) => - { - o.Url = n.GetScalarValue(); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - "variables", (o, n) => - { - o.Variables = n.CreateMap(LoadServerVariable); - } - } - }; - - private static readonly PatternFieldMap _serverPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiServer LoadServer(ParseNode node) - { - var mapNode = node.CheckMapNode("server"); - - var server = new OpenApiServer(); - - ParseMap(mapNode, server, _serverFixedFields, _serverPatternFields); - - return server; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiServerVariableDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiServerVariableDeserializer.cs deleted file mode 100644 index 9fc955a78..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiServerVariableDeserializer.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _serverVariableFixedFields = - new FixedFieldMap - { - { - "enum", (o, n) => - { - o.Enum = n.CreateSimpleList(s => s.GetScalarValue()); - } - }, - { - "default", (o, n) => - { - o.Default = n.GetScalarValue(); - } - }, - { - "description", (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - }; - - private static readonly PatternFieldMap _serverVariablePatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiServerVariable LoadServerVariable(ParseNode node) - { - var mapNode = node.CheckMapNode("serverVariable"); - - var serverVariable = new OpenApiServerVariable(); - - ParseMap(mapNode, serverVariable, _serverVariableFixedFields, _serverVariablePatternFields); - - return serverVariable; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiTagDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiTagDeserializer.cs deleted file mode 100644 index 1f3a36afb..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiTagDeserializer.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _tagFixedFields = new FixedFieldMap - { - { - OpenApiConstants.Name, (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - OpenApiConstants.Description, (o, n) => - { - o.Description = n.GetScalarValue(); - } - }, - { - OpenApiConstants.ExternalDocs, (o, n) => - { - o.ExternalDocs = LoadExternalDocs(n); - } - } - }; - - private static readonly PatternFieldMap _tagPatternFields = new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiTag LoadTag(ParseNode n) - { - var mapNode = n.CheckMapNode("tag"); - - var domainObject = new OpenApiTag(); - - foreach (var propertyNode in mapNode) - { - propertyNode.ParseField(domainObject, _tagFixedFields, _tagPatternFields); - } - - return domainObject; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiV3Deserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiV3Deserializer.cs deleted file mode 100644 index 5d81b66f2..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiV3Deserializer.cs +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.Collections.Generic; -using System.Linq; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Expressions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static void ParseMap( - MapNode mapNode, - T domainObject, - FixedFieldMap fixedFieldMap, - PatternFieldMap patternFieldMap) - { - if (mapNode == null) - { - return; - } - - foreach (var propertyNode in mapNode) - { - propertyNode.ParseField(domainObject, fixedFieldMap, patternFieldMap); - } - - } - - private static void ProcessAnyFields( - MapNode mapNode, - T domainObject, - AnyFieldMap anyFieldMap) - { - foreach (var anyFieldName in anyFieldMap.Keys.ToList()) - { - try - { - mapNode.Context.StartObject(anyFieldName); - - var convertedOpenApiAny = OpenApiAnyConverter.GetSpecificOpenApiAny( - anyFieldMap[anyFieldName].PropertyGetter(domainObject), - anyFieldMap[anyFieldName].SchemaGetter(domainObject)); - - anyFieldMap[anyFieldName].PropertySetter(domainObject, convertedOpenApiAny); - } - catch (OpenApiException exception) - { - exception.Pointer = mapNode.Context.GetLocation(); - mapNode.Diagnostic.Errors.Add(new OpenApiError(exception)); - } - finally - { - mapNode.Context.EndObject(); - } - } - } - - private static void ProcessAnyListFields( - MapNode mapNode, - T domainObject, - AnyListFieldMap anyListFieldMap) - { - foreach (var anyListFieldName in anyListFieldMap.Keys.ToList()) - { - try - { - var newProperty = new List(); - - mapNode.Context.StartObject(anyListFieldName); - - foreach (var propertyElement in anyListFieldMap[anyListFieldName].PropertyGetter(domainObject)) - { - newProperty.Add( - OpenApiAnyConverter.GetSpecificOpenApiAny( - propertyElement, - anyListFieldMap[anyListFieldName].SchemaGetter(domainObject))); - } - - anyListFieldMap[anyListFieldName].PropertySetter(domainObject, newProperty); - } - catch (OpenApiException exception) - { - exception.Pointer = mapNode.Context.GetLocation(); - mapNode.Diagnostic.Errors.Add(new OpenApiError(exception)); - } - finally - { - mapNode.Context.EndObject(); - } - } - } - - private static void ProcessAnyMapFields( - MapNode mapNode, - T domainObject, - AnyMapFieldMap anyMapFieldMap) - { - foreach (var anyMapFieldName in anyMapFieldMap.Keys.ToList()) - { - try - { - var newProperty = new List(); - - mapNode.Context.StartObject(anyMapFieldName); - - foreach (var propertyMapElement in anyMapFieldMap[anyMapFieldName].PropertyMapGetter(domainObject)) - { - mapNode.Context.StartObject(propertyMapElement.Key); - - if (propertyMapElement.Value != null) - { - var any = anyMapFieldMap[anyMapFieldName].PropertyGetter(propertyMapElement.Value); - - var newAny = OpenApiAnyConverter.GetSpecificOpenApiAny( - any, - anyMapFieldMap[anyMapFieldName].SchemaGetter(domainObject)); - - anyMapFieldMap[anyMapFieldName].PropertySetter(propertyMapElement.Value, newAny); - } - } - } - catch (OpenApiException exception) - { - exception.Pointer = mapNode.Context.GetLocation(); - mapNode.Diagnostic.Errors.Add(new OpenApiError(exception)); - } - finally - { - mapNode.Context.EndObject(); - } - } - } - - private static RuntimeExpression LoadRuntimeExpression(ParseNode node) - { - var value = node.GetScalarValue(); - return RuntimeExpression.Build(value); - } - - private static RuntimeExpressionAnyWrapper LoadRuntimeExpressionAnyWrapper(ParseNode node) - { - var value = node.GetScalarValue(); - - if (value != null && value.StartsWith("$")) - { - return new RuntimeExpressionAnyWrapper - { - Expression = RuntimeExpression.Build(value) - }; - } - - return new RuntimeExpressionAnyWrapper - { - Any = OpenApiAnyConverter.GetSpecificOpenApiAny(node.CreateAny()) - }; - } - - public static IOpenApiAny LoadAny(ParseNode node) - { - return OpenApiAnyConverter.GetSpecificOpenApiAny(node.CreateAny()); - } - - private static IOpenApiExtension LoadExtension(string name, ParseNode node) - { - if (node.Context.ExtensionParsers.TryGetValue(name, out var parser)) - { - return parser( - OpenApiAnyConverter.GetSpecificOpenApiAny(node.CreateAny()), - OpenApiSpecVersion.OpenApi3_0); - } - else - { - return OpenApiAnyConverter.GetSpecificOpenApiAny(node.CreateAny()); - } - } - - private static string LoadString(ParseNode node) - { - return node.GetScalarValue(); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs deleted file mode 100644 index 891822a21..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.Collections.Generic; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Exceptions; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.Interface; -using Microsoft.OpenApi.Readers.ParseNodes; -using Microsoft.OpenApi.Readers.Properties; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// The version service for the Open API V3.0. - /// - internal class OpenApiV3VersionService : IOpenApiVersionService - { - private IDictionary> _loaders = new Dictionary> { - [typeof(IOpenApiAny)] = OpenApiV3Deserializer.LoadAny, - [typeof(OpenApiCallback)] = OpenApiV3Deserializer.LoadCallback, - [typeof(OpenApiComponents)] = OpenApiV3Deserializer.LoadComponents, - [typeof(OpenApiEncoding)] = OpenApiV3Deserializer.LoadEncoding, - [typeof(OpenApiExample)] = OpenApiV3Deserializer.LoadExample, - [typeof(OpenApiExternalDocs)] = OpenApiV3Deserializer.LoadExternalDocs, - [typeof(OpenApiHeader)] = OpenApiV3Deserializer.LoadHeader, - [typeof(OpenApiInfo)] = OpenApiV3Deserializer.LoadInfo, - [typeof(OpenApiLicense)] = OpenApiV3Deserializer.LoadLicense, - [typeof(OpenApiLink)] = OpenApiV3Deserializer.LoadLink, - [typeof(OpenApiMediaType)] = OpenApiV3Deserializer.LoadMediaType, - [typeof(OpenApiOAuthFlow)] = OpenApiV3Deserializer.LoadOAuthFlow, - [typeof(OpenApiOAuthFlows)] = OpenApiV3Deserializer.LoadOAuthFlows, - [typeof(OpenApiOperation)] = OpenApiV3Deserializer.LoadOperation, - [typeof(OpenApiParameter)] = OpenApiV3Deserializer.LoadParameter, - [typeof(OpenApiPathItem)] = OpenApiV3Deserializer.LoadPathItem, - [typeof(OpenApiPaths)] = OpenApiV3Deserializer.LoadPaths, - [typeof(OpenApiRequestBody)] = OpenApiV3Deserializer.LoadRequestBody, - [typeof(OpenApiResponse)] = OpenApiV3Deserializer.LoadResponse, - [typeof(OpenApiResponses)] = OpenApiV3Deserializer.LoadResponses, - [typeof(OpenApiSchema)] = OpenApiV3Deserializer.LoadSchema, - [typeof(OpenApiSecurityRequirement)] = OpenApiV3Deserializer.LoadSecurityRequirement, - [typeof(OpenApiSecurityScheme)] = OpenApiV3Deserializer.LoadSecurityScheme, - [typeof(OpenApiServer)] = OpenApiV3Deserializer.LoadServer, - [typeof(OpenApiServerVariable)] = OpenApiV3Deserializer.LoadServerVariable, - [typeof(OpenApiTag)] = OpenApiV3Deserializer.LoadTag, - [typeof(OpenApiXml)] = OpenApiV3Deserializer.LoadXml - }; - - /// - /// Parse the string to a object. - /// - public OpenApiReference ConvertToOpenApiReference( - string reference, - ReferenceType? type) - { - if (!string.IsNullOrWhiteSpace(reference)) - { - var segments = reference.Split('#'); - if (segments.Length == 1) - { - // Either this is an external reference as an entire file - // or a simple string-style reference for tag and security scheme. - if (type == null) - { - // "$ref": "Pet.json" - return new OpenApiReference - { - ExternalResource = segments[0] - }; - } - - if (type == ReferenceType.Tag || type == ReferenceType.SecurityScheme) - { - return new OpenApiReference - { - Type = type, - Id = reference - }; - } - } - else if (segments.Length == 2) - { - if (reference.StartsWith("#")) - { - // "$ref": "#/components/schemas/Pet" - return ParseLocalReference(segments[1]); - } - - // $ref: externalSource.yaml#/Pet - return new OpenApiReference - { - ExternalResource = segments[0], - Id = segments[1].Substring(1) - }; - } - } - - throw new OpenApiException(string.Format(SRResource.ReferenceHasInvalidFormat, reference)); - } - - public OpenApiDocument LoadDocument(RootNode rootNode) - { - return OpenApiV3Deserializer.LoadOpenApi(rootNode); - } - - public T LoadElement(ParseNode node) where T : IOpenApiElement - { - return (T)_loaders[typeof(T)](node); - } - - private OpenApiReference ParseLocalReference(string localReference) - { - if (string.IsNullOrWhiteSpace(localReference)) - { - throw new ArgumentException(string.Format(SRResource.ArgumentNullOrWhiteSpace, nameof(localReference))); - } - - var segments = localReference.Split('/'); - - if (segments.Length == 4) // /components/{type}/pet - { - if (segments[1] == "components") - { - var referenceType = segments[2].GetEnumFromDisplayName(); - return new OpenApiReference {Type = referenceType, Id = segments[3]}; - } - } - - throw new OpenApiException(string.Format(SRResource.ReferenceHasInvalidFormat, localReference)); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/V3/OpenApiXmlDeserializer.cs b/src/Microsoft.OpenApi.Readers/V3/OpenApiXmlDeserializer.cs deleted file mode 100644 index 0b6196c65..000000000 --- a/src/Microsoft.OpenApi.Readers/V3/OpenApiXmlDeserializer.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers.ParseNodes; - -namespace Microsoft.OpenApi.Readers.V3 -{ - /// - /// Class containing logic to deserialize Open API V3 document into - /// runtime Open API object model. - /// - internal static partial class OpenApiV3Deserializer - { - private static readonly FixedFieldMap _xmlFixedFields = new FixedFieldMap - { - { - "name", (o, n) => - { - o.Name = n.GetScalarValue(); - } - }, - { - "namespace", (o, n) => - { - o.Namespace = new Uri(n.GetScalarValue(), UriKind.Absolute); - } - }, - { - "prefix", (o, n) => - { - o.Prefix = n.GetScalarValue(); - } - }, - { - "attribute", (o, n) => - { - o.Attribute = bool.Parse(n.GetScalarValue()); - } - }, - { - "wrapped", (o, n) => - { - o.Wrapped = bool.Parse(n.GetScalarValue()); - } - }, - }; - - private static readonly PatternFieldMap _xmlPatternFields = - new PatternFieldMap - { - {s => s.StartsWith("x-"), (o, p, n) => o.AddExtension(p, LoadExtension(p,n))} - }; - - public static OpenApiXml LoadXml(ParseNode node) - { - var mapNode = node.CheckMapNode("xml"); - - var xml = new OpenApiXml(); - foreach (var property in mapNode) - { - property.ParseField(xml, _xmlFixedFields, _xmlPatternFields); - } - - return xml; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Readers/YamlHelper.cs b/src/Microsoft.OpenApi.Readers/YamlHelper.cs deleted file mode 100644 index a283ea0d3..000000000 --- a/src/Microsoft.OpenApi.Readers/YamlHelper.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.IO; -using System.Linq; -using Microsoft.OpenApi.Exceptions; -using SharpYaml.Serialization; - -namespace Microsoft.OpenApi.Readers -{ - internal static class YamlHelper - { - public static string GetScalarValue(this YamlNode node) - { - var scalarNode = node as YamlScalarNode; - if (scalarNode == null) - { - throw new OpenApiException($"Expected scalar at line {node.Start.Line}"); - } - - return scalarNode.Value; - } - - public static YamlNode ParseYamlString(string yamlString) - { - var reader = new StringReader(yamlString); - var yamlStream = new YamlStream(); - yamlStream.Load(reader); - - var yamlDocument = yamlStream.Documents.First(); - return yamlDocument.RootNode; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Workbench/App.config b/src/Microsoft.OpenApi.Workbench/App.config deleted file mode 100644 index bae5d6d81..000000000 --- a/src/Microsoft.OpenApi.Workbench/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/Microsoft.OpenApi.Workbench/App.xaml b/src/Microsoft.OpenApi.Workbench/App.xaml deleted file mode 100644 index 40e1d5bad..000000000 --- a/src/Microsoft.OpenApi.Workbench/App.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/src/Microsoft.OpenApi.Workbench/App.xaml.cs b/src/Microsoft.OpenApi.Workbench/App.xaml.cs deleted file mode 100644 index 6b849bd1f..000000000 --- a/src/Microsoft.OpenApi.Workbench/App.xaml.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.Windows; - -namespace Microsoft.OpenApi.Workbench -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Workbench/MainModel.cs b/src/Microsoft.OpenApi.Workbench/MainModel.cs deleted file mode 100644 index 087340f14..000000000 --- a/src/Microsoft.OpenApi.Workbench/MainModel.cs +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.Text; -using Microsoft.OpenApi.Extensions; -using Microsoft.OpenApi.Models; -using Microsoft.OpenApi.Readers; -using Microsoft.OpenApi.Services; -using Microsoft.OpenApi.Validations; - -namespace Microsoft.OpenApi.Workbench -{ - /// - /// Main model of the Workbench tool. - /// - public class MainModel : INotifyPropertyChanged - { - private string _input; - - private string _inputFile; - - private string _output; - - private string _errors; - - private string _parseTime; - - private string _renderTime; - - /// - /// Default format. - /// - private OpenApiFormat _format = OpenApiFormat.Yaml; - - /// - /// Default version. - /// - private OpenApiSpecVersion _version = OpenApiSpecVersion.OpenApi3_0; - - public string Input - { - get => _input; - set - { - _input = value; - OnPropertyChanged(nameof(Input)); - } - } - - public string InputFile - { - get => _inputFile; - set - { - _inputFile = value; - OnPropertyChanged(nameof(InputFile)); - } - } - - public string Output - { - get => _output; - set - { - _output = value; - OnPropertyChanged(nameof(Output)); - } - } - - public string Errors - { - get => _errors; - set - { - _errors = value; - OnPropertyChanged(nameof(Errors)); - } - } - - public string ParseTime - { - get => _parseTime; - set - { - _parseTime = value; - OnPropertyChanged(nameof(ParseTime)); - } - } - - public string RenderTime - { - get => _renderTime; - set - { - _renderTime = value; - OnPropertyChanged(nameof(RenderTime)); - } - } - - public OpenApiFormat Format - { - get => _format; - set - { - _format = value; - OnPropertyChanged(nameof(IsYaml)); - OnPropertyChanged(nameof(IsJson)); - } - } - - public OpenApiSpecVersion Version - { - get => _version; - set - { - _version = value; - OnPropertyChanged(nameof(IsV2_0)); - OnPropertyChanged(nameof(IsV3_0)); - } - } - - public bool IsYaml - { - get => Format == OpenApiFormat.Yaml; - set => Format = OpenApiFormat.Yaml; - } - - public bool IsJson - { - get => Format == OpenApiFormat.Json; - set => Format = OpenApiFormat.Json; - } - - public bool IsV2_0 - { - get => Version == OpenApiSpecVersion.OpenApi2_0; - set => Version = OpenApiSpecVersion.OpenApi2_0; - } - - public bool IsV3_0 - { - get => Version == OpenApiSpecVersion.OpenApi3_0; - set => Version = OpenApiSpecVersion.OpenApi3_0; - } - - /// - /// Handling method when the property with given name has changed. - /// - protected void OnPropertyChanged(string propertyName) - { - var handler = PropertyChanged; - if (handler != null) - { - handler(this, new PropertyChangedEventArgs(propertyName)); - } - } - - /// - /// The core method of the class. - /// Runs the parsing and serializing. - /// - internal void ParseDocument() - { - try - { - Stream stream; - if (!String.IsNullOrWhiteSpace(_inputFile)) - { - stream = new FileStream(_inputFile, FileMode.Open); - } - else - { - stream = CreateStream(_input); - } - - - var stopwatch = new Stopwatch(); - stopwatch.Start(); - - var document = new OpenApiStreamReader(new OpenApiReaderSettings - { - ReferenceResolution = ReferenceResolutionSetting.ResolveLocalReferences, - RuleSet = ValidationRuleSet.GetDefaultRuleSet() - } - ).Read(stream, out var context); - stopwatch.Stop(); - ParseTime = $"{stopwatch.ElapsedMilliseconds} ms"; - - if (context.Errors.Count == 0) - { - Errors = "OK"; - } - else - { - var errorReport = new StringBuilder(); - - foreach (var error in context.Errors) - { - errorReport.AppendLine(error.ToString()); - } - - Errors = errorReport.ToString(); - } - - stopwatch.Reset(); - stopwatch.Start(); - Output = WriteContents(document); - stopwatch.Stop(); - - RenderTime = $"{stopwatch.ElapsedMilliseconds} ms"; - - var statsVisitor = new StatsVisitor(); - var walker = new OpenApiWalker(statsVisitor); - walker.Walk(document); - - Errors += Environment.NewLine + "Statistics:" + Environment.NewLine + statsVisitor.GetStatisticsReport(); - } - catch (Exception ex) - { - Output = string.Empty; - Errors = "Failed to parse input: " + ex.Message; - } - } - - /// - /// Write content from the given document based on the format and version set in this class. - /// - private string WriteContents(OpenApiDocument document) - { - var outputStream = new MemoryStream(); - document.Serialize( - outputStream, - Version, - Format); - - outputStream.Position = 0; - - return new StreamReader(outputStream).ReadToEnd(); - } - - private MemoryStream CreateStream(string text) - { - var stream = new MemoryStream(); - var writer = new StreamWriter(stream); - - writer.Write(text); - writer.Flush(); - stream.Position = 0; - - return stream; - } - - /// - /// Property changed event handler. - /// - public event PropertyChangedEventHandler PropertyChanged; - } -} \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Workbench/MainWindow.xaml b/src/Microsoft.OpenApi.Workbench/MainWindow.xaml deleted file mode 100644 index 21aba30e4..000000000 --- a/src/Microsoft.OpenApi.Workbench/MainWindow.xaml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - -