You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Definition type does not allow supplying Items. This means that even with a custom SMD() override method, it's not possible to correctly document arrays of arrays where the inner item type is explained.
It seams reasonable to me to just drop the smd.Definition type and use smd.Property, or perhaps drop that as well and go for just having the smd.JSONSchema type.
In addition, the Items type (map[string]string) appears odd; the only valid value wold be to supply a key "$ref" and a value pointing to a Definition, so it would make more sense to let it be of type struct {Ref string `json:"$ref"`}, or indeed JSONSchema that already has a Ref field defined. The latter would also allow for inline schemas.
The text was updated successfully, but these errors were encountered:
zenrpc/smd/model.go
Line 85 in 10f2c48
The
Definition
type does not allow supplyingItems
. This means that even with a customSMD()
override method, it's not possible to correctly document arrays of arrays where the inner item type is explained.It seams reasonable to me to just drop the
smd.Definition
type and usesmd.Property
, or perhaps drop that as well and go for just having thesmd.JSONSchema
type.In addition, the
Items
type(map[string]string)
appears odd; the only valid value wold be to supply a key"$ref"
and a value pointing to a Definition, so it would make more sense to let it be of typestruct {Ref string `json:"$ref"`}
, or indeedJSONSchema
that already has aRef
field defined. The latter would also allow for inline schemas.The text was updated successfully, but these errors were encountered: