Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(metadata): make the schema attribute to fallback to null for parameters in YamlResourceExtractor #6896

Open
wants to merge 1 commit into
base: 3.4
Choose a base branch
from

Conversation

wuchen90
Copy link
Contributor

@wuchen90 wuchen90 commented Jan 8, 2025

Q A
Branch? 3.4
License MIT

When we omit the schema attribute for parameters config in YAML resource definition, the YamlResourceExtractor breaks.

Definition like this:

resources:
  Foo:
    operations:
      ApiPlatform\Metadata\GetCollection:
        parameters:
          bar:
            # schema: ...
            property: baz

For DX, the schema attribute should logically fallback to null as \ApiPlatform\Metadata\Parameter::__construct defines it.

@wuchen90 wuchen90 force-pushed the fix-yaml-resource-extractor branch from b7e7f11 to a9bb865 Compare January 8, 2025 13:49
@wuchen90 wuchen90 changed the title fix(metadata): make the schema attribute to fallback to null when not set for parameters in YamlResourceExtractor fix(metadata): make the schema attribute to fallback to null for parameters in YamlResourceExtractor Jan 8, 2025
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