-
-
Notifications
You must be signed in to change notification settings - Fork 914
Support for normalization groups and filters in the Swagger doc #753
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
Support for normalization groups and filters in the Swagger doc #753
Conversation
@@ -127,119 +126,235 @@ private function getPath(string $resourceShortName, array $operation, bool $coll | |||
* | |||
* @return \ArrayObject | |||
*/ | |||
private function getPathOperation(string $operationName, array $operation, string $method, bool $collection, ResourceMetadata $resourceMetadata, array $mimeTypes) : \ArrayObject | |||
private function getPathOperation(string $operationName, array $operation, string $method, bool $collection, string $resourceClass, ResourceMetadata $resourceMetadata, array $mimeTypes, \ArrayObject $definitions) : \ArrayObject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PHPDoc must be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like the mutating of $definitions
. This is a step backwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Simperfit If the code structure does not lend itself well to the new requirements, don't try to shoehorn things into the existing structure. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@teohhanhui why? It's an object not an array, so it's by definition a reference and it's ok to mutate it.
I don't get the benefit of using \ArrayObject
instead of a raw array if we cannot use such features :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I only used \ArrayObject
for the "empty object" behaviour when serialized to JSON. Anyway, immutability makes for cleaner code. And that's what I focused on in my previous refactoring. Now it's being undone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I'm 👍 for merging as is. We can always refactor later...
LGTM ;) |
7801a53
to
ae7ea2f
Compare
ae7ea2f
to
94119bd
Compare
Thanks @Simperfit |
…n-out-in-swagger-doc Support for normalization groups and filters in the Swagger doc
WIP
It does fixes the issues in #728, now swagger docs output groups correctly.