omdbapi / OMDb-API

The Open Movie Database Bug Tracking
418 stars 21 forks source link

API request using two mutually exclusive parameters obtains 200 status code #260

Open apibugsreporting opened 2 years ago

apibugsreporting commented 2 years ago

The API documentation (including the Swagger definition) states that either the parameter i (ID) or t (title), or s (search) must be used. But when making the following request: GET https://omdbapi.com/?s=unsnarl&plot=full&i=tt1331292&y=2006&type=movie

Which uses both i and s, a 200 status code is obtained. Shouldn't the request be considered invalid and obtain a 400 status code? If not, what is the expected behavior? What parameter has preference over the other?

A test report revealing this issue is available at: http://apitesting.ddns.net/fse2022/restest/target/allure-reports/omdb__r_cbt_perturbation/#behaviors/b1a8273437954620fa374b796ffaacdd/74eb79ae547ed7b5/