Search by

OpenAPI 3.2, 3.1 and 3.0 emitters, semantic API diffing and breaking-change detection: the framework-agnostic engine behind Docuccino.

Package info

github.com/docuccino/php-core

Homepage

Issues

pkg:composer/docuccino/core

Statistics

Installs: 1 430

Dependents: 2

Suggesters: 0

Stars: 0

v0.20.2 2026-09-23 20:09 UTC

README

Latest version Downloads PHP version CI License

The framework-agnostic engine behind Docuccino — the document model, canonicalizer, identities, OpenAPI emitters and semantic diff.

Core compiles an application into an OpenAPI 3.2-shaped JSON document that is deterministic and carries, under one reserved x-docuccino member, a stable identity and provenance for every operation, schema and parameter. From it, core emits OpenAPI 3.2 and 3.1, validates against the published JSON Schema, and answers what changed between two documents rather than only what the endpoints are.

It has no framework dependency and no static-analysis dependency. Framework adapters consume it — if you are documenting a Laravel application, you want docuccino/laravel, which pulls this in for you.

Install

composer require docuccino/core

Usage

Emit a canonical OpenAPI 3.2 document from a built document:

use Docuccino\Core\Emit\EmitOptions;
use Docuccino\Core\Emit\OpenApi32Emitter;

$json = (new OpenApi32Emitter())->emit($uirDocument, new EmitOptions());

Compare two documents over their identities, and classify what moved:

use Docuccino\Core\Diff\DocumentDiffer;

$changes = (new DocumentDiffer())->diff($oldDocument, $newDocument);

Part of Docuccino

Package Role
docuccino/laravel The Laravel adapter: provider, config, commands, viewer, integrations. Start here.
docuccino/core ← you are here Framework-agnostic document model, canonicalizer, identities, emitters, diff.
docuccino/inference-phpstan PHPStan + Larastan type inference. Install as a dev dependency.
docuccino/attributes Dependency-free PHP attribute classes.

Documentation

Full documentation is at docs.docuccino.app. See especially the the Docuccino extension, schema hosting and writing an extension. The versioned JSON Schema is served at https://spec.docuccino.app/uir/2.0/schema.json, with the extension half at https://spec.docuccino.app/uir/2.0/extension.schema.json.

Issues and contributing

This repository is a read-only subtree split of docuccino/docuccino. Open issues and pull requests on the monorepo — commits pushed here are overwritten. See CONTRIBUTING.md.

License

MIT. See LICENSE.

This package redistributes the OpenAPI Initiative's specification JSON Schemas under the Apache License 2.0, unmodified, and validates every document it emits against them. See NOTICE.