Skip to content

Conversation

@ampersand-ops
Copy link
Collaborator

This updates the dependency to version 27560f51ea2ed4830bba01e3ec3493e09111ef0a from main

@ampersand-ops ampersand-ops added the openapi The PR updates OpenAPI definitions label Feb 3, 2026
Comment on lines +28 to +55
export interface PatchObjectConfigContentRequest {
/**
* The ID of the user group that has access to this installation.
* Either groupRef or installationId must be provided.
* @type {string}
* @memberof PatchObjectConfigContentRequest
*/
groupRef: string;
/**
* The action type for the object config (read, subscribe, or write).
* @type {string}
* @memberof PatchObjectConfigContentRequest
*/
action: PatchObjectConfigContentRequestActionEnum;
/**
* Array of JSON Patch operations to apply.
* @type {Array<JSONPatchOperation>}
* @memberof PatchObjectConfigContentRequest
*/
changes: Array<JSONPatchOperation>;
/**
* The installation ID.
* Either groupRef or installationId must be provided.
* @type {string}
* @memberof PatchObjectConfigContentRequest
*/
installationId: string;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interface requires both groupRef and installationId as mandatory fields (non-optional), but the documentation states "Either groupRef or installationId must be provided." This creates an impossible constraint where callers must provide both fields when they should only provide one.

// Current (broken) - requires BOTH:
export interface PatchObjectConfigContentRequest {
    groupRef: string;  // not optional
    action: PatchObjectConfigContentRequestActionEnum;
    changes: Array<JSONPatchOperation>;
    installationId: string;  // not optional
}

// Should be (one of these approaches):
// Option 1: Make them optional
export interface PatchObjectConfigContentRequest {
    groupRef?: string;
    action: PatchObjectConfigContentRequestActionEnum;
    changes: Array<JSONPatchOperation>;
    installationId?: string;
}

// Option 2: Use a discriminated union type

This will cause runtime failures when API calls are made with only one identifier, as TypeScript will require both fields to be present.

Suggested change
export interface PatchObjectConfigContentRequest {
/**
* The ID of the user group that has access to this installation.
* Either groupRef or installationId must be provided.
* @type {string}
* @memberof PatchObjectConfigContentRequest
*/
groupRef: string;
/**
* The action type for the object config (read, subscribe, or write).
* @type {string}
* @memberof PatchObjectConfigContentRequest
*/
action: PatchObjectConfigContentRequestActionEnum;
/**
* Array of JSON Patch operations to apply.
* @type {Array<JSONPatchOperation>}
* @memberof PatchObjectConfigContentRequest
*/
changes: Array<JSONPatchOperation>;
/**
* The installation ID.
* Either groupRef or installationId must be provided.
* @type {string}
* @memberof PatchObjectConfigContentRequest
*/
installationId: string;
}
export interface PatchObjectConfigContentRequest {
/**
* The ID of the user group that has access to this installation.
* Either groupRef or installationId must be provided.
* @type {string}
* @memberof PatchObjectConfigContentRequest
*/
groupRef?: string;
/**
* The action type for the object config (read, subscribe, or write).
* @type {string}
* @memberof PatchObjectConfigContentRequest
*/
action: PatchObjectConfigContentRequestActionEnum;
/**
* Array of JSON Patch operations to apply.
* @type {Array<JSONPatchOperation>}
* @memberof PatchObjectConfigContentRequest
*/
changes: Array<JSONPatchOperation>;
/**
* The installation ID.
* Either groupRef or installationId must be provided.
* @type {string}
* @memberof PatchObjectConfigContentRequest
*/
installationId?: string;
}

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +72 to +79
export function instanceOfPatchObjectConfigContentRequest(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "groupRef" in value;
isInstance = isInstance && "action" in value;
isInstance = isInstance && "changes" in value;
isInstance = isInstance && "installationId" in value;

return isInstance;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validation function checks that both groupRef AND installationId are present, contradicting the documented behavior that only one should be provided. This will cause valid requests to fail validation.

// Current (broken):
export function instanceOfPatchObjectConfigContentRequest(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "groupRef" in value;  // requires groupRef
    isInstance = isInstance && "action" in value;
    isInstance = isInstance && "changes" in value;
    isInstance = isInstance && "installationId" in value;  // AND installationId
    return isInstance;
}

// Should be:
export function instanceOfPatchObjectConfigContentRequest(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && ("groupRef" in value || "installationId" in value);  // OR
    isInstance = isInstance && "action" in value;
    isInstance = isInstance && "changes" in value;
    return isInstance;
}
Suggested change
export function instanceOfPatchObjectConfigContentRequest(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "groupRef" in value;
isInstance = isInstance && "action" in value;
isInstance = isInstance && "changes" in value;
isInstance = isInstance && "installationId" in value;
return isInstance;
export function instanceOfPatchObjectConfigContentRequest(value: object): boolean {
let isInstance = true;
isInstance = isInstance && ("groupRef" in value || "installationId" in value);
isInstance = isInstance && "action" in value;
isInstance = isInstance && "changes" in value;
return isInstance;
}

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@dionlow dionlow closed this Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

openapi The PR updates OpenAPI definitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants