Documentation ¶
Index ¶
- func AddEntryToOASYAML(oas *yaml.Node, key string, value any, defaultVal *yaml.Node) (*yaml.Node, error)
- func ApplyOASOverlay(overlayNode *yaml.Node, specNode *yaml.Node, overlayFile string, ...) (*yaml.Node, error)
- func ApplyOASOverlayAction(action *yaml.Node, specNode *yaml.Node, overlayFile string, specFile string) (*yaml.Node, error)
- func CopyFile(dest string, src string) error
- func GetDocMapRoot(yamlNode *yaml.Node) *yaml.Node
- func GetFieldOrCreateNew(node *yaml.Node, key string, value *yaml.Node) *yaml.Node
- func JSONFile2YAMLFile(input string, output string) error
- func JSONPointer2JSONPath(jsonPointer string) (jsonPath string, err error)
- func JSONText2YAMLText(reader io.Reader) ([]byte, error)
- func LocateRef(refFileNode *yaml.Node, refJSONPath string, jsonRef string) (*yaml.Node, error)
- func MakeCyclicRefPlaceholder(refJSONPath string) *yaml.Node
- func Must(err error)
- func MustClose(c io.Closer)
- func MustReadFileBytes(path string) []byte
- func NewCyclicJSONRefError(paths []string) error
- func NewMapNode() *yaml.Node
- func NewRefNode(refJSONPath string) *yaml.Node
- func NewStringNode(value string, style yaml.Style) *yaml.Node
- func OAS2FileToOAS3File(input string, output string, allowCycles bool) error
- func OAS2YAMLtoOAS3YAML(oasNode *yaml.Node) (*yaml.Node, error)
- func OAS3ToYAML(doc *openapi3.T) (*yaml.Node, error)
- func OASOverlay(overlayFile string, specFile string, outputFile string) error
- func PushDir(dir string) func()
- func ReadInputText(input string) ([]byte, error)
- func ReadInputTextFile(input string) ([]byte, error)
- func RemoveExtensions(input string, output string) error
- func RemoveOASExtensions(root *yaml.Node) (*yaml.Node, error)
- func RemoveOASExtensionsRecursive(node *yaml.Node, parentField string) (*yaml.Node, error)
- func RemoveYAMLComments(data []byte) []byte
- func RequireBundleZipEquals(t *testing.T, expectedBundleZip string, actualBundleZip string)
- func ResolveDollarRefs(input string, output string, allowCycles bool) error
- func SplitJSONRef(refStr string) (location string, jsonPath string, err error)
- func Struct2XMLDocText(p any) ([]byte, error)
- func Text2XML(reader io.Reader) (*etree.Document, error)
- func Text2YAML(reader io.Reader) (*yaml.Node, error)
- func ToV3(doc2 *openapi2.T) (*openapi3.T, error)
- func UnFlowYAMLNode(node *yaml.Node) *yaml.Node
- func WriteOutputText(output string, outputText []byte) error
- func XML2Text(doc *etree.Document) ([]byte, error)
- func XML2YAML(doc *etree.Document) (*yaml.Node, error)
- func XML2YAMLRecursive(ele *etree.Element) (key *yaml.Node, value *yaml.Node, err error)
- func XML2YAMLText(doc *etree.Document, indent int) ([]byte, error)
- func XMLFile2YAMLFile(input string, output string) error
- func XMLText2XML(reader io.Reader) (*etree.Document, error)
- func XMLText2YAML(reader io.Reader) (*yaml.Node, error)
- func XMLText2YAMLText(reader io.Reader) ([]byte, error)
- func XMLTextFormat(reader io.Reader) ([]byte, error)
- func YAML2Text(node *yaml.Node, indent int) ([]byte, error)
- func YAML2XML(node *yaml.Node) (*etree.Document, error)
- func YAML2XMLRecursive(node *yaml.Node, parent *etree.Element) (*etree.Element, error)
- func YAML2XMLText(node *yaml.Node) ([]byte, error)
- func YAMLDetectRefCycles(root *yaml.Node, filePath string) (cycles [][]string, err error)
- func YAMLDetectRefCyclesRecursive(node *yaml.Node, relParentPath string, parentFile string, activePaths []string, ...) error
- func YAMLDoc2File(docNode *yaml.Node, outputFile string) error
- func YAMLFile2JSONFile(input string, output string) error
- func YAMLFile2XMLFile(input string, output string) error
- func YAMLFile2YAML(filePath string) (*yaml.Node, error)
- func YAMLResolveRefs(root *yaml.Node, filePath string, allowCycles bool) (*yaml.Node, error)
- func YAMLResolveRefsRecursive(node *yaml.Node, relParentPath string, parentFile string, activePaths []string, ...) (*yaml.Node, error)
- func YAMLText2JSONText(reader io.Reader) ([]byte, error)
- func YAMLText2XML(reader io.Reader) (*etree.Document, error)
- func YAMLText2XMLText(reader io.Reader) ([]byte, error)
- type CyclicJSONRefError
- type MultiError
- type StdoutCapture
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEntryToOASYAML ¶
func ApplyOASOverlay ¶
func ApplyOASOverlayAction ¶
func GetDocMapRoot ¶
func GetDocMapRoot(yamlNode *yaml.Node) *yaml.Node
func GetFieldOrCreateNew ¶
func GetFieldOrCreateNew(node *yaml.Node, key string, value *yaml.Node) *yaml.Node
func JSONFile2YAMLFile ¶
func JSONPointer2JSONPath ¶
func MakeCyclicRefPlaceholder ¶
func MakeCyclicRefPlaceholder(refJSONPath string) *yaml.Node
func MustReadFileBytes ¶
func NewCyclicJSONRefError ¶
func NewMapNode ¶
func NewMapNode() *yaml.Node
func NewRefNode ¶
func NewRefNode(refJSONPath string) *yaml.Node
func NewStringNode ¶
func NewStringNode(value string, style yaml.Style) *yaml.Node
func OAS2FileToOAS3File ¶
func OAS2YAMLtoOAS3YAML ¶
func OAS2YAMLtoOAS3YAML(oasNode *yaml.Node) (*yaml.Node, error)
func OAS3ToYAML ¶
func ReadInputText ¶
func ReadInputTextFile ¶
func RemoveExtensions ¶
func RemoveOASExtensions ¶
func RemoveOASExtensions(root *yaml.Node) (*yaml.Node, error)
func RemoveYAMLComments ¶
func RequireBundleZipEquals ¶
func ResolveDollarRefs ¶
func Struct2XMLDocText ¶
func UnFlowYAMLNode ¶
func UnFlowYAMLNode(node *yaml.Node) *yaml.Node
func WriteOutputText ¶
func XML2YAMLRecursive ¶
func XMLFile2YAMLFile ¶
func XMLText2YAML ¶
func YAML2XMLRecursive ¶
func YAML2XMLText ¶
func YAMLDetectRefCycles ¶
func YAMLDoc2File ¶
func YAMLFile2JSONFile ¶
func YAMLFile2XMLFile ¶
func YAMLFile2YAML ¶
func YAMLResolveRefs ¶
Types ¶
type CyclicJSONRefError ¶
type CyclicJSONRefError struct {
Paths []string
}
func (CyclicJSONRefError) Error ¶
func (e CyclicJSONRefError) Error() string
type MultiError ¶
type MultiError struct {
Errors []error
}
func (MultiError) Error ¶
func (e MultiError) Error() string
type StdoutCapture ¶
type StdoutCapture struct {
// contains filtered or unexported fields
}
func NewStdoutCapture ¶
func NewStdoutCapture() (*StdoutCapture, error)
func (*StdoutCapture) Read ¶
func (sf *StdoutCapture) Read() ([]byte, error)
func (*StdoutCapture) Restore ¶
func (sf *StdoutCapture) Restore()
Click to show internal directories.
Click to hide internal directories.