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

Merged
merged 1 commit into from
Jan 10, 2025

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
@wuchen90 wuchen90 force-pushed the fix-yaml-resource-extractor branch from d76f2b9 to aecd490 Compare January 10, 2025 09:38
@soyuka soyuka merged commit 0cf752b into api-platform:3.4 Jan 10, 2025
78 checks passed
@soyuka
Copy link
Member

soyuka commented Jan 10, 2025

Thanks!

@wuchen90 wuchen90 deleted the fix-yaml-resource-extractor branch January 10, 2025 10:58
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.

2 participants