-
Notifications
You must be signed in to change notification settings - Fork 941
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
OperationIds are no longer optional since the addition of validation in version 4.2.10 #1153
Comments
Well, but that is the thing - they are specified. Optional means they are not in the spec. Having The cause for this is here: https://github.com/nelmio/NelmioApiDocBundle/blob/master/OpenApiPhp/DefaultOperationId.php#L32.
I think the reason for this 'hack' was that historically operation ids were not always unique when swagger-php generated it. However, this has changed (I think). Furthermore, there is a simpler way of avoiding operation ids altogether and that is to drop the OperationId processor in swagger-php. Having said all that, I appreciate that |
Thank you for the explanations and the modification 👍 |
I think the issue originates in the fact that the We need this because we generate a lot of annotations in NelmioApiDocBundle, and we don't always have a file/method/line to provide to the context so it unfortunately doesn't generate unique operation ids in our case. The issue was mitigated by nelmio/NelmioApiDocBundle#1907 and I left the complete fix for later. If you don't like having a special case for the |
Oh actually I just checked #1154 and this won't do for our case as we used |
As noted here nelmio/NelmioApiDocBundle#1967, the optional aspect of operationIds indicated in the specifications is no longer respected since the addition of the operationId uniqueness check in version 4.2.10 (#1149).
As I understand it, these identifiers must be unique if they are specified which is not mandatory. If this is the case, then null values should not be taken into account in the validation.
The text was updated successfully, but these errors were encountered: