AshOaskit.Generators.Shared (AshOasKit v0.2.1)

View Source

Shared functionality between OpenAPI 3.0 and 3.1 generators.

This module serves as the main entry point for spec generation, delegating to specialized builder modules for focused functionality.

Module Organization

The generation logic is split across focused modules:

Usage

# Generate a complete OpenAPI spec
spec = Shared.generate([MyApp.Domain], version: "3.1", title: "My API")

Options

See AshOaskit.Generators.Generator.generate/2 for full options list.

Summary

Functions

Generate an OpenAPI specification from the given domains.

Types

opts()

@type opts() :: keyword()

version()

@type version() :: String.t()

Functions

generate(domains, opts)

@spec generate([module()], opts()) :: map()

Generate an OpenAPI specification from the given domains.

Delegates to AshOaskit.Generators.Generator.generate/2.

Options

  • :version - OpenAPI version ("3.0" or "3.1")
  • :title - API title
  • :api_version - API version string
  • :description - API description
  • :terms_of_service - Terms of service URL
  • :contact - Contact information map
  • :license - License information map
  • :servers - List of server URLs or server objects
  • :security - Security requirements