mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Add note about type comments to API changes doc
This commit is contained in:
parent
775369a8f1
commit
90df71e5a5
@ -320,7 +320,8 @@ before starting "all the rest".
|
|||||||
The struct definitions for each API are in `pkg/api/<version>/types.go`. Edit
|
The struct definitions for each API are in `pkg/api/<version>/types.go`. Edit
|
||||||
those files to reflect the change you want to make. Note that all types and non-inline
|
those files to reflect the change you want to make. Note that all types and non-inline
|
||||||
fields in versioned APIs must be preceded by descriptive comments - these are used to generate
|
fields in versioned APIs must be preceded by descriptive comments - these are used to generate
|
||||||
documentation.
|
documentation. Comments for types should not contain the type name; API documentation is
|
||||||
|
generated from these comments and end-users should not be exposed to golang type names.
|
||||||
|
|
||||||
Optional fields should have the `,omitempty` json tag; fields are interpreted as being
|
Optional fields should have the `,omitempty` json tag; fields are interpreted as being
|
||||||
required otherwise.
|
required otherwise.
|
||||||
|
Loading…
Reference in New Issue
Block a user