Documentation
¶
Index ¶
- func Hydrate(ctx context.Context, anyVal interface{}, cwd string, ...) (interface{}, error)
- func Loader(path string) gojsonschema.JSONLoader
- func Validate(schemaPath string, documentPath string) (*gojsonschema.Result, error)
- func WriteDereferencedSchema(schemaFilePath string, outFile io.Writer, c *client.MassdriverClient) error
- type GenerateAuthFile
- type PropertiesMap
- type Property
- type RefdSchema
- type Schema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Loader ¶
func Loader(path string) gojsonschema.JSONLoader
Load a JSON Schema with or without a path prefix
func Validate ¶
func Validate(schemaPath string, documentPath string) (*gojsonschema.Result, error)
Validate the input object against the schema
func WriteDereferencedSchema ¶
Types ¶
type GenerateAuthFile ¶
type PropertiesMap ¶
PropertiesMap is a named map of Property
type Property ¶
type Property struct {
AdditionalProperties bool `json:"additionalProperties"`
Type string `json:"type"`
Items *Property `json:"items"`
Properties PropertiesMap `json:"properties,omitempty"`
GenerateAuthFile *GenerateAuthFile `json:"md.generateAuthFile,omitempty"`
}
Property is a single JSON Schema property field
type RefdSchema ¶
type RefdSchema struct {
SchemaID string
Definition interface{}
}
A RefdSchema is a JSON Schema that may contain $ref
func (*RefdSchema) Type ¶
func (r *RefdSchema) Type() string
type Schema ¶
type Schema struct {
Properties PropertiesMap `json:"properties"`
Required []string `json:"required,omitempty"`
}
Schema is a flimsy representation of a JSON Schema. It provides just enough structure to get type information.
func GetJSONSchema ¶
Click to show internal directories.
Click to hide internal directories.