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

Error "Unable to find the URL for" for custom resource without get operation #53

Closed
jewome62 opened this issue May 6, 2019 · 1 comment

Comments

@jewome62
Copy link

jewome62 commented May 6, 2019

Hello,

I've created an API Resource for ChangePassword Request
for add entrypoint with POST operation with custom controller.
There are no GET operations (as item or collection)

<?php

declare(strict_types=1);

namespace App\User\Request;

use ApiPlatform\Core\Annotation\ApiResource;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * @ApiResource(
 *     collectionOperations={
 *         "post"={
 *             "method"="POST",
 *             "path"="/token/verify",
 *             "controller"="App\User\Action\Account\VerifyTokenAction"
 *         }
 *     },
 *     itemOperations={}
 * )
 */
final class VerifyTokenRequest
{
    /**
     * @var string
     * @Assert\NotBlank
     */
    public $token;
}

But into api-doc-parser, (used by API Platform Admin), in this case, i have a error cause by this new entry into documentation. And display Unable to retrieve API documentation. into browser.

Error: "Unable to find the URL for "http://localhost:8080/docs.jsonld#Entrypoint/VerifyTokenRequest"."
    parseHydraDocumentation parseHydraDocumentation.js:398
index.js:2178
    __stack_frame_overlay_proxy_console__ React
    componentDidMount HydraAdmin.js:86
@kingschnulli
Copy link

Is there any workaround for this until this is fixed? @jewome62 did you find some way to get around this error?

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

No branches or pull requests

3 participants