Skip to content

Conversation

Anmol1696
Copy link
Contributor

This pull request introduces a new release (0.15.0) of the schema-sdk package with several improvements to the OpenAPI TypeScript client generation, including enhanced handling of Kubernetes resource types and support for JSON patching in schema transformations. The most significant changes are the addition of new Kubernetes API interfaces, improved logic for type naming and GVK (Group-Version-Kind) mapping, and expanded test coverage for JSON patch operations.

Kubernetes API Type Additions

  • Added multiple new Kubernetes API interfaces to the generated TypeScript client, including EventsK8sIoV1Event, IoK8sApiEventsV1EventSeries, and a comprehensive set of flow control and priority level configuration types. These additions improve coverage for Kubernetes event and flow control resources. [1] [2] [3]

Type Naming and GVK Mapping Improvements

  • Enhanced the generateQualifiedTypeName function to better handle List types by using the definition name to determine if a type is a List, resulting in more accurate and consistent type names for both core and non-core resources. [1] [2]
  • Improved GVK association logic in both generateGVKOpsStatements and buildInterfaceRenameMapFromSchema to ensure that GVKs are mapped to both base and List definitions, preventing loss of associations for List types. [1] [2]

JSON Patch Support and Testing

  • Added new tests to verify JSON patch support in schema transformation, including conditional patching and error handling for non-existent paths. This ensures the client generator can flexibly modify schemas and robustly report patch failures.

Test and Fixture Updates

  • Updated test fixtures and removed exclusions for newly supported Kubernetes types, allowing these resources to be included in generated clients and tested for correctness.

Release and Versioning

  • Bumped the package version to 0.15.0 and updated the changelog to reflect the new release. [1] [2]

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.

1 participant