|
| 1 | +// Copyright 2015 go-swagger maintainers |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +//go:build testscanner |
| 16 | + |
| 17 | +package schema |
| 18 | + |
| 19 | +// swagger:model void |
| 20 | +type Void = Empty |
| 21 | + |
| 22 | +// swagger:model empty_redefinition |
| 23 | +type EmptyRedefinition struct{} |
| 24 | + |
| 25 | +// swagger:model anonymous_struct |
| 26 | +type AnonymousStruct struct { |
| 27 | + A struct { |
| 28 | + B int |
| 29 | + } |
| 30 | +} |
| 31 | + |
| 32 | +// swagger:model whatnot |
| 33 | +type WhatNot any |
| 34 | + |
| 35 | +// swagger:model aliased_id |
| 36 | +type AliasedID = ExtendedID |
| 37 | + |
| 38 | +// swagger:model whatnot_alias |
| 39 | +type WhatNotAlias = any |
| 40 | + |
| 41 | +// swagger:model iface |
| 42 | +type Iface interface { |
| 43 | + Get() string |
| 44 | + Set(string) |
| 45 | +} |
| 46 | + |
| 47 | +// swagger:model iface_alias |
| 48 | +type IfaceAlias = Iface |
| 49 | + |
| 50 | +// swagger:model iface_redefinition |
| 51 | +type IfaceRedefinition Iface |
| 52 | + |
| 53 | +// swagger:model anonymous_iface |
| 54 | +type AnonymousIface interface{ String() string } |
| 55 | + |
| 56 | +// swagger:model anonymous_iface_alias |
| 57 | +type AnonymousIfaceAlias = AnonymousIface |
| 58 | + |
| 59 | +// swagger:model whatnot2 |
| 60 | +// |
| 61 | +// This is a type redefinition. |
| 62 | +type WhatNot2 interface{} |
| 63 | + |
| 64 | +// swagger:model whatnot2_alias |
| 65 | +// |
| 66 | +// This is a syntactic alias. |
| 67 | +type WhatNot2Alias = interface{} |
| 68 | + |
| 69 | +// swagger:model slice_type |
| 70 | +type Slice []any |
| 71 | + |
| 72 | +// swagger:model slice_alias |
| 73 | +type SliceAlias = []any |
| 74 | + |
| 75 | +// swagger:model slice_to_slice |
| 76 | +type SliceToSlice = Slice |
| 77 | + |
| 78 | +// swagger:model slice_of_structs |
| 79 | +// |
| 80 | +// SliceOfStructs is an slice of anonymous structs. |
| 81 | +type SliceOfStructs []struct{} |
| 82 | + |
| 83 | +// swagger:model slice_of_structs_alias |
| 84 | +type SliceOfStructsAlias = []struct{} |
| 85 | + |
| 86 | +// swagger:model |
| 87 | +type ShouldSee bool |
| 88 | + |
| 89 | +type ShouldNotSee bool |
| 90 | +type ShouldNotSeeSlice []int |
| 91 | +type ShouldNotSeeMap map[string]int |
0 commit comments