Debian Codegraph @

test/integration/testdata/namedmodels/struct.go

raw
1 package namedmodels
2
3 // +k8s:openapi-model-package=io.k8s.kube-openapi.test.integration.testdata.namedmodels
4 type Struct struct { // The generator should see the +k8s:openapi-model-package and assume that a OpenAPIModelName is (or will be) generated.
5 Field ContainedStruct
6 OtherField int
7 }
8
9 type ContainedStruct struct{} // The generator should use the go package name since there is no OpenAPIModelName declared.
10
11 type AtomicStruct struct { // The generator should respect a manually declared OpenAPIModelName.
12 Field int
13 }
14
15 // OpenAPIModelName returns the OpenAPI model name for this type.
16 func (in AtomicStruct) OpenAPIModelName() string {
17 return "io.k8s.kube-openapi.test.integration.testdata.namedmodels.AtomicStruct"
18 }