Skip to content

Conversation

@DavidBennettUK
Copy link
Contributor

Q A
Branch? 4.2
Tickets #7460
License MIT
Doc PR N/A

Potential fix for #7460. This fixes the issue for me, but not sure if it's the best way, or if there will be any side effects.

…peration using the `:property` template valid + property restriction.
$parameters = $operation->getParameters() ?? new Parameters();
foreach ($parameters as $key => $parameter) {
['propertyNames' => $propertyNames, 'properties' => $properties] = $this->getProperties($resourceClass, $parameter);
['propertyNames' => $propertyNames, 'properties' => $properties] = $this->getProperties($resourceClass, $parameter, $key);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What bother's me is that a parameter should always have akey, would it be possible to change the loop and do:

foreach ($parameters as $key => $parameter) {
    if (!$parameter->getKey()) {
        $parameter = $parameter->withKey($key);
    }

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