File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
eng/pipelines/templates/jobs
sdk/clientcore/annotation-processor Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -346,17 +346,21 @@ jobs:
346346 CheckLinkGuidance : $true
347347
348348 - ${{ if and(eq(variables['Build.Reason'], 'PullRequest'), eq(parameters.ServiceDirectory, 'auto')) }} :
349- # NOTE: The PRServiceDirectories string is used in the two Code Generation steps below
349+ # NOTE: The PRServiceDirectories string is used in the two Code Generation steps below and
350+ # the verify samples
350351 - pwsh : |
351- $diffJson = Get-Content '$(Build.ArtifactStagingDirectory)/diff/diff .json' -Raw
352- $diff = ConvertFrom-Json $diffJson
353- $changedServicesString = ''
354- if ($diff.ChangedServices) {
355- $changedServicesString = $diff.ChangedServices -join ","
352+ $packageInfoFiles = Get-ChildItem -Path '$(Build.ArtifactStagingDirectory)/PackageInfo' -Filter "* .json" -File
353+ $serviceDirectories = @()
354+ foreach ($packageInfoFile in $packageInfoFiles) {
355+ $packageInfo = Get-Content -Path $packageInfoFile | ConvertFrom-Json
356+ $serviceDirectories + = $packageInfo.ServiceDirectory
356357 }
358+ # dedupe the list
359+ $serviceDirectories = $serviceDirectories | Select-Object -Unique
360+ $changedServicesString = $serviceDirectories -join ","
357361 Write-Host "changedServicesString='$changedServicesString'"
358362 Write-Host "##vso[task.setvariable variable=PRServiceDirectories;]$changedServicesString"
359- displayName: Set PRServiceDirectories from PR diff
363+ displayName: Set PRServiceDirectories from PackageInfo files
360364 - ${{ else }} :
361365 - pwsh : |
362366 $changedServicesString='${{ parameters.ServiceDirectory }}'
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ The client-core annotation processor for introducing compile-time code generatio
5656 ```
57572 . Annotate your interfaces with ` @ServiceInterface ` , ` @HttpRequestInformation ` and
5858 ` @UnexpectedResponseExceptionDetail ` such annotations:
59- ``` java
59+ ``` java
6060 @ServiceInterface (name = " ExampleClient" , host = " {endpoint}/example" )
6161 public interface ExampleService {
6262 @HttpRequestInformation (method = HttpMethod . GET , path = " /user/{userId}" , expectedStatusCodes = { 200 })
@@ -89,7 +89,7 @@ The client-core annotation processor for introducing compile-time code generatio
8989 public HttpPipeline getPipeline () {
9090 return defaultPipeline;
9191 }
92-
92+
9393 public Response<BinaryData > getUser (String userId , Context context ) {
9494 return getUser(endpoint, apiVersion, userId, context);
9595 }
@@ -119,7 +119,7 @@ The client-core annotation processor for introducing compile-time code generatio
119119 if (! expectedResponse) {
120120 throw new RuntimeException (" Unexpected response code: " + responseCode);
121121 }
122-
122+
123123 networkResponse. close();
124124 return networkResponse;
125125 }
You can’t perform that action at this time.
0 commit comments