Skip to content

fix(Annotations): accept mutualTLS as a SecurityScheme type - #2193

Merged
DerManoMann merged 1 commit into
zircote:masterfrom
DerManoMann:fix/classic-mutualtls
Sep 13, 2026
Merged

fix(Annotations): accept mutualTLS as a SecurityScheme type#2193
DerManoMann merged 1 commit into
zircote:masterfrom
DerManoMann:fix/classic-mutualtls

Conversation

@DerManoMann

Copy link
Copy Markdown
Collaborator

Overview

SecurityScheme validates type against http, apiKey, oauth2 and openIdConnect only, so the mutualTLS type added in OpenAPI 3.1 cannot be written in classic at all — the spec pipeline has carried it (with a 3.0 warn-and-omit) since the Auth scratch fixture was written, and the fixture could never cover it because the classic anchor could not express it. Third fix under the classic spec-compliance carve-out (#2190).

Changes

  • mutualTLS joins the type enum in SecurityScheme::$_types
  • SecurityScheme::validate() warns at 3.0.x, using the spec compiler's message text so one log expectation covers all three modes
  • Components::jsonSerialize() drops mutualTLS schemes from 3.0 documents — a scheme cannot remove itself from the parent map
  • The Auth fixture covers the scheme type in both syntaxes: the 3.0 expectation omits it, 3.1 and 3.2 carry it

SecurityScheme validated type against http, apiKey, oauth2 and
openIdConnect only, so the mutualTLS type added in 3.1 could not be
written at all. The type joins the enum, validate() warns at 3.0.x
with the same message the spec compiler uses - one shared log
expectation covers all three modes - and Components::jsonSerialize()
drops mutualTLS schemes from 3.0 documents, since a scheme cannot
remove itself from the parent map. The Auth fixture covers the scheme
type in both syntaxes: 3.0 omits it, 3.1 and 3.2 carry it.
DerManoMann added a commit to DerManoMann/swagger-php that referenced this pull request Sep 12, 2026
@DerManoMann
DerManoMann merged commit 7ab6c1e into zircote:master Sep 13, 2026
18 checks passed
@DerManoMann
DerManoMann deleted the fix/classic-mutualtls branch September 13, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant