Description
when a version 2 IDL file uses basePath, the php client generator includes basePath as part of the URL, e.g., http://localhost/basePath/foo. unfortunately, the routing for the slim server lacks this value, processing http://localhost/foo. a simple client built according to the README will not just communicate with the default slim server.
looking at samples/server/petstore i suspect this is a problem for:
- aspnet5
- go-api-server
- jaxrs-cxf
- lumen
- scalatra
- silex
- slim
Swagger-codegen version
2.1.6, 2.2.0 and master
Swagger declaration file content or url
swagger: '2.0'
info:
version: 0.0.1
title: basePath
host: localhost
schemes:
- http
basePath: '/basePath'
paths:
/foo:
get:
operationId: getFoo
responses:
'200':
description: retrieved foo
Command line used for generation
'''bash
java -jar ../swagger-codegen-cli.jar generate -l php --config swagger.json -o gen -i basePath.yaml
java -jar ../swagger-codegen-cli.jar generate -l slim -o gen -i basePath.yaml
'''
Steps to reproduce
extract basePath.zip.
on one tty:
'''bash
make server
'''
on another tty:
'''bash
make client
'''
Related issues
#1425
Suggest a Fix
with #1439 put {{basePathWithoutHost}} in appropriate places.
Description
when a version 2 IDL file uses basePath, the php client generator includes basePath as part of the URL, e.g., http://localhost/basePath/foo. unfortunately, the routing for the slim server lacks this value, processing http://localhost/foo. a simple client built according to the README will not just communicate with the default slim server.
looking at samples/server/petstore i suspect this is a problem for:
Swagger-codegen version
2.1.6, 2.2.0 and master
Swagger declaration file content or url
Command line used for generation
'''bash
java -jar ../swagger-codegen-cli.jar generate -l php --config swagger.json -o gen -i basePath.yaml
java -jar ../swagger-codegen-cli.jar generate -l slim -o gen -i basePath.yaml
'''
Steps to reproduce
extract basePath.zip.
on one tty:
'''bash
make server
'''
on another tty:
'''bash
make client
'''
Related issues
#1425
Suggest a Fix
with #1439 put {{basePathWithoutHost}} in appropriate places.