Apiato: Validations redirect to api home path

Created on 24 Mar 2018  Â·  5Comments  Â·  Source: apiato/apiato

Expected Behavior

When applying rules from Request Class, If have any invalid element from user input we should return the error message

Actual Behavior

When entering an invalid value for a field (JSON input) I got the message "Welcome to Apiato"

Steps to Reproduce the Problem

Create sample container with API only
Just apply the rules in the requested Class
Note: I was run composer update/install and some repos have been updated...

Specifications

I'm running Windows 10, PHP 7.2.3, OracleDB (Oci8)

  • Apiato Version: 7.4.4

Additional Details

I don't know why this happens??
Will try with the blank Apiato project without any modification

Most helpful comment

You may actually add the Accept : application/json header to the request.. can you try? This is most likely because your request does not contain required headers..

Regular web browser cannot add such headers, therefore it bypasses and routes to / ..

Cheers

All 5 comments

You may actually add the Accept : application/json header to the request.. can you try? This is most likely because your request does not contain required headers..

Regular web browser cannot add such headers, therefore it bypasses and routes to / ..

Cheers

Hello
Thanks for the fast reply, that fixed my problem... But I think we should check the headers to prevent this error...
I'm using Postman to test the API, for most other APIs they do not check for the missing "Accept" in headers but still return the error message.

There is an config flag that checks for this in a dedicated Middleware! Can
you check the docs?

vituocgia notifications@github.com schrieb am Sa., 24. März 2018, 12:39:

Hello
Thanks for the fast reply, that fixed my problem... But I think we should
check the headers to prevent this error...
I'm using Postman to test the API, for most other APIs they do not check
for the missing "Accept" in headers but still return the error message.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/apiato/apiato/issues/391#issuecomment-375877209, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AI_pNp92gRBgqkPAMb70M9p8g3_74dMMks5thjB1gaJpZM4S5sbX
.

I'll close this.. if you have additional questions, please ask..

Cheers

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mohammad-Alavi picture Mohammad-Alavi  Â·  3Comments

jbaron-mx picture jbaron-mx  Â·  3Comments

lukaszduda picture lukaszduda  Â·  5Comments

livevasiliy picture livevasiliy  Â·  6Comments

nmrgt picture nmrgt  Â·  7Comments