Skip to content

Commit

Permalink
try to fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
shane-tw committed Oct 11, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 5b506d5 commit 829e9b8
Showing 2 changed files with 19 additions and 18 deletions.
36 changes: 18 additions & 18 deletions docparse/jsonschema_test.go
Original file line number Diff line number Diff line change
@@ -11,24 +11,24 @@ import (

func TestFieldToProperty(t *testing.T) {
want := map[string]*Schema{
"str": {Type: "string", Description: "Documented str field.\nNewline."},
"byt": {Type: "string"},
"r": {Type: "string"},
"b": {Type: "boolean", Description: "Inline docs."},
"fl": {Type: "number"},
"err": {Type: "string"},
"strP": {Type: "string"},
"slice": {Type: "array", Items: &Schema{Type: "string"}},
"sliceP": {Type: "array", Items: &Schema{Type: "string"}},
"sliceNoItems": {Type: "array"},
"cstr": {Type: "string"},
"cstrP": {Type: "string"},
"bar": {Reference: "a.bar"},
"barP": {Reference: "a.bar"},
"pkg": {Reference: "mail.Address"},
"pkgSlice": {Type: "array", Items: &Schema{Reference: "mail.Address"}},
"pkgSliceP": {Type: "array", Items: &Schema{Reference: "mail.Address"}},
"deeper": {Reference: "a.refAnother"},
"str": {Type: "string", Description: "Documented str field.\nNewline."},
"byt": {Type: "string"},
"r": {Type: "string"},
"b": {Type: "boolean", Description: "Inline docs."},
"fl": {Type: "number"},
"err": {Type: "string"},
"strP": {Type: "string"},
"slice": {Type: "array", Items: &Schema{Type: "string"}},
"sliceP": {Type: "array", Items: &Schema{Type: "string"}},
"cstr": {Type: "string"},
"cstrP": {Type: "string"},
"bar": {Reference: "a.bar"},
"barP": {Reference: "a.bar"},
"pkg": {Reference: "mail.Address"},
"pkgSlice": {Type: "array", Items: &Schema{Reference: "mail.Address"}},
"pkgSliceP": {Type: "array", Items: &Schema{Reference: "mail.Address"}},
"cSlice": {Type: "array", Items: &Schema{Type: "string"}},
"deeper": {Reference: "a.refAnother"},
"docs": {Type: "string", Description: "This has some documentation!",
Required: []string{"docs"},
Enum: []string{"one", "two", "three", "four", "five", "six", "seven"},
1 change: 1 addition & 0 deletions docparse/testdata/src/a/a.go
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ type foo struct {
pkg mail.Address
pkgSlice []mail.Address
pkgSliceP []*mail.Address
cSlice []customStr
deeper refAnother

// This has some documentation! {required}

0 comments on commit 829e9b8

Please sign in to comment.