Skip to content

Conversation

@pengying
Copy link
Contributor

@pengying pengying commented Jan 24, 2026

Grid API SDK Configuration

  • Add .stainless/stainless.yml and workspace.json for SDK generation
  • Add AllErrors schema to properly handle error types
  • Replace Error schema references with GridError
  • Fix phone number format in UltimateBeneficialOwner to include '+' prefix
  • Update .redocly.lint-ignore.yaml with additional rule exceptions
  • Fix internal_accounts schema reference path

@greptile-apps
Copy link

greptile-apps bot commented Jan 24, 2026

Greptile Overview

Greptile Summary

This PR adds comprehensive Stainless SDK configuration for TypeScript and Kotlin code generation, along with several OpenAPI schema improvements. The changes introduce a new AllErrors schema that consolidates all error types with proper discriminator support, enabling better SDK error handling. The schema renaming from Error to GridError resolves a naming conflict while maintaining consistency. Additionally, minor fixes include correcting the InternalAccount schema reference path and adding quotes to the phone number example in UltimateBeneficialOwner for proper YAML formatting.

Key changes:

  • Added .stainless/stainless.yml with complete resource mappings, authentication config, and error handling setup for SDK generation
  • Added .stainless/workspace.json to configure SDK output paths
  • Introduced AllErrors union schema for comprehensive error type support with discriminator
  • Renamed Error schema to GridError to avoid naming conflicts and added additionalProperties: true to error details
  • Fixed internal_accounts.yaml schema reference from users/InternalAccount.yaml to customers/InternalAccount.yaml
  • Fixed phone number example formatting in UltimateBeneficialOwner.yaml
  • Updated .redocly.lint-ignore.yaml with exceptions for new schemas

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All changes are configuration and schema improvements that enhance SDK generation capabilities without affecting runtime behavior. The fixes correct invalid schema references and formatting issues. No logic changes or breaking modifications detected.
  • No files require special attention

Important Files Changed

Filename Overview
.stainless/stainless.yml New comprehensive Stainless SDK configuration for TypeScript and Kotlin targets with complete resource mappings and error handling
.stainless/workspace.json New workspace configuration file for Stainless SDK generation pointing to OpenAPI spec and TypeScript output directory
openapi/openapi.yaml Added AllErrors schema union of all error types for SDK generation with proper discriminator support
openapi/paths/customers/customers_{customerId}.yaml Fixed error response reference from Error.yaml to GridError.yaml for 410 status code
openapi/paths/internal-accounts/internal_accounts.yaml Corrected InternalAccount schema path from users/InternalAccount.yaml to customers/InternalAccount.yaml

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Stainless as Stainless SDK Generator
    participant Config as stainless.yml
    participant OpenAPI as OpenAPI Spec
    participant SDK as Generated SDK

    Dev->>Config: Configure SDK targets (TypeScript, Kotlin)
    Dev->>Config: Define resources & error handling
    Dev->>OpenAPI: Add AllErrors union schema
    Dev->>OpenAPI: Rename Error to GridError
    Dev->>OpenAPI: Fix schema references
    
    Stainless->>Config: Read SDK configuration
    Stainless->>OpenAPI: Parse OpenAPI specification
    Stainless->>OpenAPI: Apply transformations (splitSchemasByEnumProperty)
    Note over Stainless,OpenAPI: Split AllErrors by code discriminator
    
    Stainless->>SDK: Generate TypeScript client
    Stainless->>SDK: Generate Kotlin client
    SDK->>SDK: Include typed error classes
    SDK->>SDK: Map resources to SDK methods
    
    Note over SDK: SDK now has proper error types<br/>and correct schema references
Loading

@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from 6432728 to e5749d2 Compare January 27, 2026 01:29
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from 21d334e to f90918a Compare January 27, 2026 01:29
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from e5749d2 to a27f6e6 Compare January 27, 2026 05:19
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from f90918a to c6b215b Compare January 27, 2026 05:19
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from a27f6e6 to a1379cd Compare January 27, 2026 05:24
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from c6b215b to 6464d8a Compare January 27, 2026 05:25
- Add .stainless/stainless.yml and workspace.json
- Add AllErrors schema and remove retry quotes endpoint
- Update .redocly.lint-ignore.yaml
- Fix UltimateBeneficialOwner phone format
- Fix internal_accounts ref path
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from a1379cd to d0f0475 Compare January 27, 2026 20:38
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from 6464d8a to 2d0527c Compare January 27, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants