Skip to content
This repository was archived by the owner on Jun 9, 2019. It is now read-only.
This repository was archived by the owner on Jun 9, 2019. It is now read-only.

localhost/resources not showing any API's #14

@MichaelCPGordon

Description

@MichaelCPGordon

Hi there,

I'm having trouble getting the API explorer to work correctly with my restler API's.

When I go to localhost/explorer, I get the API Explorer header bar at the top of the page and below I get text saying "fetching resource list: ../resources.json" but nothing else.

When I go to localhost/resources, the page returns the following:

{
    "apiVersion": "1",
    "swaggerVersion": "1.1",
    "basePath": "http://localhost",
    "produces": [
        "application/json"
    ],
    "consumes": [
        "application/json"
    ],
    "apis": [

    ]
}

So I'm guessing that it's setting up the resources.json file but doesn't seem to acknowledge that my API's exist?

Here's my index.php file:

<?php
use Luracast\Restler\Restler;
require_once '../vendor/restler.php';

$r = new Restler();

$r->addAPIClass('Resources');
$r->addAPIClass('Employee', 'employees');

$r->addAuthenticationClass('BasicAuth');
$r->handle();

I've also tried testing this with another restler project which had a multiple API's and I have the same issue. Anything obvious that I'm missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions