parser

package
v0.0.0-...-dcc0d81 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToCamelCase

func ToCamelCase(subject, method string) string

ToCamelCase converts subject-method to camelCase (e.g., "users-get" → "usersGet").

Types

type Operation

type Operation struct {
	Path            string
	Method          string
	Subject         string
	FieldName       string
	Summary         string
	Description     string
	RequestSchema   string
	ResponseSchema  string
	IsListOperation bool
}

Operation represents a GraphQL query operation.

type ParsedData

type ParsedData struct {
	Operations []Operation
	Schemas    map[string]*SchemaInfo
	Timestamp  string
}

ParsedData contains extracted operations and schemas.

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser extracts relevant data from OpenAPI specs.

func New

func New(spec *v3.Document, heuristicPatterns []string) *Parser

New creates a new parser with the given spec and heuristic patterns.

func (*Parser) Parse

func (p *Parser) Parse() (*ParsedData, error)

Parse extracts all query operations and their schemas.

type SchemaInfo

type SchemaInfo struct {
	Name        string
	Schema      *base.Schema
	IsRequest   bool
	Description string
}

SchemaInfo contains OpenAPI schema metadata.

Jump to

Keyboard shortcuts

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