Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore non reflectable methods #920

Closed
wants to merge 972 commits into from
Closed

Ignore non reflectable methods #920

wants to merge 972 commits into from

Conversation

@gpenverne
Copy link

@gpenverne gpenverne commented Sep 30, 2016

When controller is generated dynamically by a factory , apidocbundle can't reflect method and throws exception.

jeskew and others added 16 commits Sep 26, 2014
willdurand
Copy link
Collaborator

willdurand commented on e7d3c80 Nov 4, 2014

:)

devster
Copy link
Contributor

devster commented on e7d3c80 Nov 4, 2014

I use this feature from days now and i don't see the problem you pointing at, can you be more explicit plz?

hoducha
Copy link

hoducha commented on e7d3c80 Nov 4, 2014

An error occur if the API support only one method. Should change the line 251 to:

{% if methods|length > 0 %}
hoducha
Copy link

hoducha commented on e7d3c80 Nov 4, 2014

Sorry, it works well. There is an error in my code. Thank you!

jupeter and others added 20 commits Jun 2, 2016
Fix wrapping of format table row
Links from index.rst to the other doc files
Fixed the links to some doc articles
Usage of OUTPUT_RAW to avoid javascript syntax error when dumping HTML
Add navigation index for resources
Allow filter descriptions to be used in conjunction with POST/PUT inp…
Key "statusCodes" for array with keys "method, uri, description, documentation, filters, requirements, parsedResponseMap, https, authentication, authenticationRoles, deprecated, id" does not exist in NelmioApiDocBundle::method.html.twig at line 182.

Sample:

 /**
     * Retrieves the list of categories (paginated) based on criteria.
     *
     * @apidoc(
     *  resource=true,
     *  output={"class"="Sonata\DatagridBundle\Pager\PagerInterface", "groups"={"sonata_api_read"}}
     * )
     *
     *
     * @QueryParam(name="page", requirements="\d+", default="1", description="Page for category list pagination")
     * @QueryParam(name="count", requirements="\d+", default="10", description="Number of categories by page")
     * @QueryParam(name="enabled", requirements="0|1", nullable=true, strict=true, description="Enabled/Disabled categories filter")
     * @QueryParam(name="context", requirements="\S+", nullable=true, strict=true, description="Context of categories")
     *
     * @view(serializerGroups="sonata_api_read", serializerEnableMaxDepthChecks=true)
     *
     * @param ParamFetcherInterface $paramFetcher
     *
     * @return PagerInterface
     */
Fix error: Key "statusCodes" for array with keys...
Fixed placeholder translations #889
andreyserdjuk
Copy link

andreyserdjuk commented on 8aa5e47 Aug 22, 2016

JSON_UNESCAPED_UNICODE - since php5.4, may be to avoid usage of it?

@@ -144,14 +144,17 @@ public function extractAnnotations(array $routes, $view = ApiDoc::DEFAULT_VIEW)
foreach ($this->annotationsProviders as $annotationProvider) {
foreach ($annotationProvider->getAnnotations() as $annotation) {
$route = $annotation->getRoute();
$array[] = array('annotation' => $this->extractData($annotation, $route, $this->getReflectionMethod($route->getDefault('_controller'))));
$reflectionMethod = $this->getReflectionMethod($route->getDefault('_controller'));
if (null !== $reflectionMethod) {
Copy link
Author

@gpenverne gpenverne Sep 30, 2016

Here, check if method can be reflected.

@kbsali
Copy link
Contributor

@kbsali kbsali commented Oct 3, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet