Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release of preview 3 #2015

Merged
merged 174 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
bd9622e
fix: multiple performance fixes for type serialization
baywet Nov 12, 2024
ba81e37
chore(deps): bump Microsoft.Extensions.Logging.Abstractions
dependabot[bot] Nov 12, 2024
0ab2350
chore(deps): bump System.Text.Json from 8.0.5 to 9.0.0 (#1920)
dependabot[bot] Nov 13, 2024
d5b11ea
chore(deps): bump System.Formats.Asn1 and Microsoft.Windows.Compatibi…
dependabot[bot] Nov 13, 2024
17f36c6
Merge pull request #1919 from microsoft/dependabot/nuget/Microsoft.Ex…
baywet Nov 13, 2024
5fef51c
Merge pull request #1915 from microsoft/fix/performance-type-serializ…
baywet Nov 13, 2024
d9fccee
chore(deps): bump Verify.Xunit from 28.2.0 to 28.2.1
dependabot[bot] Nov 13, 2024
243d680
chore(deps): bump Microsoft.Extensions.Logging and Microsoft.Extensio…
dependabot[bot] Nov 13, 2024
342e643
chore(deps): bump Microsoft.OData.Edm from 8.2.0 to 8.2.1
dependabot[bot] Nov 13, 2024
b5ebf59
chore(deps): bump Microsoft.VisualStudio.Threading.Analyzers
dependabot[bot] Nov 13, 2024
34c97e4
Merge pull request #1925 from microsoft/dependabot/nuget/Verify.Xunit…
andrueastman Nov 14, 2024
3d2681e
Merge pull request #1928 from microsoft/dependabot/nuget/Microsoft.Vi…
baywet Nov 14, 2024
a64718b
Merge pull request #1926 from microsoft/dependabot/nuget/multi-fd6639…
andrueastman Nov 14, 2024
863faee
Merge pull request #1927 from microsoft/dependabot/nuget/Microsoft.OD…
baywet Nov 14, 2024
3ca0672
chore: removes newtonsoft dependency all together
baywet Nov 14, 2024
a92dfe7
Merge pull request #1931 from microsoft/chore/newtonsoft-removal
baywet Nov 14, 2024
36752ad
chore(deps): bump Microsoft.Extensions.Logging, Microsoft.Extensions.…
dependabot[bot] Nov 14, 2024
a44e789
chore(deps): bump Verify.Xunit from 28.2.1 to 28.3.1
dependabot[bot] Nov 15, 2024
e1eafea
Fix link to OpenAPI specification
mikekistler Nov 17, 2024
83c571a
Merge pull request #1936 from microsoft/dependabot/nuget/Verify.Xunit…
andrueastman Nov 18, 2024
f243300
Merge pull request #1938 from mikekistler/mdk/fix-spec-link
andrueastman Nov 18, 2024
0cab0e7
Clean up tags serialization logic
MaggieKimani1 Nov 18, 2024
5a51460
Add test to validate
MaggieKimani1 Nov 18, 2024
262acd4
chore(deps): bump Verify.Xunit from 28.3.1 to 28.3.2
dependabot[bot] Nov 18, 2024
0bf5a42
Merge pull request #1941 from microsoft/dependabot/nuget/Verify.Xunit…
andrueastman Nov 19, 2024
6615079
Use range for STJ reference and suppress warnings
MaggieKimani1 Nov 19, 2024
c98ca28
Revert change for hidi
MaggieKimani1 Nov 19, 2024
b0a0e8e
Add const keyword and serialization logic
MaggieKimani1 Nov 19, 2024
067fbdd
Deserialize const keyword
MaggieKimani1 Nov 19, 2024
70c7d43
Add test and update API
MaggieKimani1 Nov 19, 2024
2630ebb
chore(deps): bump Microsoft.OData.Edm from 8.2.1 to 8.2.2
dependabot[bot] Nov 19, 2024
36bc990
chore(deps): bump Microsoft.NET.Test.Sdk from 17.11.1 to 17.12.0
dependabot[bot] Nov 19, 2024
537f964
Merge pull request #1944 from microsoft/dependabot/nuget/Microsoft.OD…
baywet Nov 19, 2024
687fa87
Merge pull request #1945 from microsoft/dependabot/nuget/Microsoft.NE…
baywet Nov 19, 2024
1338905
Merge pull request #1942 from microsoft/mk/add-range-for-STJ-reference
MaggieKimani1 Nov 20, 2024
12ee205
refactor to use backing fields
MaggieKimani1 Nov 20, 2024
c1d831f
Clean up tests
MaggieKimani1 Nov 20, 2024
03edbc9
Allow empty paths object as valid
MaggieKimani1 Nov 25, 2024
1af4f13
Add test to validate; clean up tests
MaggieKimani1 Nov 25, 2024
cbc99c1
Use the selected format label
MaggieKimani1 Nov 25, 2024
9b237c6
Suppress warnings
MaggieKimani1 Nov 25, 2024
171241e
make property and method static
MaggieKimani1 Nov 25, 2024
506ef1f
clean up code
MaggieKimani1 Nov 25, 2024
a648591
Refactor readers to reduce surface area
darrelmiller Nov 26, 2024
c9b01cb
Moved load external references
darrelmiller Nov 26, 2024
5ceb174
Merge pull request #1956 from microsoft/mk/fix-workbench-format-bug
MaggieKimani1 Nov 26, 2024
98b01e0
Merge pull request #1943 from microsoft/mk/add-json-schema-const-keyword
MaggieKimani1 Nov 26, 2024
6a830b8
Merge remote-tracking branch 'origin/vnext' into mk/fix-empty-paths-f…
MaggieKimani1 Nov 26, 2024
e6ab1cd
Merge pull request #1955 from microsoft/mk/fix-empty-paths-failing
MaggieKimani1 Nov 26, 2024
f0f0a05
Merge remote-tracking branch 'origin/vnext' into mk/fix-tags-serializ…
MaggieKimani1 Nov 26, 2024
634cb1c
Merge remote-tracking branch 'origin/vnext' into mk/fix-json-reader
MaggieKimani1 Nov 27, 2024
1464e2c
Move load methods to be adjacent
MaggieKimani1 Nov 27, 2024
e588377
Async over sync
MaggieKimani1 Nov 27, 2024
47e3e25
refactor code
MaggieKimani1 Nov 27, 2024
8521082
Use the provided format in hidi options
MaggieKimani1 Nov 28, 2024
99a80b9
Clean up tests; refactor to use async
MaggieKimani1 Nov 28, 2024
627d75b
Dispose stream
MaggieKimani1 Nov 28, 2024
46718f0
clean up and dispose stream if specified in the settings
MaggieKimani1 Nov 28, 2024
bd64612
Update public API
MaggieKimani1 Nov 28, 2024
a2f70ae
Leave stream open if specified in settings
MaggieKimani1 Nov 28, 2024
8bbb3dd
Guard against null references
MaggieKimani1 Nov 28, 2024
cecf011
code cleanup
MaggieKimani1 Nov 28, 2024
fe77796
chore(deps): bump Verify.Xunit from 28.3.2 to 28.4.0
dependabot[bot] Nov 28, 2024
3ae2f91
Merge pull request #1976 from microsoft/dependabot/nuget/Verify.Xunit…
andrueastman Dec 2, 2024
be3bbf5
Update public API
MaggieKimani1 Dec 2, 2024
408e793
remove extra semi-colon and commented out code
MaggieKimani1 Dec 2, 2024
7acdf9b
Remove unnecessary using
MaggieKimani1 Dec 2, 2024
36df13d
chore(deps): bump docker/build-push-action from 6.9.0 to 6.10.0
dependabot[bot] Dec 2, 2024
f64202b
Merge pull request #1977 from microsoft/dependabot/github_actions/doc…
andrueastman Dec 3, 2024
dc25f9e
Inspect string input's format if not explicitly provided
MaggieKimani1 Dec 3, 2024
76d581b
Adds required pipeline metadata
MaggieKimani1 Dec 3, 2024
7f6432f
Merge pull request #1978 from microsoft/mk/add-security-metadata
MaggieKimani1 Dec 3, 2024
63ab53f
Remove unnecessary using and whitespace
MaggieKimani1 Dec 3, 2024
ef765f1
chore(deps): bump FluentAssertions from 6.12.2 to 7.0.0
dependabot[bot] Dec 3, 2024
47bf1eb
Merge pull request #1979 from microsoft/dependabot/nuget/FluentAssert…
andrueastman Dec 4, 2024
d022fa4
Remove unnecessary using
MaggieKimani1 Dec 5, 2024
04af1a6
Make format optional; add logic for inspecting stream format
MaggieKimani1 Dec 5, 2024
86b70c9
code cleanup
MaggieKimani1 Dec 5, 2024
f1ec813
Rename Read Result properties
MaggieKimani1 Dec 9, 2024
07237af
Implement serialization and deserialization logic for unrecognized JS…
MaggieKimani1 Dec 10, 2024
e3310f5
Rename method
MaggieKimani1 Dec 10, 2024
208d0fd
Add tests to validate
MaggieKimani1 Dec 10, 2024
b91c13e
Clean up
MaggieKimani1 Dec 10, 2024
dd80ab7
Update public API
MaggieKimani1 Dec 10, 2024
2c2bbe6
chore: code fixes recommended by sonarqube
baywet Dec 11, 2024
d7064c4
Remove code smells
MaggieKimani1 Dec 11, 2024
f27415d
Reduce redundancy and use LINQ statement
MaggieKimani1 Dec 11, 2024
3665930
Update src/Microsoft.OpenApi.Readers/OpenApiYamlReader.cs
MaggieKimani1 Dec 11, 2024
5ca061b
Update src/Microsoft.OpenApi/Models/OpenApiDocument.cs
MaggieKimani1 Dec 11, 2024
e8c76db
Update src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
MaggieKimani1 Dec 11, 2024
a66e21b
Update src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
MaggieKimani1 Dec 11, 2024
4198c82
Update src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
MaggieKimani1 Dec 11, 2024
0836e97
chore: code linting
baywet Dec 11, 2024
a5e1057
Update src/Microsoft.OpenApi/Reader/OpenApiJsonReader.cs
MaggieKimani1 Dec 11, 2024
01e4f49
chore: adds missing defensive programming and passes settings when re…
baywet Dec 11, 2024
d1aedb4
Merge branch 'mk/fix-json-reader' of https://github.com/microsoft/Ope…
baywet Dec 11, 2024
07ab67a
Update src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
MaggieKimani1 Dec 11, 2024
3123cb7
Update src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
MaggieKimani1 Dec 11, 2024
ab2ddf0
fix: default settings in case of null value
baywet Dec 11, 2024
87ce841
Merge branch 'mk/fix-json-reader' of https://github.com/microsoft/Ope…
baywet Dec 11, 2024
4bc34b1
chore(deps): bump PublicApiGenerator from 11.1.0 to 11.2.0
dependabot[bot] Dec 11, 2024
1caaaaa
chore(deps): bump Microsoft.OData.Edm from 8.2.2 to 8.2.3
dependabot[bot] Dec 12, 2024
1beb8af
Merge pull request #1986 from microsoft/dependabot/nuget/Microsoft.OD…
baywet Dec 13, 2024
bea3b4f
Merge pull request #1984 from microsoft/dependabot/nuget/PublicApiGen…
andrueastman Dec 13, 2024
7e9b952
Bump preview versions
MaggieKimani1 Dec 13, 2024
bd29345
Merge pull request #1988 from microsoft/mk/bump-preview-version
MaggieKimani1 Dec 13, 2024
b1265fc
chore(deps): bump Verify.Xunit from 28.4.0 to 28.5.0
dependabot[bot] Dec 13, 2024
06767a2
Merge pull request #1990 from microsoft/dependabot/nuget/Verify.Xunit…
andrueastman Dec 16, 2024
f0ac82d
chore(deps): bump xunit.runner.visualstudio from 2.8.2 to 3.0.0
dependabot[bot] Dec 16, 2024
7db6469
Merge pull request #1992 from microsoft/dependabot/nuget/xunit.runner…
andrueastman Dec 17, 2024
7556ba5
Merge pull request #1939 from microsoft/mk/fix-tags-serialization
MaggieKimani1 Dec 17, 2024
5e9bb19
chore(deps): bump Verify.Xunit from 28.5.0 to 28.6.0
dependabot[bot] Dec 17, 2024
5c958f8
chore(deps): bump PublicApiGenerator from 11.2.0 to 11.3.0
dependabot[bot] Dec 17, 2024
7df6194
Merge pull request #1994 from microsoft/dependabot/nuget/PublicApiGen…
andrueastman Dec 18, 2024
d9a2481
Merge pull request #1993 from microsoft/dependabot/nuget/Verify.Xunit…
andrueastman Dec 18, 2024
8305982
chore: adds baywet to code owners
baywet Dec 19, 2024
97f125d
Merge pull request #1996 from microsoft/chore/baywet-code-owner
baywet Dec 19, 2024
6899424
Merge pull request #1981 from microsoft/mk/rename-read-result-props
MaggieKimani1 Dec 19, 2024
09158e2
chore: uses backing fields
baywet Dec 19, 2024
3154d45
Merge branch 'vnext' into mk/fix-json-reader
MaggieKimani1 Dec 19, 2024
7d297be
chore: code linting
baywet Dec 19, 2024
955f7fb
Fix issues from resolving merge conflicts
MaggieKimani1 Dec 19, 2024
146b44f
Update src/Microsoft.OpenApi/Reader/V31/OpenApiSchemaDeserializer.cs
baywet Dec 19, 2024
7be32fc
Revert "Update src/Microsoft.OpenApi/Reader/V31/OpenApiSchemaDeserial…
baywet Dec 19, 2024
2443fa0
fix: missing property rename
baywet Dec 19, 2024
8bf3fbe
Merge pull request #1982 from microsoft/mk/support-unrecognized-keywords
baywet Dec 19, 2024
a4933ef
Update input doc comments
MaggieKimani1 Dec 19, 2024
4f55597
chore: exposes unused property so consumers can read the information
baywet Dec 19, 2024
b00b557
chore: aligns parameter names with base definition
baywet Dec 19, 2024
f9f7766
chore: aligns parameter names
baywet Dec 19, 2024
a72c5c2
chore: linting
baywet Dec 19, 2024
b9ef21d
chore: removes conflicting overload
baywet Dec 19, 2024
84e83f4
chore: reduces loops
baywet Dec 19, 2024
4f28b65
fix: extensions collection initialization
baywet Dec 19, 2024
778184f
fix: restores default constructor for ISerializable implementation
baywet Dec 19, 2024
e86df13
chore: makes regex internal
baywet Dec 19, 2024
28b226e
Merge pull request #1997 from microsoft/chore/linting
baywet Dec 19, 2024
538d2eb
Update src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
MaggieKimani1 Dec 19, 2024
f879452
Update src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
MaggieKimani1 Dec 19, 2024
aac99fe
Update src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
MaggieKimani1 Dec 19, 2024
e3049a6
Update src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
MaggieKimani1 Dec 19, 2024
8a17bf2
Update src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs
MaggieKimani1 Dec 19, 2024
329df70
chore: fixes extraneous master references
baywet Dec 19, 2024
8999336
fix: sets hidi version to a preview
baywet Dec 19, 2024
975b1bf
Merge pull request #2000 from microsoft/fix/hidi-preview
baywet Dec 19, 2024
fbe390b
Merge pull request #1999 from microsoft/chore/master-linting
baywet Dec 19, 2024
9805b82
ci: rename master to main
baywet Dec 19, 2024
1a5352a
ci: renames vnext to dev
baywet Dec 19, 2024
c805f2e
ci: adds support branch for v1
baywet Dec 19, 2024
78cf794
Merge pull request #2001 from microsoft/ci/align-branches
baywet Dec 19, 2024
6a9f845
chore(deps): bump Verify.Xunit from 28.2.0 to 28.6.1
dependabot[bot] Dec 19, 2024
97115ab
Merge pull request #2003 from microsoft/dependabot/nuget/Verify.Xunit…
baywet Dec 19, 2024
6617631
ci: fixes hidi gh release
baywet Dec 19, 2024
1f72ebf
fix: redundant artifact upload
baywet Dec 19, 2024
83ac7f0
Merge pull request #2008 from microsoft/ci/updates-to-dev
baywet Dec 19, 2024
c944a31
Defensive programming; pass cancellation token
MaggieKimani1 Dec 20, 2024
66cc6e0
Merge remote-tracking branch 'origin/mk/fix-json-reader' into mk/fix-…
MaggieKimani1 Dec 20, 2024
47dca99
Code cleanup and fix tests
MaggieKimani1 Dec 20, 2024
e243f4e
simplify tuple variables
MaggieKimani1 Dec 20, 2024
28e1ecd
Update public API
MaggieKimani1 Dec 20, 2024
56742b9
Dispose stream in caller method
MaggieKimani1 Dec 20, 2024
ee63758
Abstract implementation detail from interface
MaggieKimani1 Dec 20, 2024
7c63538
chore: updates api manifest dependency
baywet Dec 20, 2024
6553f30
chore: code linting
baywet Dec 20, 2024
7270a89
Dispose preparedStream properly
MaggieKimani1 Dec 20, 2024
fd202c7
Merge pull request #2014 from microsoft/chore/v1-sync
baywet Dec 20, 2024
b033b76
Pass cancellation token
MaggieKimani1 Dec 20, 2024
c24d670
Update API
MaggieKimani1 Dec 20, 2024
80164af
Merge pull request #1975 from microsoft/mk/fix-json-reader
baywet Dec 20, 2024
6532349
fix: removes actions steps that create extraneous tags
baywet Dec 20, 2024
ccb0843
fix: updates output syntax for tag version
baywet Dec 20, 2024
8721742
ci: moves create github release to its own job
baywet Dec 20, 2024
f52cf96
nit: fixes indent
baywet Dec 20, 2024
c183323
Merge pull request #2016 from microsoft/fix/ci-hidi-gh-upload
baywet Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 76 additions & 69 deletions .azure-pipelines/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
trigger:
branches:
include:
- master
- vnext
- main
- dev
- support/v1
pr:
branches:
include:
- master
- vnext
- main
- dev
- support/v1
variables:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
Expand Down Expand Up @@ -41,10 +43,6 @@ extends:
displayName: 'Publish Artifact: Nugets'
artifactName: Nugets
targetPath: '$(Build.ArtifactStagingDirectory)/Nugets'
- output: pipelineArtifact
displayName: 'Publish Artifact: Hidi'
artifactName: Microsoft.OpenApi.Hidi-v$(hidiversion)
targetPath: '$(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi-v$(hidiversion)'
steps:
- task: UseDotNet@2
displayName: 'Use .NET 6'
Expand Down Expand Up @@ -177,23 +175,13 @@ extends:
MaxConcurrency: '50'
MaxRetryAttempts: '5'
PendingAnalysisWaitTimeoutMinutes: '5'

- task: PowerShell@2
displayName: "Get Hidi's version-number from .csproj"
inputs:
targetType: 'inline'
script: |
$xml = [Xml] (Get-Content .\src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj)
$version = $xml.Project.PropertyGroup.Version
echo $version
echo "##vso[task.setvariable variable=hidiversion]$version"


# publish hidi as an .exe
- task: DotNetCoreCLI@2
displayName: publish Hidi as executable
inputs:
command: 'publish'
arguments: -c Release --runtime win-x64 /p:PublishSingleFile=true /p:PackAsTool=false --self-contained --output $(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi-v$(hidiversion)
arguments: -c Release --runtime win-x64 /p:PublishSingleFile=true /p:PackAsTool=false --self-contained --output $(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi
projects: 'src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj'
publishWebProjects: False
zipAfterPublish: false
Expand All @@ -206,10 +194,17 @@ extends:
content: '*.nupkg'

- stage: deploy
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/master'), succeeded())
condition: and(or(contains(variables['build.sourceBranch'], 'refs/heads/main'),contains(variables['build.sourceBranch'], 'refs/heads/support/v1')), succeeded())
dependsOn: build
jobs:
- deployment: deploy_hidi
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
artifactName: Nugets
targetPath: '$(Pipeline.Workspace)'
dependsOn: []
environment: nuget-org
strategy:
Expand All @@ -218,52 +213,22 @@ extends:
pool:
vmImage: ubuntu-latest
steps:
- task: DownloadPipelineArtifact@2
displayName: Download nupkg from artifacts
inputs:
artifact: Nugets
source: current
- task: DownloadPipelineArtifact@2
displayName: Download hidi executable from artifacts
inputs:
source: current
- pwsh: |
$artifactName = Get-ChildItem -Path $(Pipeline.Workspace)\Nugets -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; isOutput=true]$artifactVersion"
Write-Host "##vso[task.setvariable variable=artifactName; isSecret=false; isOutput=true]$artifactName.FullName"
echo "$artifactName"
echo "$artifactVersion"
displayName: 'Fetch Artifact Name'
- task: 1ES.PublishNuget@1
displayName: 'NuGet push'
inputs:
packagesToPush: '$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Hidi.*.nupkg'
packageParentPath: '$(Pipeline.Workspace)'
nuGetFeedType: external
publishFeedCredentials: 'OpenAPI Nuget Connection'
- task: GitHubRelease@1
displayName: 'GitHub release (edit)'
condition: succeededOrFailed()
inputs:
gitHubConnection: 'Github-MaggieKimani1'
action: edit
tagSource: userSpecifiedTag
tag: '$(artifactVersion)'
title: '$(artifactVersion)'
releaseNotesSource: inline
assets: '$(Pipeline.Workspace)\**\*.exe'
changeLogType: issueBased
changeLogLabels: '[
{ "label" : "feature-work", "feature", "displayName" : "New Features", "state" : "closed" },
{ "label" : "enhancement", "V2-Enhancement", "displayName" : "Enhancements", "state" : "closed" },
{ "label" : "bug", "bug-fix", "displayName" : "Bugs", "state" : "closed" },
{ "label" : "documentation", "doc", "displayName" : "Documentation", "state" : "closed"},
{ "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }
]'

- deployment: deploy_lib
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
artifactName: Nugets
targetPath: '$(Pipeline.Workspace)'
dependsOn: []
environment: nuget-org
strategy:
Expand All @@ -272,11 +237,6 @@ extends:
pool:
vmImage: ubuntu-latest
steps:
- task: DownloadPipelineArtifact@2
displayName: Download nupkg from artifacts
inputs:
artifact: Nugets
source: current
- powershell: |
$fileNames = "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Hidi.*.nupkg", "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Readers.*.nupkg", "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Workbench.*.nupkg"
foreach($fileName in $fileNames) {
Expand All @@ -294,6 +254,13 @@ extends:
publishFeedCredentials: 'OpenAPI Nuget Connection'

- deployment: deploy_readers
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
artifactName: Nugets
targetPath: '$(Pipeline.Workspace)'
dependsOn: deploy_lib
environment: nuget-org
strategy:
Expand All @@ -302,15 +269,55 @@ extends:
pool:
vmImage: ubuntu-latest
steps:
- task: DownloadPipelineArtifact@2
displayName: Download nupkg from artifacts
inputs:
artifact: Nugets
source: current
- task: 1ES.PublishNuget@1
displayName: 'NuGet push'
inputs:
packagesToPush: '$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Readers.*.nupkg'
packageParentPath: '$(Pipeline.Workspace)'
nuGetFeedType: external
publishFeedCredentials: 'OpenAPI Nuget Connection'
publishFeedCredentials: 'OpenAPI Nuget Connection'

- deployment: create_github_release
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)\Nugets -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; isOutput=true]$artifactVersion"
echo "$artifactVersion"
displayName: 'Fetch Artifact Name'
name: getTagVersion
- task: GitHubRelease@1
displayName: 'GitHub release (edit)'
condition: succeededOrFailed()
inputs:
gitHubConnection: 'Github-MaggieKimani1'
action: create
tagSource: userSpecifiedTag
tag: '$(getTagVersion.artifactVersion)'
title: '$(getTagVersion.artifactVersion)'
releaseNotesSource: inline
assets: '$(Pipeline.Workspace)\**\*.exe'
changeLogType: issueBased
changeLogLabels: '[
{ "label" : "feature-work", "feature", "displayName" : "New Features", "state" : "closed" },
{ "label" : "enhancement", "V2-Enhancement", "displayName" : "Enhancements", "state" : "closed" },
{ "label" : "bug", "bug-fix", "displayName" : "Bugs", "state" : "closed" },
{ "label" : "documentation", "doc", "displayName" : "Documentation", "state" : "closed"},
{ "label" : "dependencies", "displayName" : "Package Updates", "state" : "closed" }
]'

2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @irvinesunday @darrelmiller @gavinbarron @millicentachieng @MaggieKimani1 @andrueastman
* @irvinesunday @darrelmiller @gavinbarron @millicentachieng @MaggieKimani1 @andrueastman @baywet
35 changes: 1 addition & 34 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ name: CI/CD Pipeline
on: [push, pull_request, workflow_dispatch]

permissions:
contents: write
contents: read

jobs:
ci:
name: Continuous Integration
runs-on: ubuntu-latest
outputs:
latest_version: ${{ steps.tag_generator.outputs.new_version }}
is_default_branch: ${{ steps.conditionals_handler.outputs.is_default_branch }}
env:
ARTIFACTS_FOLDER: ${{ github.workspace }}/Artifacts
GITHUB_RUN_NUMBER: ${{ github.run_number }}
Expand All @@ -21,43 +18,13 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Data gatherer
id: data_gatherer
shell: pwsh
run: |
# Get default branch
$repo = 'microsoft/OpenAPI.NET'
$defaultBranch = Invoke-RestMethod -Method GET -Uri https://api.github.com/repos/$repo | Select-Object -ExpandProperty default_branch
Write-Output "::set-output name=default_branch::$(echo $defaultBranch)"

- name: Conditionals handler
id: conditionals_handler
shell: pwsh
run: |
$defaultBranch = "${{ steps.data_gatherer.outputs.default_branch }}"
$githubRef = "${{ github.ref }}"
$isDefaultBranch = 'false'
if ( $githubRef -like "*$defaultBranch*" ) {
$isDefaultBranch = 'true'
}
Write-Output "::set-output name=is_default_branch::$(echo $isDefaultBranch)"

- name: Checkout repository
id: checkout_repo
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- if: steps.conditionals_handler.outputs.is_default_branch == 'true'
name: Bump GH tag
id: tag_generator
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
release_branches: ${{ steps.data_gatherer.outputs.default_branch }}

- name: Build projects
id: build_projects
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CodeQL Analysis

on:
push:
branches: [ vnext ]
branches: [ main, dev ]
pull_request:
schedule:
- cron: '0 8 * * *'
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish Docker image
on:
workflow_dispatch:
push:
branches: [master, vnext]
branches: [main, dev, support/v1]
paths: ['src/Microsoft.OpenApi.Hidi/**', '.github/workflows/**']
env:
REGISTRY: msgraphprod.azurecr.io
Expand All @@ -16,7 +16,7 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Login to GitHub package feed
- name: Login to registry
uses: docker/[email protected]
with:
username: ${{ secrets.ACR_USERNAME }}
Expand All @@ -28,15 +28,15 @@ jobs:
echo "::set-output name=version::${version}"
shell: pwsh
id: getversion
- name: Push to GitHub Packages - Nightly
if: ${{ github.ref == 'refs/heads/vnext' }}
uses: docker/build-push-action@v6.9.0
- name: Push to registry - Nightly
if: ${{ github.ref == 'refs/heads/dev' }}
uses: docker/build-push-action@v6.10.0
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly
- name: Push to GitHub Packages - Release
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v6.9.0
- name: Push to registry - Release
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/support/v1' }}
uses: docker/build-push-action@v6.10.0
with:
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
// 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/master/debugger-launchjson.md
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/main/debugger-launchjson.md
"name": "Launch Hidi",
"type": "coreclr",
"request": "launch",
Expand All @@ -22,7 +22,7 @@
{
// 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/master/debugger-launchjson.md
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/main/debugger-launchjson.md
"name": "Launch Workbench",
"type": "coreclr",
"request": "launch",
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ VOLUME /app/collection.json
ENV HIDI_CONTAINER=true DOTNET_TieredPGO=1 DOTNET_TC_QuickJitForLoops=1
ENTRYPOINT ["dotnet", "Microsoft.OpenApi.Hidi.dll"]
LABEL description="# Welcome to Hidi \
To start transforming OpenAPI documents checkout [the getting started documentation](https://github.com/microsoft/OpenAPI.NET/tree/vnext/src/Microsoft.OpenApi.Hidi) \
[Source dockerfile](https://github.com/microsoft/OpenAPI.NET/blob/vnext/Dockerfile)"
To start transforming OpenAPI documents checkout [the getting started documentation](https://github.com/microsoft/OpenAPI.NET/tree/main/src/Microsoft.OpenApi.Hidi) \
[Source dockerfile](https://github.com/microsoft/OpenAPI.NET/blob/main/Dockerfile)"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ 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");
var stream = await httpClient.GetStreamAsync("main/examples/v3.0/petstore.yaml");

// Read V3 as YAML
var openApiDocument = new OpenApiStreamReader().Read(stream, out var diagnostic);
Expand All @@ -95,7 +95,7 @@ var outputString = openApiDocument.Serialize(OpenApiSpecVersion.OpenApi2_0, Open
In order to test the validity of an OpenApi document, we avail the following tools:
- [Microsoft.OpenApi.Hidi](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi)

A commandline tool for validating and transforming OpenAPI descriptions. [Installation guidelines and documentation](https://github.com/microsoft/OpenAPI.NET/blob/vnext/src/Microsoft.OpenApi.Hidi/readme.md)
A commandline tool for validating and transforming OpenAPI descriptions. [Installation guidelines and documentation](https://github.com/microsoft/OpenAPI.NET/blob/main/src/Microsoft.OpenApi.Hidi/readme.md)

- Microsoft.OpenApi.Workbench

Expand Down
Loading
Loading