Commit Graph

8 Commits

Author SHA1 Message Date
Ayr Loong
f1125e9435 Implementing a more modular API (#1627)
* fix typo

* Add modular API

* Use x-kubernetes-action instead of operationId to generate method names

* fix

* Clean code style warnings

* Refactor client constructors to use Kubernetes type instead of IKubernetes

* Add ClientSet tests for Kubernetes pod operations

* Fix order of parameters in Pod API calls for consistency

* Enhance documentation for ClientSet and ResourceClient classes

* Refactor ClientSet and GroupClient for Kubernetes usage

* Refactor Pod API calls in tests to use singular form for consistency

* Refactor Pod API calls to use 'Create' and 'Update' methods for consistency
2025-05-22 00:56:39 -07:00
Boshi Lian
001189de77 Version 17.0 + Generate 1.33 (#1626)
* generated based on 1.33

* Update version to 17.0 in version.json

* Remove extra API endpoint from swagger.json

* Remove ModelConverter and related AutoMapper components

* Update package versions

* Refactor code to use ConfigureAwait(false) for asynchronous calls and update target framework to net9.0

* Remove ConfigureAwait(false) from OidcAuthTests for consistency in async calls

* Update SDK version in README to reflect support for net8.0 and net9.0

* Update dotnet SDK version to 9.0.x in build workflow

* Revert Fractions package version to 7.3.0 in Directory.Packages.props

* Update target framework to netstandard2.1 for improved compatibility

* Update package references for Microsoft.CodeAnalysis in Directory.Packages.props and LibKubernetesGenerator.target

* Refactor Worker class constructor documentation and standardize Dictionary type declaration in Program.cs
2025-04-27 12:55:24 -07:00
Eric Erhardt
dfdf0b70d2 Remove IdentityModel package versions from Directory.Packages.props (#1625)
* Remove IdentityModel package versions from Directory.Packages.props

* Remove IdentityModel references from KubernetesClient.Classic.
2025-04-22 11:43:41 -07:00
Brendan Burns
27d706d21e Add tests to #1618 (#1621)
* Refactor OidcTokenProvider to remove dependency on IdentityModel and improve token handling

* Improve OidcTokenProvider error handling and expiry setting

The constructor `OidcTokenProvider` now always sets the `_expiry`
field by calling `GetExpiryFromToken()`, regardless of whether
`_idToken` is null or empty, removing the previous check for a
non-empty `_idToken`.

The `GetExpiryFromToken` method has been updated to handle invalid
JWT token formats more gracefully. Instead of throwing an
`ArgumentException` when the token format is invalid or when the
'exp' claim is missing, the method now returns a default value.

The logic for parsing the JWT token and extracting the 'exp' claim
has been wrapped in a try-catch block. If any exception occurs
during this process, it is caught, and the method returns a default
value instead of throwing an exception.

* Refactor parts initialization inside try block

Moved the initialization of the `parts` variable, which splits the `_idToken` string, inside the `try` block. Removed the previous check for exactly three elements in the `parts` array and the default return value if the check failed.

* Add tests.

---------

Co-authored-by: Boshi Lian <farmer1992@gmail.com>
2025-04-17 10:13:07 -07:00
Boshi Lian
f7e7613d09 generate api v1.32 (#1603)
* generate based on v1.32

* bump ver

* Delete swagger.json.unprocessed

* Update target frameworks and SDK versions in project files

* Remove extra API endpoint from swagger.json

* Update .NET SDK version to 9.0.x and adjust package references

* happy build

* Enhance certificate handling for .NET 9.0 compatibility in CertUtils and KubernetesClientConfiguration

* Add mapping for V1beta1ResourceClaim to V1ResourceClaim in AutoMapper configurations

* Refactor certificate loading to improve compatibility with .NET 9.0

* Update package versions in Directory.Packages.props for improved compatibility and features

* Update Fractions package version to 7.3.0 for improved compatibility
2025-01-07 16:12:29 +01:00
Boshi Lian
f5fee73cfe generate v1.31.0 api (#1579)
* first gen

* bump ver

* fix build

* fix package version

* fix test
2024-09-10 17:36:13 +01:00
Ivan Josipovic
36a0204643 feat: yamldotnet 16 support (#1574)
* feat: yamldotnet 16 support

* update yamldotnet

* fix interface

* update Vecc.YamlDotNet.Analyzers.StaticGenerator
2024-08-11 13:21:59 -07:00
Weihan Li
007ef8946c init cpm support (#1565)
* feat: init cpm support

* remove dotnet-xunit DotNetCliToolReference

* use VersionOverride for compatibility
2024-06-15 21:41:28 -07:00