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

Docblock augments #1244

Merged
merged 6 commits into from
May 24, 2022
Merged

Docblock augments #1244

merged 6 commits into from
May 24, 2022

Conversation

DerManoMann
Copy link
Collaborator

Fixes #1224

Extends the AugmentParameters processor to also look at the operations docblock.

Example:

class Controller {
    /**
     *
     * @param string $foo The foo parameter.
     */
    #[OAT\Get(path: '/lookup/{foo}')]
    #[OAT\PathParameter(name: 'foo')]
    public function lookup(string $foo) {
       //
    }
}

Here the foo path parameter would be augmented with the description from the lookup() function docblock - The foo parameter.

This behaviour can be turned off via Generator::setConfig():

(new Generator())
    ->setConfig(['augmentParameters' => ['augmentOperationParameters' => false]])

@DerManoMann DerManoMann merged commit f4601ed into zircote:master May 24, 2022
@DerManoMann DerManoMann deleted the docblock-augments branch May 24, 2022 00:06
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.

Include parameters based on context
1 participant