laminas-api-tools / api-tools-admin-ui

Laminas API Tools Admin UI module
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
6 stars 11 forks source link

Unable to fetch Doctrine metadata #3

Open weierophinney opened 4 years ago

weierophinney commented 4 years ago

The request for address http://myapp.com/apigility/api/doctrine/doctrine.entitymanager.orm_default/metadata/Application%5CEntity%5CUser return :

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /apigility/api/doctrine/doctrine.entitymanager.orm_default/metadata/Application\Entity\User was not found on this server.</p>
<hr>
<address>Apache/2.4.18 (Win32) PHP/7.0.4 Server at myapp.com Port 80</address>
</body></html>

The request it's performed with AngularJS service $http, but the Url is incorrect. The bars () that are guilty. I modified the Url replacing the bars for the hyphen in the request and adding the server side the rule to reverse.

I don't know if is the best solution, but I needed to be fast. The solution is temporary. I wait for solution.


Originally posted by @leandrogf at https://github.com/zfcampus/zf-apigility-admin-ui/issues/140

weierophinney commented 4 years ago

@leandrogf Can you submit PR with your solution, please?


Originally posted by @michalbundyra at https://github.com/zfcampus/zf-apigility-admin-ui/issues/140#issuecomment-280608752

weierophinney commented 4 years ago

@leandrogf Sorry, I just noted that probably everything is fine with it, please see "note about using apache" in zf-apigility-skeleton: https://github.com/zfcampus/zf-apigility-skeleton#note-about-using-apache

Basically you need add to your apache configuration:

AllowEncodedSlashes On

Hope it helps.


Originally posted by @michalbundyra at https://github.com/zfcampus/zf-apigility-admin-ui/issues/140#issuecomment-282251530