package openapi
import "k8s.io/apiserver/pkg/endpoints/openapi"
Index ¶
- func GetOperationIDAndTags(r *restful.Route) (string, []string, error)
- func ToValidOperationID(s string, capitalizeFirstLetter bool) string
- type DefinitionNamer
Functions ¶
func GetOperationIDAndTags ¶
GetOperationIDAndTags returns a customize operation ID and a list of tags for kubernetes API server's OpenAPI spec to prevent duplicate IDs.
func ToValidOperationID ¶
ToValidOperationID makes an string a valid op ID (e.g. removing punctuations and whitespaces and make it camel case)
Types ¶
type DefinitionNamer ¶
type DefinitionNamer struct {
// contains filtered or unexported fields
}
DefinitionNamer is the type to customize OpenAPI definition name.
func NewDefinitionNamer ¶
func NewDefinitionNamer(schemes ...*runtime.Scheme) *DefinitionNamer
NewDefinitionNamer constructs a new DefinitionNamer to be used to customize OpenAPI spec.
func (*DefinitionNamer) GetDefinitionName ¶
func (d *DefinitionNamer) GetDefinitionName(name string) (string, spec.Extensions)
GetDefinitionName returns the name and tags for a given definition
Source Files ¶
openapi.go
Directories ¶
Path | Synopsis |
---|---|
pkg/endpoints/openapi/testing |
- Version
- v0.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 7 hours ago –
Tools for package owners.