playground

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package playground provides utilities for executing jq transformations on OpenAPI specifications.

Package playground provides utilities for executing jq transformations on OpenAPI specifications.

Package playground provides utilities for executing jq transformations on OpenAPI specifications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTransformErrors

func FormatTransformErrors(warnings []string) string

FormatTransformErrors turns low-level executor warnings into a user-facing message.

func SymbolicExecuteJQ

func SymbolicExecuteJQ(oasYAML string) (string, error)

SymbolicExecuteJQ validates an OpenAPI spec and performs symbolic execution

Types

type PipelineResult

type PipelineResult struct {
	Panel1         string   `json:"panel1"`
	Panel2         string   `json:"panel2"`
	Panel3         string   `json:"panel3"`
	AppliedFromAPI bool     `json:"appliedFromApi"`
	AppliedToAPI   bool     `json:"appliedToApi"`
	Warnings       []string `json:"warnings"`
}

PipelineResult contains the three panels

func SymbolicExecuteJQPipeline

func SymbolicExecuteJQPipeline(oasYAML string, strict bool) (*PipelineResult, error)

SymbolicExecuteJQPipeline performs sequential transformation pipeline

type TransformerFunc

type TransformerFunc struct {
	Type   TransformerType
	Config string // The actual JQ expression
}

TransformerFunc represents a transformation function configuration

func ParseTransformExtension

func ParseTransformExtension(yamlNode *yaml.Node) (*TransformerFunc, error)

ParseTransformExtension parses the x-speakeasy-transform-from-api extension

type TransformerType

type TransformerType string

TransformerType is a string enum that can right now only be "jq"

const (
	Jq TransformerType = "jq"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL