Documentation
¶
Overview ¶
Package opendpi provides OpenDPI specification types.
Index ¶
- Variables
- func WriteEmptySchemaJSON(dir, portName string) error
- func WriteEmptySchemaYAML(dir, portName string) error
- func WriteSchemaFile(dir, portName string, writeFunc func(string, any) error) error
- type Connection
- type Info
- type Parser
- type Port
- type PortConnection
- type Spec
- type Tag
- type Writer
Constants ¶
This section is empty.
Variables ¶
var ( // JSON parses OpenDPI specs from JSON. JSON = Parser{parseJSON} // YAML parses OpenDPI specs from YAML. YAML = Parser{parseYAML} )
var ( // JSONWriter writes OpenDPI specs as JSON. JSONWriter = Writer{writeJSON, ".json"} // YAMLWriter writes OpenDPI specs as YAML. YAMLWriter = Writer{writeYaml, ".yaml"} )
Functions ¶
func WriteEmptySchemaJSON ¶ added in v0.2.0
WriteEmptySchemaJSON writes an empty object schema as JSON.
func WriteEmptySchemaYAML ¶ added in v0.2.0
WriteEmptySchemaYAML writes an empty object schema as YAML.
Types ¶
type Connection ¶
Connection represents an infrastructure endpoint where data resides.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser decodes an OpenDPI spec from an io.Reader.
type Port ¶
type Port struct {
Description string
Connections []PortConnection
Schema *jsonschema.Schema
SchemaRef string // original external $ref path (e.g. "schemas/user.yaml"), preserved for round-trip
}
Port represents a data output interface exposed by the data product.
type PortConnection ¶
type PortConnection struct {
Connection *Connection
Location string
}
PortConnection represents a connection-location pair for a port.