diff --git a/.github/package-lock.json b/.github/package-lock.json index 5b2c8caf1214..0cc7db3ac3ae 100644 --- a/.github/package-lock.json +++ b/.github/package-lock.json @@ -2850,9 +2850,9 @@ } }, "node_modules/globals": { - "version": "17.2.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-17.2.0.tgz", - "integrity": "sha512-tovnCz/fEq+Ripoq+p/gN1u7l6A7wwkoBT9pRCzTHzsD/LvADIzXZdjmRymh5Ztf0DYC3Rwg5cZRYjxzBmzbWg==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.3.0.tgz", + "integrity": "sha512-yMqGUQVVCkD4tqjOJf3TnrvaaHDMYp4VlUSObbkIiuCPe/ofdMBFIAcBbCSRFWOnos6qRiTVStDwqPLUclaxIw==", "dev": true, "license": "MIT", "engines": { diff --git a/.github/shared/package-lock.json b/.github/shared/package-lock.json index 7277096f3c59..c16a5723ffdf 100644 --- a/.github/shared/package-lock.json +++ b/.github/shared/package-lock.json @@ -2224,9 +2224,9 @@ } }, "node_modules/globals": { - "version": "17.2.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-17.2.0.tgz", - "integrity": "sha512-tovnCz/fEq+Ripoq+p/gN1u7l6A7wwkoBT9pRCzTHzsD/LvADIzXZdjmRymh5Ztf0DYC3Rwg5cZRYjxzBmzbWg==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.3.0.tgz", + "integrity": "sha512-yMqGUQVVCkD4tqjOJf3TnrvaaHDMYp4VlUSObbkIiuCPe/ofdMBFIAcBbCSRFWOnos6qRiTVStDwqPLUclaxIw==", "dev": true, "license": "MIT", "engines": { diff --git a/eng/common/scripts/login-to-github.ps1 b/eng/common/scripts/login-to-github.ps1 index 96023d290c4b..e911f31eb12b 100644 --- a/eng/common/scripts/login-to-github.ps1 +++ b/eng/common/scripts/login-to-github.ps1 @@ -57,9 +57,17 @@ function New-GitHubAppJwt { [Parameter(Mandatory)] [string] $AppId ) - function Base64UrlEncode($json) { - $bytes = [System.Text.Encoding]::UTF8.GetBytes($json) - $base64 = [Convert]::ToBase64String($bytes) + function Base64UrlEncode { + param( + [string]$Data, + [switch]$IsBase64String + ) + if ($IsBase64String) { + $base64 = $Data + } else { + $bytes = [System.Text.Encoding]::UTF8.GetBytes($Data) + $base64 = [Convert]::ToBase64String($bytes) + } return $base64.TrimEnd('=') -replace '\+', '-' -replace '/', '_' } @@ -70,7 +78,7 @@ function New-GitHubAppJwt { } $Now = [int][double]::Parse((Get-Date -UFormat %s)) $Payload = @{ - iat = $Now + iat = $Now - 10 # 10 seconds clock skew exp = $Now + 600 # 10 minutes iss = $AppId } @@ -97,7 +105,7 @@ function New-GitHubAppJwt { throw "Azure Key Vault response does not contain a signature. Response: $($SignResultJson | ConvertTo-Json -Compress)" } - $Signature = $SignResultJson.signature + $Signature = Base64UrlEncode -Data $SignResultJson.signature -IsBase64String return "$UnsignedToken.$Signature" } diff --git a/eng/tools/openapi-diff-runner/package.json b/eng/tools/openapi-diff-runner/package.json index 1096a5db64fd..167777b0270b 100644 --- a/eng/tools/openapi-diff-runner/package.json +++ b/eng/tools/openapi-diff-runner/package.json @@ -12,7 +12,7 @@ "format:check": "prettier . --ignore-path ../.prettierignore --check", "format:check:ci": "prettier . --ignore-path ../.prettierignore --check --log-level debug", "test": "vitest", - "test:ci": "vitest --coverage --reporter=verbose" + "test:ci": "vitest run --coverage --reporter=verbose" }, "engines": { "node": ">=20.0.0" diff --git a/eng/tools/openapi-diff-runner/test/commands.test.ts b/eng/tools/openapi-diff-runner/test/commands.test.ts new file mode 100644 index 000000000000..87fcb98e98bd --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/commands.test.ts @@ -0,0 +1,416 @@ +import { BREAKING_CHANGES_CHECK_TYPES } from "@azure-tools/specs-shared/breaking-change"; +import { getChangedFilesStatuses } from "@azure-tools/specs-shared/changed-files"; +import { devNull } from "node:os"; +import path, { resolve } from "node:path"; +import { fileURLToPath } from "node:url"; +import { beforeEach, describe, expect, it, vi } from "vitest"; +import { createDummySwagger } from "../src/command-helpers.js"; +import { validateBreakingChange } from "../src/commands.js"; +import { runOad } from "../src/run-oad.js"; + +const serviceParent = "specification/foo/data-plane/"; + +vi.mock("@azure-tools/specs-shared/changed-files", async () => { + const actual = await vi.importActual("@azure-tools/specs-shared/changed-files"); + return { + ...actual, + getChangedFilesStatuses: vi.fn(), + }; +}); + +vi.mock("../src/run-oad.js", () => ({ + runOad: vi.fn(), +})); + +vi.mock("../src/command-helpers.js", async () => { + const actual = await vi.importActual("../src/command-helpers.js"); + return { + ...actual, + createDummySwagger: vi.fn(), + }; +}); + +function mockChangedFilesStatuses( + partial: Partial<{ + additions: string[]; + modifications: string[]; + deletions: string[]; + renames: { from: string; to: string }[]; + }> = {}, +) { + const defaultResult = { + additions: [], + modifications: [], + deletions: [], + renames: [], + total: 0, + }; + + const result = { ...defaultResult, ...partial }; + + result.total = + result.additions.length + + result.modifications.length + + result.deletions.length + + result.renames.length; + + return vi.mocked(getChangedFilesStatuses).mockResolvedValue(result); +} + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + +const context = { + localSpecRepoPath: "", + workingFolder: "", + logFileFolder: "", + swaggerDirs: [], + baseBranch: "", + headCommit: "", + runType: "", + checkName: "", + targetRepo: "", + sourceRepo: "", + prInfo: { + targetBranch: "", + sourceBranch: "", + baseBranch: "", + currentBranch: "", + tempRepoFolder: path.resolve(__dirname, "fixtures"), + checkout: function (branch: string): Promise { + console.log("checkout " + branch); + return Promise.resolve(); + }, + }, + prNumber: "", + prSourceBranch: "", + prTargetBranch: "", + oadMessageProcessorContext: { + logFilePath: devNull, + prUrl: "", + messageCache: [], + }, + prUrl: "", +}; + +type TestCase = { + name: string; + changedFiles: { + additions?: string[]; + modifications?: string[]; + deletions?: string[]; + renames?: { + from: string; + to: string; + }[]; + }; + expectedCreateDummySwaggers: { old: string[]; new: string[] }; + expectedOadCalls: { + sameVersion: { old: string; new: string }[]; + crossVersion: { old: string; new: string }[]; + }; +}; + +const cases: TestCase[] = [ + { + name: "modify one file, one version", + changedFiles: { + modifications: ["Foo/stable/2025-03-01/foo.json"], + }, + expectedCreateDummySwaggers: { + old: [], + new: [], + }, + expectedOadCalls: { + sameVersion: [ + { + old: "Foo/stable/2025-03-01/foo.json", + new: "Foo/stable/2025-03-01/foo.json", + }, + ], + crossVersion: [], + }, + }, + { + name: "modify one file, multiple versions", + changedFiles: { + modifications: [ + "Foo/preview/2025-04-01-preview/foo.json", + "Foo/stable/2025-01-01/foo.json", + "Foo/stable/2025-03-01/foo.json", + ], + }, + expectedCreateDummySwaggers: { + old: [], + new: [], + }, + expectedOadCalls: { + sameVersion: [ + { + old: "Foo/preview/2025-04-01-preview/foo.json", + new: "Foo/preview/2025-04-01-preview/foo.json", + }, + { + old: "Foo/stable/2025-01-01/foo.json", + new: "Foo/stable/2025-01-01/foo.json", + }, + { + old: "Foo/stable/2025-03-01/foo.json", + new: "Foo/stable/2025-03-01/foo.json", + }, + ], + crossVersion: [], + }, + }, + { + name: "modify multiple files, multiple versions", + changedFiles: { + modifications: [ + "Bar/preview/2025-04-01-preview/bar.json", + "Bar/preview/2025-04-01-preview/baz.json", + "Bar/stable/2025-03-01/bar.json", + "Bar/stable/2025-03-01/baz.json", + ], + }, + expectedCreateDummySwaggers: { + old: [], + new: [], + }, + expectedOadCalls: { + sameVersion: [ + { + old: "Bar/preview/2025-04-01-preview/bar.json", + new: "Bar/preview/2025-04-01-preview/bar.json", + }, + { + old: "Bar/preview/2025-04-01-preview/baz.json", + new: "Bar/preview/2025-04-01-preview/baz.json", + }, + { + old: "Bar/stable/2025-03-01/bar.json", + new: "Bar/stable/2025-03-01/bar.json", + }, + { + old: "Bar/stable/2025-03-01/baz.json", + new: "Bar/stable/2025-03-01/baz.json", + }, + ], + crossVersion: [], + }, + }, + { + name: "add new stable, one file", + changedFiles: { + additions: ["Foo/stable/2026-01-01/foo.json"], + }, + expectedCreateDummySwaggers: { + old: [], + new: [], + }, + expectedOadCalls: { + sameVersion: [], + crossVersion: [ + { + old: "Foo/preview/2025-04-01-preview/foo.json", + new: "Foo/stable/2026-01-01/foo.json", + }, + { + old: "Foo/stable/2025-03-01/foo.json", + new: "Foo/stable/2026-01-01/foo.json", + }, + ], + }, + }, + { + name: "add new stable, multiple files", + changedFiles: { + additions: ["Bar/stable/2026-01-01/bar.json", "Bar/stable/2026-01-01/baz.json"], + }, + expectedCreateDummySwaggers: { + old: [], + new: [], + }, + expectedOadCalls: { + sameVersion: [], + crossVersion: [ + { + old: "Bar/preview/2025-04-01-preview/bar.json", + new: "Bar/stable/2026-01-01/bar.json", + }, + { + old: "Bar/preview/2025-04-01-preview/baz.json", + new: "Bar/stable/2026-01-01/baz.json", + }, + { + old: "Bar/stable/2025-03-01/bar.json", + new: "Bar/stable/2026-01-01/bar.json", + }, + { + old: "Bar/stable/2025-03-01/baz.json", + new: "Bar/stable/2026-01-01/baz.json", + }, + ], + }, + }, + { + name: "rename one file, one version", + changedFiles: { + renames: [ + { + from: "Foo/stable/2025-01-01/foo.json", + to: "Foo/stable/2025-01-01/openapi.json", + }, + ], + }, + // TODO: After code is fixed, should not create *any* dummy swaggers + expectedCreateDummySwaggers: { + old: ["Foo/stable/2025-01-01/openapi.json"], + new: ["Foo/stable/2025-01-01/foo.json"], + }, + // TODO: After code is fixed, should only compare before and after renamed file + expectedOadCalls: { + sameVersion: [ + { + old: "Foo/stable/2025-01-01/foo.json", + new: "Foo/stable/2025-01-01/foo.json", + }, + { + old: "Foo/stable/2025-01-01/openapi.json", + new: "Foo/stable/2025-01-01/openapi.json", + }, + ], + crossVersion: [], + }, + }, + // { + // name: "rename one file, change case of service", + // changedFiles: { + // additions: ["foo/stable/2025-01-01/openapi.json"], + // deletions: ["Foo/stable/2025-01-01/foo.json"], + // }, + // // TODO: After code is fixed, should not create *any* dummy swaggers + // expectedCreateDummySwaggers: { + // old: [], + // new: ["Foo/stable/2025-01-01/foo.json"], + // }, + // // TODO: After code is fixed, should only compare before and after renamed file + // expectedOadCalls: { + // sameVersion: [ + // { + // old: "Foo/stable/2025-01-01/foo.json", + // new: "Foo/stable/2025-01-01/foo.json", + // }, + // ], + // crossVersion: [], + // }, + // }, +]; + +describe("validateBreakingChange", () => { + beforeEach(() => { + vi.clearAllMocks(); + }); + + it.each(cases)( + "$name", + async ({ changedFiles, expectedCreateDummySwaggers, expectedOadCalls }) => { + // Prepend all input strings with the service parent folder (omitted from string literals for brevity) + // Use string concat instead of path.join(), since test inputs are all posix paths, and resolved at runtime + prependParentFolder(changedFiles, expectedCreateDummySwaggers, expectedOadCalls); + + mockChangedFilesStatuses(changedFiles); + + const mockCreateDummySwagger = vi.mocked(createDummySwagger); + + const mockRunOad = vi.mocked(runOad).mockResolvedValue([]); + + for (const data of [ + { + runType: BREAKING_CHANGES_CHECK_TYPES.SAME_VERSION, + expectedOadCalls: expectedOadCalls.sameVersion, + }, + { + runType: BREAKING_CHANGES_CHECK_TYPES.CROSS_VERSION, + expectedOadCalls: expectedOadCalls.crossVersion, + }, + ]) { + mockRunOad.mockClear(); + + const statusCode = await validateBreakingChange({ + ...context, + runType: data.runType, + }); + + expect(statusCode).toEqual(0); + + for (const expected of expectedCreateDummySwaggers.old) { + expect(mockCreateDummySwagger).toBeCalledWith( + expect.anything(), + resolve(context.prInfo.tempRepoFolder, expected), + ); + } + + for (const expected of expectedCreateDummySwaggers.new) { + expect(mockCreateDummySwagger).toBeCalledWith(expect.anything(), resolve(expected)); + } + + expect(mockCreateDummySwagger).toBeCalledTimes( + expectedCreateDummySwaggers.old.length + expectedCreateDummySwaggers.new.length, + ); + + for (const expected of data.expectedOadCalls) { + expect(mockRunOad).toBeCalledWith( + path.join(context.prInfo.tempRepoFolder, expected.old), + expected.new, + ); + } + + expect(mockRunOad).toBeCalledTimes(data.expectedOadCalls.length); + } + }, + ); +}); + +function prependParentFolder( + changedFiles: { + additions?: string[]; + modifications?: string[]; + deletions?: string[]; + renames?: { + from: string; + to: string; + }[]; + }, + expectedCreateDummySwaggers: { old: string[]; new: string[] }, + expectedOadCalls: { + sameVersion: { old: string; new: string }[]; + crossVersion: { old: string; new: string }[]; + }, +) { + if (changedFiles.additions !== undefined) { + changedFiles.additions = changedFiles.additions?.map((p) => serviceParent + p); + } + if (changedFiles.modifications !== undefined) { + changedFiles.modifications = changedFiles.modifications?.map((p) => serviceParent + p); + } + if (changedFiles.deletions !== undefined) { + changedFiles.deletions = changedFiles.deletions?.map((p) => serviceParent + p); + } + if (changedFiles.renames !== undefined) { + changedFiles.renames = changedFiles.renames?.map((r) => ({ + from: serviceParent + r.from, + to: serviceParent + r.to, + })); + } + + expectedCreateDummySwaggers.old = expectedCreateDummySwaggers.old.map((p) => serviceParent + p); + expectedCreateDummySwaggers.new = expectedCreateDummySwaggers.new.map((p) => serviceParent + p); + + expectedOadCalls.sameVersion = expectedOadCalls.sameVersion.map((c) => ({ + old: serviceParent + c.old, + new: serviceParent + c.new, + })); + expectedOadCalls.crossVersion = expectedOadCalls.crossVersion.map((c) => ({ + old: serviceParent + c.old, + new: serviceParent + c.new, + })); +} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-02-01-preview/bar.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-02-01-preview/bar.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-02-01-preview/bar.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-02-01-preview/baz.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-02-01-preview/baz.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-02-01-preview/baz.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-04-01-preview/bar.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-04-01-preview/bar.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-04-01-preview/bar.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-04-01-preview/baz.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-04-01-preview/baz.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/preview/2025-04-01-preview/baz.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/readme.md b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/readme.md new file mode 100644 index 000000000000..68a0c931a3c1 --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/readme.md @@ -0,0 +1,54 @@ +# Bar + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Bar. + +## Configuration + +### Basic Information + +```yaml +openapi-type: data-plane +tag: package-2025-03-01 +``` + +### Tag: package-2025-03-01 + +These settings apply only when `--tag=package-2025-03-01` is specified on the command line. + +```yaml $(tag) == 'package-2025-03-01' +input-file: + - stable/2025-03-01/bar.json + - stable/2025-03-01/baz.json +``` + +### Tag: package-2025-01-01 + +These settings apply only when `--tag=package-2025-01-01` is specified on the command line. + +```yaml $(tag) == 'package-2025-01-01' +input-file: + - stable/2025-01-01/bar.json + - stable/2025-01-01/baz.json +``` + +### Tag: package-2025-04-01-preview + +These settings apply only when `--tag=package-2025-04-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2025-04-01-preview' +input-file: + - preview/2025-04-01-preview/bar.json + - preview/2025-04-01-preview/baz.json +``` + +### Tag: package-2025-02-01-preview + +These settings apply only when `--tag=package-2025-02-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2025-02-01-preview' +input-file: + - preview/2025-02-01-preview/bar.json + - preview/2025-02-01-preview/baz.json +``` \ No newline at end of file diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-01-01/bar.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-01-01/bar.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-01-01/bar.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-01-01/baz.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-01-01/baz.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-01-01/baz.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-03-01/bar.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-03-01/bar.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-03-01/bar.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-03-01/baz.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-03-01/baz.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Bar/stable/2025-03-01/baz.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/preview/2025-02-01-preview/foo.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/preview/2025-02-01-preview/foo.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/preview/2025-02-01-preview/foo.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/preview/2025-04-01-preview/foo.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/preview/2025-04-01-preview/foo.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/preview/2025-04-01-preview/foo.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/readme.md b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/readme.md new file mode 100644 index 000000000000..3ed7b0f26309 --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/readme.md @@ -0,0 +1,50 @@ +# Foo + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Foo. + +## Configuration + +### Basic Information + +```yaml +openapi-type: data-plane +tag: package-2025-03-01 +``` + +### Tag: package-2025-03-01 + +These settings apply only when `--tag=package-2025-03-01` is specified on the command line. + +```yaml $(tag) == 'package-2025-03-01' +input-file: + - stable/2025-03-01/foo.json +``` + +### Tag: package-2025-01-01 + +These settings apply only when `--tag=package-2025-01-01` is specified on the command line. + +```yaml $(tag) == 'package-2025-01-01' +input-file: + - stable/2025-01-01/foo.json +``` + +### Tag: package-2025-04-01-preview + +These settings apply only when `--tag=package-2025-04-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2025-04-01-preview' +input-file: + - preview/2025-04-01-preview/foo.json +``` + +### Tag: package-2025-02-01-preview + +These settings apply only when `--tag=package-2025-02-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2025-02-01-preview' +input-file: + - preview/2025-02-01-preview/foo.json +``` \ No newline at end of file diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/stable/2025-01-01/foo.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/stable/2025-01-01/foo.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/stable/2025-01-01/foo.json @@ -0,0 +1 @@ +{} diff --git a/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/stable/2025-03-01/foo.json b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/stable/2025-03-01/foo.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/eng/tools/openapi-diff-runner/test/fixtures/specification/foo/data-plane/Foo/stable/2025-03-01/foo.json @@ -0,0 +1 @@ +{}