Root module path. Use sdkPackageName to configure the package clause for the root module package. Go Module Path documentation.
Default Value
github.com/my-company/company-go-sdk
sdkPackageName
Required
true
Description
Root module package name written in the package clause. Determines the package naming in consuming code if the modulePath does not end with a valid identifier. Go Packages documentation.
Default Value
company
packageName
Required
false
Description
Legacy combined root module path and SDK package naming. Use sdkPackageAlias to update SDK package import aliases in documentation while preserving major version compatibility, otherwise migrate to modulePath and sdkPackageName. Go Module Path documentation.
Default Value
sdkPackageAlias
Required
false
Description
Root module package import alias for documentation. Use this to preserve compatibility if the SDK has already had a stable major version release with modulePath, packageName, or sdkPackageName, as the package clause determines package naming in consuming code if the import path does not end in a valid identifier. Go Packages documentation.
Default Value
openapi
Name
Required
Default Value
Description
version
true
0.0.1
The current version of the SDK.
modulePath
true
github.com/my-company/company-go-sdk
Root module path. Use sdkPackageName to configure the package clause for the root module package. Go Module Path documentation.
sdkPackageName
true
company
Root module package name written in the package clause. Determines the package naming in consuming code if the modulePath does not end with a valid identifier. Go Packages documentation.
packageName
false
Legacy combined root module path and SDK package naming. Use sdkPackageAlias to update SDK package import aliases in documentation while preserving major version compatibility, otherwise migrate to modulePath and sdkPackageName. Go Module Path documentation.
sdkPackageAlias
false
openapi
Root module package import alias for documentation. Use this to preserve compatibility if the SDK has already had a stable major version release with modulePath, packageName, or sdkPackageName, as the package clause determines package naming in consuming code if the import path does not end in a valid identifier. Go Packages documentation.
You can use retractions to mark specific versions of your Go module as unsuitable for use. Each retraction requires a version and can optionally include a comment explaining why the version was retracted.
go:
retractions:
- version: v1.0.0
comment: Published accidentally
- version: v1.0.1
Name
version
Required
true
Description
The version to retract. Must be a valid semantic version.
Default Value
comment
Required
false
Description
Optional comment explaining why the version was retracted.
Default Value
Name
Required
Default Value
Description
version
true
The version to retract. Must be a valid semantic version.
comment
false
Optional comment explaining why the version was retracted.
Set values using helper constructors on OptionalNullable and retrieve values via Get(), which returns (*T, bool) — ok indicates presence, and a nil pointer indicates an explicit null value:
// Set a present, non-null value
pet :=shared.Pet{}
nickname :="Finn"
pet.Nickname = optionalnullable.From(&nickname)
// Read a value
if val, ok := pet.Nickname.Get(); ok {
if val ==nil {
fmt.Println("nickname is explicitly null")
} else {
fmt.Println("nickname:", *val)
}
} else {
fmt.Println("nickname not set")
}
Enabling this flag changes the generated field type and how values are set and read. This is a breaking change for existing SDKs and requires migrating code that accessed those fields directly or through pointer checks to use optionalnullable.From(...) and .Get().