BishopFox/sj

OpenAPI Server parameter not respected tot he fullest.

Closed this issue · 1 comments

Describe the bug

I have a OpenAPI 3.0.0 specification that has a "servers": [ { "url": "http://DOMAIN/v3", "description": "Endpoint for the APIs" } ] but the program only uses the <DOMAIN> without including the API versioning the url and thus getting a 404 status code on automate command. Should probably be the same when i do the prepare command.

Expected behavior

It should respect and use the whole url, with the scheme, domain and path specified. If the api is at https://domain/api then i might miss it by omitting the /api path.

Without seeing the full command used and the associated definition file I'm unable to identify what the issue is here. In any case, you can use the -b option to specify the base path as shown in the example below:

$ sj automate -u http://<DOMAIN> -b /v3/
#or
$ sj prepare -u http://<DOMAIN> -b /v3/