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

Add support for generator / processor configuration #1211

Merged
merged 5 commits into from
May 3, 2022

Conversation

DerManoMann
Copy link
Collaborator

@DerManoMann DerManoMann commented Apr 19, 2022

Allows to configure processors (and the Generator itself).

To kick things of the only option is to toggle the OperationId processor hash flag.

Default config:

[
    'operationId' => [
        'hash' => false
    ]
]

Top level key must match the processor class name (with a lower case'd first char).
Settings are applied via setXXX() methods, so unless there is a matching method for the config option nothing will happen.

A minor BC break is that the config is applied each time Generator::getProcessors() is called. This allows to also configure custom processors the same way.

For obvious reasons, callable processors are skipped :)

The actual BC break is that swappng the OperationId processor for an instance with different configuration wil no longer have any effect.
On the plus side it is a lot simpler to just call setConfig() than swapping a processor.

@DerManoMann DerManoMann merged commit 22cec77 into zircote:master May 3, 2022
@DerManoMann DerManoMann deleted the config branch May 3, 2022 23:34
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