From 5852ec4253b926adfaa48c8eb3bbb3907711d3e5 Mon Sep 17 00:00:00 2001 From: Aniruddh Munde Date: Wed, 23 Nov 2022 15:41:46 -0800 Subject: [PATCH 1/3] Binplace schema file with build version --- .pipelines/build-pipelines.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pipelines/build-pipelines.yml b/.pipelines/build-pipelines.yml index f80fd50503..80294355fa 100644 --- a/.pipelines/build-pipelines.yml +++ b/.pipelines/build-pipelines.yml @@ -47,6 +47,12 @@ steps: folderPath: '$(System.DefaultWorkingDirectory)' fileType: 'json' targetFiles: 'schemas/dab.draft.schema.json' + +- task: CopyFiles@2 + displayName: 'Copy dab.draft.schema.json' + inputs: + contents: 'schemas/dab.draft.schema.json' + targetFolder: '$(Build.ArtifactStagingDirectory)' - task: UseDotNet@2 displayName: Setup .NET SDK v6.0.x @@ -191,6 +197,7 @@ steps: $(Build.ArtifactStagingDirectory)/**/*.nupkg $(Build.ArtifactStagingDirectory)/**/*.zip $(Build.ArtifactStagingDirectory)/**/dab-manifest.json + $(Build.ArtifactStagingDirectory)/**/dab.draft.schema.json isDraft: true isPreRelease: true addChangeLog: false From 8d8e3e193449e12c482beec818e2cb6dc9656f4f Mon Sep 17 00:00:00 2001 From: Aniruddh Munde Date: Wed, 23 Nov 2022 16:15:14 -0800 Subject: [PATCH 2/3] Include schema json in build output --- .pipelines/build-pipelines.yml | 3 ++- schemas/dab.draft.schema.json | 2 +- src/Cli/src/Cli.csproj | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.pipelines/build-pipelines.yml b/.pipelines/build-pipelines.yml index 80294355fa..88e90f4fa4 100644 --- a/.pipelines/build-pipelines.yml +++ b/.pipelines/build-pipelines.yml @@ -51,7 +51,8 @@ steps: - task: CopyFiles@2 displayName: 'Copy dab.draft.schema.json' inputs: - contents: 'schemas/dab.draft.schema.json' + sourceFolder: '$(Build.SourcesDirectory)/schemas' + contents: 'dab.draft.schema.json' targetFolder: '$(Build.ArtifactStagingDirectory)' - task: UseDotNet@2 diff --git a/schemas/dab.draft.schema.json b/schemas/dab.draft.schema.json index 8fb4077b10..cceb219782 100644 --- a/schemas/dab.draft.schema.json +++ b/schemas/dab.draft.schema.json @@ -6,7 +6,7 @@ "title": "Data API Builder", "description": "Schema for Data API Builder engine", "additionalProperties": { - "version": "urn:dab:config:schema:draft-major.minor.patch" + "version": "https://dataapibuilder.blob.core.windows.net/schemas/vmajor.minor.patch-alpha/dab.draft.schema.json" }, "type": "object", "properties": { diff --git a/src/Cli/src/Cli.csproj b/src/Cli/src/Cli.csproj index 5127bebb7e..2197df706d 100644 --- a/src/Cli/src/Cli.csproj +++ b/src/Cli/src/Cli.csproj @@ -28,10 +28,20 @@ + + + + + + + PreserveNewest + + + - + - + From 807b19f54ac784caf3928defd535f91f586cfcd1 Mon Sep 17 00:00:00 2001 From: Aniruddh Munde Date: Wed, 23 Nov 2022 16:31:40 -0800 Subject: [PATCH 3/3] Fix the url for schema path --- .pipelines/build-pipelines.yml | 2 +- schemas/dab.draft.schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pipelines/build-pipelines.yml b/.pipelines/build-pipelines.yml index 88e90f4fa4..1faa528a07 100644 --- a/.pipelines/build-pipelines.yml +++ b/.pipelines/build-pipelines.yml @@ -19,7 +19,7 @@ variables: # The counter is reset when the minor version is updated. patch: $[counter(format('{0}_{1}', variables['build.reason'], variables['minor']), 0)] isReleaseBuild: $(isNugetRelease) - additionalProperties.version: 'urn:dab:config:schema:draft-$(major).$(minor).$(patch)' + additionalProperties.version: 'https://dataapibuilder.azureedge.net/schemas/v$(major).$(minor).$(patch)-alpha/dab.draft.schema.json' steps: - task: NuGetAuthenticate@1 diff --git a/schemas/dab.draft.schema.json b/schemas/dab.draft.schema.json index cceb219782..4048edeef0 100644 --- a/schemas/dab.draft.schema.json +++ b/schemas/dab.draft.schema.json @@ -6,7 +6,7 @@ "title": "Data API Builder", "description": "Schema for Data API Builder engine", "additionalProperties": { - "version": "https://dataapibuilder.blob.core.windows.net/schemas/vmajor.minor.patch-alpha/dab.draft.schema.json" + "version": "https://dataapibuilder.azureedge.net/schemas/vmajor.minor.patch-alpha/dab.draft.schema.json" }, "type": "object", "properties": {