Skip to content

Use "_eq" instead of "=" as query parameter on filters #7219

@iskandersierra

Description

@iskandersierra

Describe the bug
When generating the OpenAPI document, a lot of query parameters gets generated for the find queries. Most parameters are of the form _<operator> like _ne and _lt. However the equality operator gets generated as a single equals symbol, like =.

This messes up some client code generators, specially outside javascript world.

The behavior of this when issuing the query is that a url like http://.../restaurant?==test gets generated, and even when it works properly, it seems confusing to me.

Steps to reproduce the behavior

  1. Enable documentation plugin
  2. Generate the swagger document
  3. Open the documentation page in any of the GET / operations
  4. Check that there is a parameter with name =

Expected behavior
For consistency and compatibility reasons, the equality operator should be named _eq

Screenshots
image

System

  • Node.js version: 14.5.0
  • NPM version: 6.14.5
  • Yarn version: 1.22.4
  • Strapi version: 3.1.1
  • Database: sqlite
  • Operating system: Windows 10

** Additional Context **
I know solving this might pose a Breaking Change, and it is not a bug, but a consistency issue.

Thanks for this marvel of a project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solvesource: plugin:documentationSource is plugin/documentation packagestatus: confirmedConfirmed by a Strapi Team member or multiple community members

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions