use default value instead of if statement.
```php
@QueryParam(name="orderDirection", default="DESC", description="Order direction: asc or desc (if not specified - desc used)")
```