Skip to content

Releases: masitings/geni-api

v2.0.1

Choose a tag to compare

@masitings masitings released this 16 Sep 19:21

Documentation & Maintenance

  • Clarified documentation wording to emphasize standard OpenAPI docblock conventions and seamless migration from other generators.
  • Added official trademark disclaimers in README and documentation.
  • Linked full documentation references directly to geni.masiting.dev.
  • Removed internal test dependency dedoc/scramble to keep development dependencies clean and completely self-contained.
  • Expanded Model Context Protocol (MCP) documentation detailing real-world autonomous AI workflows and execution safety.

v2.0.0

Choose a tag to compare

@masitings masitings released this 16 Sep 11:32

Added

  • Support for Spatie Laravel Query Builder (spatie/laravel-query-builder):

    • Statically analyzes QueryBuilder::for(...) method chains on GET operations to generate OpenAPI query parameters without booting the application.
    • Generates filter[field] query parameters with database column types automatically resolved from migration schemas; supports AllowedFilter::exact, partial, scope, beginsWithStrict, endsWithStrict, and trashed (with enum ['with', 'only']).
    • Generates a unified sort parameter with expanded ascending and descending enums and default sort values from allowedSorts and defaultSort.
    • Generates include parameter for allowedIncludes, fields[resource] parameters for allowedFields, and append parameter for allowedAppends.
    • Emits non-fatal InferenceDiagnostic entries for dynamic or non-literal arguments while gracefully parsing remaining parameters.
  • Support for Spatie Laravel Data (spatie/laravel-data):

    • Statically infers request body schemas from controller action parameters type-hinting classes extending Spatie\LaravelData\Data.
    • Statically infers response schemas from return expressions returning DataClass::from(...), DataClass::collect(...), new DataClass(...), or declaring a DataClass return type-hint.
    • Recursively resolves nested Data classes and collection types with proper component schema referencing ($ref).
    • Statically maps Spatie validation attributes (#[Required], #[Min], #[Max], #[Email], #[Url], #[Regex], etc.) to JSON Schema constraints.
    • Supports Optional and nullable properties by omitting them from the required schema array.
  • Support for Laravel Actions (lorisleiva/laravel-actions):

    • Automatic detection and routing resolution for single-action route definitions (Route::get('/path', SomeAction::class)), prioritizing asController() over handle().
    • Static validation rules extraction from Action rules() method and ActionRequest parameters into the OpenAPI request body schema.
    • Automatic 403 Forbidden response documentation when an Action defines a non-trivial authorize() method.
    • Human-readable operation summary derivation from Action class names (e.g. CreateUserAction -> "Create user") when no explicit summary annotation is present.

Changed (BREAKING)

  • Permanent sidebar promo banner: The sidebar promo card is no longer configurable and cannot be disabled or customized. It is now a permanent advertisement banner linking to masitings/geni-api rendered unconditionally in every documentation portal instance. The config('geni.promo') configuration block has been removed from config/geni.php. Any host applications specifying config('geni.promo.*') will have those settings silently ignored. This breaking change requires a major version bump.

v1.0.1

Choose a tag to compare

@masitings masitings released this 15 Sep 17:27

Fixed

  • geni:export/geni:check --path resolution: both commands always ran the given path through base_path() even when it was already absolute, silently doubling/mangling the destination (e.g. writing into vendor/orchestra/testbench-core/laravel/... when run under Testbench instead of the intended path). Now mirrors geni:mcp's existing guard: an absolute path (or one that already exists) is used as-is.
  • InferenceDiagnostic embedded absolute filesystem paths (e.g. a developer's home directory) into the OpenAPI document's x-geni-unresolved extension. Since these paths are baked into the generated document, a spec produced on one machine would never match the same spec regenerated on another (including CI), making geni:check report false drift for content that hadn't actually changed. Diagnostic file paths are now relativized against the current working directory before being serialized.
  • geni:check compared the generated and committed OpenAPI documents with strict === on decoded PHP arrays, which is order-sensitive for JSON objects. Comparison now recursively sorts object keys (canonicalizes) before comparing while preserving list-array order, which is semantically significant, so key-emission order alone can no longer produce a false positive.

v1.0.0

Choose a tag to compare

@masitings masitings released this 15 Sep 08:48

Added

  • Multi-document routing and interactive API version switcher dropdown in Blade docs UI:
    • GeniServiceProvider registers dedicated versioned routes for each entry in config('geni.apis') (e.g. /docs/api/v1, /docs/api/v1.json, /docs/api/v1/mcp).
    • RouteDiscoverer::discover($apiName) and BuildsInfoOptions::buildInfoOptions($apiName) scope discovery and OpenAPI metadata per named version.
    • blade-docs.blade.php renders an interactive version switcher dropdown in the sidebar header when > 1 APIs are configured, switching specifications in-place and updating browser history via history.pushState().
    • Single-document setups (config('geni.apis') => []) retain standard zero-overhead behavior without dropdowns (100% backward compatible).
  • Optional sidebar promo card (config('geni.promo')): disabled by default, lets a host app render a small branded banner (icon, title, subtitle, link) in the docs sidebar. Content-neutral — no branding shipped in the package itself.

Fixed

  • Mobile nav drawer and mobile "Try It" slide-over were missing several desktop-only sidebar features (API version switcher, endpoint search, promo card, footer credit, and full auth/param/body request form) — both surfaces now share the same partials as desktop so mobile has full parity.
  • Response body and response example panels now use a fixed dark background instead of one that blended into their dark-mode container.
  • Response status badges and the version switcher dropdown no longer overflow on narrow screens or with many entries.
  • DocsFormAuth middleware now returns 401 JSON (instead of an HTML redirect) for unauthenticated requests to versioned API JSON spec paths (docs/api/{name}.json) configured via geni.apis.
  • Version switcher dropdown now displays the configured title as-is instead of appending a (v{version}) suffix.