Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.9.6"
".": "0.9.7"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 37
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-cf9805637aaf9bf590b5ebc1e7430414850aff0c8ad727a017df290ea8df9913.yml
openapi_spec_hash: e27144cf0b24dc74fbdb77d8e24d818f
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-0541294848c0b8de2c31a105855c740dc98d1480dd27a20a52d7bc291ba001d8.yml
openapi_spec_hash: 03714883bdadb4a6a743a7faec477a05
config_hash: d67a314ba1fda8242041000fc9160e92
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.9.7 (2026-02-11)

Full Changelog: [v0.9.6...v0.9.7](https://github.com/kernel/hypeman-go/compare/v0.9.6...v0.9.7)

### Bug Fixes

* **encoder:** correctly serialize NullStruct ([e693834](https://github.com/kernel/hypeman-go/commit/e693834704b3541d4a5f260b547026bae8a19b1b))


### Refactors

* cross-platform foundation for macOS support ([8adc4f3](https://github.com/kernel/hypeman-go/commit/8adc4f38026abee34ad85c15509e90f47644a0d0))

## 0.9.6 (2026-01-30)

Full Changelog: [v0.9.0...v0.9.6](https://github.com/kernel/hypeman-go/compare/v0.9.0...v0.9.6)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/kernel/hypeman-go@v0.9.6'
go get -u 'github.com/kernel/hypeman-go@v0.9.7'
```

<!-- x-release-please-end -->
Expand Down
6 changes: 4 additions & 2 deletions instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ type Instance struct {
HotplugSize string `json:"hotplug_size"`
// Hypervisor running this instance
//
// Any of "cloud-hypervisor", "qemu".
// Any of "cloud-hypervisor", "qemu", "vz".
Hypervisor InstanceHypervisor `json:"hypervisor"`
// Network configuration of the instance
Network InstanceNetwork `json:"network"`
Expand Down Expand Up @@ -301,6 +301,7 @@ type InstanceHypervisor string
const (
InstanceHypervisorCloudHypervisor InstanceHypervisor = "cloud-hypervisor"
InstanceHypervisorQemu InstanceHypervisor = "qemu"
InstanceHypervisorVz InstanceHypervisor = "vz"
)

// Network configuration of the instance
Expand Down Expand Up @@ -472,7 +473,7 @@ type InstanceNewParams struct {
GPU InstanceNewParamsGPU `json:"gpu,omitzero"`
// Hypervisor to use for this instance. Defaults to server configuration.
//
// Any of "cloud-hypervisor", "qemu".
// Any of "cloud-hypervisor", "qemu", "vz".
Hypervisor InstanceNewParamsHypervisor `json:"hypervisor,omitzero"`
// Network configuration for the instance
Network InstanceNewParamsNetwork `json:"network,omitzero"`
Expand Down Expand Up @@ -510,6 +511,7 @@ type InstanceNewParamsHypervisor string
const (
InstanceNewParamsHypervisorCloudHypervisor InstanceNewParamsHypervisor = "cloud-hypervisor"
InstanceNewParamsHypervisorQemu InstanceNewParamsHypervisor = "qemu"
InstanceNewParamsHypervisorVz InstanceNewParamsHypervisor = "vz"
)

// Network configuration for the instance
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "0.9.6" // x-release-please-version
const PackageVersion = "0.9.7" // x-release-please-version
3 changes: 3 additions & 0 deletions packages/param/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func MarshalUnion[T ParamStruct](metadata T, variants ...any) ([]byte, error) {
}
}
if nPresent == 0 || presentIdx == -1 {
if metadata.null() {
return []byte("null"), nil
}
if ovr, ok := metadata.Overrides(); ok {
return shimjson.Marshal(ovr)
}
Expand Down
12 changes: 12 additions & 0 deletions packages/param/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,15 @@ func TestOverriddenUnion(t *testing.T) {
})
}
}

func TestNullStructUnion(t *testing.T) {
nullUnion := param.NullStruct[PrimitiveUnion]()

b, err := json.Marshal(nullUnion)
if err != nil {
t.Fatalf("didn't expect error %v", err)
}
if string(b) != "null" {
t.Fatalf("expected null, received %s", string(b))
}
}