Skip to content

Commit 37c0add

Browse files
fix(api): switch 'targets' query param to comma-delimited string in diagnostics endpoint
1 parent 051f2ac commit 37c0add

File tree

4 files changed

+7
-29
lines changed

4 files changed

+7
-29
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 20
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-98ef57608e3e36cd34a8380ab4dc705a355cd313f8f4914ed8bddd2c6284a5fd.yml
3-
openapi_spec_hash: f697a51d97a3013f615dfc4ea73836b0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless%2Fstainless-v0-36086d31791dca6112f0c79f44f296d0cdea35df74f4b3b725f86296a51a86fd.yml
3+
openapi_spec_hash: 0ac69304e57ec27533774ed339a44314
44
config_hash: 8563083ae1fa5c137476fb1237aa8ea9

packages/mcp-server/src/tools/builds/diagnostics/list-builds-diagnostics.ts

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ export const tool: Tool = {
3939
enum: ['fatal', 'error', 'warning', 'note'],
4040
},
4141
targets: {
42-
type: 'array',
43-
description: 'Optional list of language targets to filter diagnostics by',
44-
items: {
45-
$ref: '#/$defs/target',
46-
},
42+
type: 'string',
43+
description: 'Optional comma-delimited list of language targets to filter diagnostics by',
4744
},
4845
jq_filter: {
4946
type: 'string',
@@ -53,24 +50,6 @@ export const tool: Tool = {
5350
},
5451
},
5552
required: ['buildId'],
56-
$defs: {
57-
target: {
58-
type: 'string',
59-
enum: [
60-
'node',
61-
'typescript',
62-
'python',
63-
'go',
64-
'java',
65-
'kotlin',
66-
'ruby',
67-
'terraform',
68-
'cli',
69-
'php',
70-
'csharp',
71-
],
72-
},
73-
},
7453
},
7554
annotations: {
7655
readOnlyHint: true,

src/resources/builds/diagnostics.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../../core/resource';
4-
import * as Shared from '../shared';
54
import { Page, type PageParams, PagePromise } from '../../core/pagination';
65
import { RequestOptions } from '../../internal/request-options';
76
import { path } from '../../internal/utils/path';
@@ -89,9 +88,9 @@ export interface DiagnosticListParams extends PageParams {
8988
severity?: 'fatal' | 'error' | 'warning' | 'note';
9089

9190
/**
92-
* Optional list of language targets to filter diagnostics by
91+
* Optional comma-delimited list of language targets to filter diagnostics by
9392
*/
94-
targets?: Array<Shared.Target>;
93+
targets?: string;
9594
}
9695

9796
export declare namespace Diagnostics {

tests/api-resources/builds/diagnostics.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('resource diagnostics', () => {
2626
await expect(
2727
client.builds.diagnostics.list(
2828
'buildId',
29-
{ cursor: 'cursor', limit: 1, severity: 'fatal', targets: ['node'] },
29+
{ cursor: 'cursor', limit: 1, severity: 'fatal', targets: 'targets' },
3030
{ path: '/_stainless_unknown_path' },
3131
),
3232
).rejects.toThrow(Stainless.NotFoundError);

0 commit comments

Comments
 (0)