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

feat: support configuring all params in alternative name models #2345

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Sep 27, 2024

Q A
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #...

Adds feature parity to model creation in yaml via nelmio_api_doc.models.names by also supporting options and serializationContext.

Tested in a local project, e.g.

    models:
        names:
            - { alias: Error, type: App\Model\Error, options:  { foo: bar }, serializationContext: { useJms: false }  }

lead to
grafik

inspired by #2342 (comment)
fyi @kevinpapst

it's the first time I touch this Symfony Config TreeBuilder stuff btw..

@herndlm herndlm force-pushed the alternative-names-options-serialization-context branch 2 times, most recently from 684d4f2 to 72e6dc1 Compare September 27, 2024 10:00
@herndlm herndlm force-pushed the alternative-names-options-serialization-context branch from 72e6dc1 to f30d53b Compare September 27, 2024 10:02
@herndlm
Copy link
Contributor Author

herndlm commented Sep 27, 2024

fyi @DjordyKoert

CHANGELOG.md Outdated Show resolved Hide resolved
src/DependencyInjection/Configuration.php Show resolved Hide resolved
tests/DependencyInjection/ConfigurationTest.php Outdated Show resolved Hide resolved
tests/Model/ModelRegistryTest.php Outdated Show resolved Hide resolved
@herndlm
Copy link
Contributor Author

herndlm commented Sep 30, 2024

adapted @DjordyKoert

sorry for being impatient, but you think you can put this and the other serializationContext pass-through fix into the next release? 😊

@DjordyKoert DjordyKoert merged commit 958bbcd into nelmio:master Sep 30, 2024
15 checks passed
@DjordyKoert
Copy link
Collaborator

@herndlm sorry had a busy weekend 😅

Anyways thank you for the PR's! ❤️

@herndlm herndlm deleted the alternative-names-options-serialization-context branch September 30, 2024 13:02
@herndlm
Copy link
Contributor Author

herndlm commented Sep 30, 2024

Thanks! I wasn't expecting you to check something here on the weekend, no worries :)

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.

3 participants