Skip to content

fix(Compiler): name the declaration in 3.0 schema warnings - #2370

Merged
DerManoMann merged 1 commit into
zircote:masterfrom
DerManoMann:fix/schema-label
Nov 8, 2026
Merged

DerManoMann merged 1 commit into
zircote:masterfrom
DerManoMann:fix/schema-label

Conversation

@DerManoMann

Copy link
Copy Markdown
Collaborator

Overview

A schema that is not a component has no name, so under 3.0 every warning about one reads the same, e.g. Schema: const is not supported in OpenAPI 3.0, using enum fallback. Two properties tripping the same check print the same line twice. That looks like one schema reported twice, and gives nothing to search for.

The 3.1 schema warnings already end with the declaration (Class::$property in file). The 3.0 ones now do too.

Changes

  • every 3.0 schema warning ends with the schema's declaration, when it has one
  • OpenApi31Compiler::schemaLocation(), shared by both compilers
  • a CompilerTest case for property schemas and one built in code

Each 3.0 schema warning ends with where the schema was declared, the way
the 3.1 ones do, when the schema has a reflector. A schema built in code
keeps the message as it was.
@DerManoMann
DerManoMann merged commit 568de01 into zircote:master Nov 8, 2026
20 checks passed
@DerManoMann
DerManoMann deleted the fix/schema-label branch November 8, 2026 05:28
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