File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ func (f Interface) goPkg() string {
55
55
func (f Interface ) toSchema () * Schema {
56
56
var s = NewSchema ()
57
57
s .setType (f .Type )
58
- s .Nullable = f .Nullable
58
+ s .nullable = f .Nullable
59
59
60
60
// if it's a module loader, construct a special case (sub)schema
61
61
if len (f .Loader ) > 0 {
@@ -79,7 +79,7 @@ func (f Interface) toSchema() *Schema {
79
79
cs .setType ("array" )
80
80
cs .ArrayItems = NewSchema ()
81
81
cs .ArrayItems .setType (nest .Type )
82
- cs .ArrayItems .Nullable = nest .Nullable
82
+ cs .ArrayItems .nullable = nest .Nullable
83
83
cs .ArrayItems .Properties = props
84
84
85
85
// nested schema
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ type Schema struct {
27
27
Description string `json:"description,omitempty"`
28
28
MarkdownDescription string `json:"markdownDescription,omitempty"`
29
29
Type string `json:"type,omitempty"`
30
- Nullable bool `json:"-"`
31
30
Ref string `json:"$ref,omitempty"`
32
31
33
32
ArrayItems * Schema `json:"items,omitempty"`
@@ -52,6 +51,7 @@ type Schema struct {
52
51
goPkg string
53
52
description string
54
53
markdownDescription string
54
+ nullable bool
55
55
}
56
56
57
57
func godocLink (pkg string ) string {
@@ -124,7 +124,7 @@ func (s *Schema) setRef(moduleID string) {
124
124
// MarshalJSON allows to marshal Schema.Type as string or list
125
125
func (s * Schema ) MarshalJSON () ([]byte , error ) {
126
126
type Alias Schema
127
- if s .Nullable {
127
+ if s .nullable {
128
128
return json .Marshal (& struct {
129
129
Type [2 ]string `json:"type"`
130
130
* Alias
You can’t perform that action at this time.
0 commit comments