openapigen

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package openapigen derives an OpenAPI 3.1 document for one realm from the generic contract (api/openapi.yaml) and the realm's loaded config: its collections with their schemas and features, its enabled authentication methods, its functions, and what its clients can reach.

Index

Constants

View Source
const Version = "1"

Version is the generator's version: it changes when the output format does.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	JSON        []byte
	Fingerprint string // of the document: what --check and caches compare
}

Document is a generated OpenAPI document.

func Admin

func Admin(reg *registry.Registry, realm string) (*Document, error)

Admin generates the document of the realm's admin API: its administration routes, the data routes past the collections' rules (typed per collection), and every function the administrators may run by hand, internal ones included, with their input and output schemas.

func Public

func Public(reg *registry.Registry, realm string) (*Document, error)

Public generates the document of the realm's client API: collections a client can reach, the enabled authentication methods, non-internal functions and the realm's configuration. Internal functions, the admin API, rules and system collections are left out.

Jump to

Keyboard shortcuts

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