oas_struct

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Components

type Components struct {
	Schemas map[string]Schema `json:"schemas" yaml:"schemas"`
}

type Content

type Content struct {
	Schema Schema `json:"schema" yaml:"schema"`
}

type Info

type Info struct {
	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`
	Version     string `json:"version" yaml:"version"`
}

type Method

type Method struct {
	Summary     string      `json:"summary" yaml:"summary"`
	Description string      `json:"description" yaml:"description"`
	Parameters  []Parameter `json:"parameters" yaml:"parameters"`
	RequestBody RequestBody `json:"requestBody" yaml:"requestBody"`
}

type OAS

type OAS struct {
	OpenAPI    string                       `json:"openapi" yaml:"openapi"`
	Info       Info                         `json:"info" yaml:"info"`
	Servers    []Server                     `json:"servers" yaml:"servers"`
	Paths      map[string]map[string]Method `json:"paths" yaml:"paths"`
	Components Components                   `json:"components" yaml:"components"`
}

type Parameter

type Parameter struct {
	Name        string `json:"name" yaml:"name"`
	In          string `json:"in" yaml:"in"`
	Description string `json:"description" yaml:"description"`
	Required    bool   `json:"required" yaml:"required"`
	Schema      Schema `json:"schema" yaml:"schema"`
	Example     string `json:"example" yaml:"example"`
}

type Property

type Property struct {
	Type        string              `json:"type" yaml:"type"`
	Format      string              `json:"format,omitempty" yaml:"format,omitempty"`
	Description string              `json:"description" yaml:"description"`
	Example     any                 `json:"example" yaml:"example"`
	Default     any                 `json:"default" yaml:"default"`
	Items       *Schema             `json:"items,omitempty" yaml:"items,omitempty"`
	Ref         string              `json:"$ref,omitempty" yaml:"$ref,omitempty"`
	OneOf       []Schema            `json:"oneOf,omitempty" yaml:"oneOf,omitempty"`
	AnyOf       []Schema            `json:"anyOf,omitempty" yaml:"anyOf,omitempty"`
	AllOf       []Schema            `json:"allOf,omitempty" yaml:"allOf,omitempty"`
	Properties  map[string]Property `json:"properties,omitempty" yaml:"properties,omitempty"`
}

type RequestBody

type RequestBody struct {
	Content map[string]Content `json:"content" yaml:"content"`
}

type Schema

type Schema struct {
	Ref        string              `json:"$ref,omitempty" yaml:"$ref,omitempty"`
	Type       string              `json:"type,omitempty" yaml:"type,omitempty"`
	Properties map[string]Property `json:"properties,omitempty" yaml:"properties,omitempty"`
	Example    any                 `json:"example" yaml:"example"`
	Default    any                 `json:"default" yaml:"default"`
	Items      *Schema             `json:"items,omitempty" yaml:"items,omitempty"`
	OneOf      []Schema            `json:"oneOf,omitempty" yaml:"oneOf,omitempty"`
	AnyOf      []Schema            `json:"anyOf,omitempty" yaml:"anyOf,omitempty"`
	AllOf      []Schema            `json:"allOf,omitempty" yaml:"allOf,omitempty"`
}

type Server

type Server struct {
	URL string `json:"url" yaml:"url"`
}

Jump to

Keyboard shortcuts

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