openapi

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCombinedSpec

func GenerateCombinedSpec(services []ServiceSpec, baseURL string) *openapi3.T

GenerateCombinedSpec combines OpenAPI specs from multiple services into a single spec.

func GenerateServiceSpec

func GenerateServiceSpec(serviceName, serviceLabel, driver, baseURL string, schema *model.Schema) *openapi3.T

GenerateServiceSpec generates an OpenAPI 3.1 spec for a single database service.

Types

type ServiceSpec

type ServiceSpec struct {
	Name   string
	Label  string
	Driver string
	Schema *model.Schema
}

ServiceSpec holds the inputs needed to generate an OpenAPI spec for one database service.

type TypeMapping

type TypeMapping struct {
	Type   string // OpenAPI type: string, integer, number, boolean, object, array
	Format string // OpenAPI format: int32, int64, float, double, date, date-time, uuid, byte, etc.
}

TypeMapping maps database column types to OpenAPI type/format pairs.

func MapDBType

func MapDBType(dbType string) TypeMapping

MapDBType converts a database column type to an OpenAPI type mapping. Falls back to {"string", ""} for unknown types.

Jump to

Keyboard shortcuts

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