1// The package is intended for testing the openapi-gen API rule 2// checker. The API rule violations are in format of: 3// 4// `{rule-name},{package},{type},{(optional) field}` 5// 6// The checker should sort the violations before 7// reporting to a file or stderr. 8// 9// We have the dummytype package separately from the listtype 10// package to test the sorting behavior on package level, e.g. 11// 12// -i "./testdata/listtype,./testdata/dummytype" 13// -i "./testdata/dummytype,./testdata/listtype" 14// 15// The violations from dummytype should always come first in 16// report. 17 18package dummytype 19 20// +k8s:openapi-gen=true 21type Foo struct { 22 Second string 23 First int 24} 25 26// +k8s:openapi-gen=true 27type Bar struct { 28 ViolationBehind bool 29 Violation bool 30} 31 32// +k8s:openapi-gen=true 33type Baz struct { 34 Violation bool 35 ViolationBehind bool 36} 37