Skip to content

Cannot find API declaration when Basepath is included in swagger.json. #1

@csmcgee

Description

@csmcgee

StaticResourcesController.php
$data['basePath'] = $request->getBaseUrl() . $data['basePath'];

While attempting to use this bundle with static json files I noticed that I get an undefined error if I don't include base path in my api-docs.json file. When I add the base path the base path is added twice and I believe this is caused by the line above. Is there any reason why base path is appended like that?

I looked through swagger-php documentation for what base path is supposed to be and it should just be something like http://domain.com/api. The base path is already set through the request object so why append it with the json base path?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions