Nelmioapidocbundle: Assets returning 404

Created on 8 Jan 2018  路  13Comments  路  Source: nelmio/NelmioApiDocBundle

I'm using SF4 with Flex, I've updated this bundle (^3.0), but when run api/doc endpoint in the browser I getting:

screen shot 2018-01-07 at 11 37 39 pm

Most helpful comment

I don't know if this is an acceptable solution, but I solved this issue by copying the assets with the following command
php bin/console assets:install --symlink

All 13 comments

I don't know if this is an acceptable solution, but I solved this issue by copying the assets with the following command
php bin/console assets:install --symlink

normally, this should happen in a composer task to install the assets. is our recipe missing something to tell flex that it should set up that hook?

I get this when reinstall the bundle and still getting 404 with the bundle resources

screen shot 2018-01-08 at 6 38 25 pm

but when you run the assets:install command on its own, it works?

is not working

@JonathanLafey are you using symfony 4 and flex? did you migrate from a symfony 3 application or start with SF 4 from scratch? @iaejean did you start from scratch? i'd like to find the difference if it works for one of you but not the other. either the assets do not work with just the SF4 skeleton, or @iaejean somehow broke his setup - so either we need to fix something or not ;-)

@dbu I'm still using symfony 3.3 without flex. Migration will happen sometime next month, when I will report back on whether the manual installation will be still needed.
I'm also working using MicroKernelTrait, in case this somehow causes the said issue.

Actually I start my project recently with Flex and SF4, and no, I didn't use Scratch

i'd like to find the difference if it works for one of you but not the other. either the assets do not work with just the SF4 skeleton, or @iaejean somehow broke his setup - so either we need to fix something or not ;-)

I just tried installing nelmioapidocbundle on a new project using Flex and it worked fine. Did you run composer require asset?

I've reinstalled nelmioapidocbundle and symfony/asset too and still not working, I tried to comment all my services, listeners etc looking for a dependency conflict behaviour but without any good news!

I'm running my web server with:

php -S localhost:8000 public/index.php

Do I have to check this with an nginx or apache configuration?

Edit: I configured my Nginx Server and its working, I don't know if this endpoint should be working for symfony/dotenv

is this really specific to this bundle, or a general problem with flex? i don't think the api doc bundle does anything unusual with regards to assets... what is the doc root when you start the php server like this? ./public or ./ ? the old symfony doc used the -t parameter to set the docroot. current doc says to use the server:run command

Thanks a lot, this work with nginx as I said before and with web server bundle!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Gemorroj picture Gemorroj  路  6Comments

andydandy80 picture andydandy80  路  4Comments

smuralidharan picture smuralidharan  路  3Comments

ganchito55 picture ganchito55  路  4Comments

DavidGarciaCat picture DavidGarciaCat  路  4Comments