docs(openapi): document Scalar UI and OpenAPI 3.2.0 - #2337
Merged
Conversation
Scalar API Reference (core #7817) shipped in 4.4 alongside Swagger UI and ReDoc but had zero mentions in the docs tree. Document how to enable/disable it, reach it via `?ui=scalar`, and configure it via `scalar_extra_configuration`. Also state that generated documents are OpenAPI 3.2.0 by default (`ApiPlatform\OpenApi\OpenApi::VERSION`), replacing the stale "OpenAPI v3" wording, and document the `--spec-version=3.0.0` / `?spec_version=3.0.0` legacy escape hatches, disambiguated from the unrelated `api_platform.swagger.versions` option. Verified against core@upstream/4.4: - src/Symfony/Bundle/DependencyInjection/Configuration.php:130,600-606,316-334 - src/Symfony/Bundle/SwaggerUi/SwaggerUiProcessor.php - src/Symfony/Bundle/Resources/views/SwaggerUi/index.html.twig - src/Symfony/Bundle/Resources/public/init-scalar-ui.js - src/Laravel/config/api-platform.php:125-128 - src/Laravel/Controller/DocumentationController.php - src/Laravel/State/SwaggerUiProcessor.php - src/OpenApi/OpenApi.php:26 - src/OpenApi/Command/OpenApiCommand.php - src/OpenApi/Serializer/LegacyOpenApiNormalizer.php - src/OpenApi/Serializer/SerializerContextBuilder.php
Verified against core@upstream/4.4: no `api:swagger:export` command class, console alias, or Swagger 2.0 normalizer exists anywhere in src/. The Symfony `api_platform.swagger.versions` option also hardcodes $supportedVersions = [3] (Configuration.php:323), rejecting `2` outright, so there is no surviving route to a Swagger 2 / OpenAPI v2 export in 4.4. The docs instructed readers to run a command that no longer exists; removed the stale block instead of replacing it, since no equivalent survives.
soyuka
force-pushed
the
docs/openapi-scalar-and-3.2
branch
from
September 13, 2026 06:31
cf2df81 to
971dfe4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two 4.4 OpenAPI features shipped with zero documentation, plus one stale
command reference removed:
Swagger UI and ReDoc. Documents how to enable/disable it
(
enable_scalaron Symfony,scalar.enabledon Laravel), how it isactually reached (
?ui=scalarquery parameter on the documentationroute — same value on both stacks; ReDoc's value differs:
re_doconSymfony vs
redocon Laravel), and whatscalar_extra_configuration/scalar.extra_configurationaccepts (merged into the object passed toScalar.createApiReference(), so any option Scalar itself supports,e.g.
theme,darkMode).ApiPlatform\OpenApi\OpenApi::VERSION, raised from3.1.0 by core #8350): the page previously only named
3.0.0. Statesthe current default version and documents the legacy escape hatches
(
--spec-version=3.0.0CLI option,?spec_version=3.0.0queryparameter), explicitly disambiguated from the unrelated
api_platform.swagger.versionsconfig option.api:swagger:exportreference: verified againstupstream/4.4that no such command class, console alias, or Swagger2.0 normalizer exists anywhere in
src/, and thatapi_platform.swagger.versionshardcodes$supportedVersions = [3](rejects
2). There is no surviving route to a Swagger 2 / OpenAPI v2export in 4.4, so the block was deleted rather than replaced.
Every factual claim was verified against the shipped source at
upstream/4.4in api-platform/core (file:line references in the commitmessages).
Stacked PR notice
This branch is stacked on #2335 (
docs/backport-4.4-features, tipfaba151f7b34ac52bee024bbb90b4dd1074cf39e) and only touchescore/openapi.md. Please merge #2335 first — until then this diff willshow #2335's commits too.
Test plan
npx prettier@3.9.5 --check "**/*.md" --prose-wrap alwayspasses(verified locally)
?ui=scalar/?ui=re_doc/?ui=redocmechanismmatches
SwaggerUiProcessor/ LaravelSwaggerUiProcessorbehaviorapi:swagger:exportexport pathexists in 4.4