0
votes

I am trying out the Platform API framework that works with Symfony.

I am following their docs and trying to set up the little demo API.

https://api-platform.com/docs/distribution/#via-composer

Everything goes OK, at least I think.

When I run the server I see no UI.

I only see this text in my browser:

{
    "@context": "/contexts/Entrypoint",
    "@id": "/",
    "@type": "Entrypoint",
    "book": "/books",
    "person": "/people",
    "organization": "/organizations" 
}

instead of having this:

UI

Anyone knows what goes wrong here?

I am using composer for this little demo.

1
Can you show your Controller? - Imanali Mamadiev
What's the expected output? - Magnus Eriksson
@MagnusEriksson this is the expected output api-platform.com/data/distribution/images/swagger-ui-1.png - Achraf
not sure about api-platform, but in Symfony I'd wonder if you did assets:install, assetic:dump and cache:clear (all part of successful composer install).. - Rein Baarsma
have you tried a hello world php page to make sure your webserver is configured correctly? - beterthanlife

1 Answers

1
votes

Check the PHP version you use. Be sure to run PHP 7+ or Composer will install API Platform 1 (the UI was introduced in API Platform 2).