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

routing should be in routes/web.php for generated Lumen server stub #7530

Open
Lv-Yi opened this issue Jan 30, 2018 · 5 comments
Open

routing should be in routes/web.php for generated Lumen server stub #7530

Lv-Yi opened this issue Jan 30, 2018 · 5 comments

Comments

@Lv-Yi
Copy link

Lv-Yi commented Jan 30, 2018

Description

routing should be in routes/web.php for generated Lumen server stub ever since Lumen 5.3+.
The generated Lumen server stub put all routing in lib\app\Http\routes.php.
This works only for Lumen 5.2 and older version. Please refer to:
https://lumen.laravel.com/docs/5.2/routing#basic-routing

Swagger-codegen version

2.3.1

Swagger declaration file content or url

any API doc in yaml/json format, including default PetStore example.

Command line used for generation

Using codegen functionality integrated in swagger-editor. But I don't think it's related with specific cmd line options a.f.a.i.k.

Steps to reproduce

Select generate server->Lumen in swagger-editor menu.

Related issues/PRs
Suggest a fix/enhancement

Ever since Lumen 5.3+ (my framework: Lumen 5.5), the routing has been moved to routes\web.php.
And with this directory structure changes, current generated server stub code would cause error 404
due to syntactic error in routes.php.
Please refer to:
https://lumen.laravel.com/docs/5.3/routing#basic-routing

@HugoMario
Copy link
Contributor

@qcarduinoyun

if you are using codegen 3.0.0 you must keep in mind that currently this version supports only javaand inflector languages.

@Lv-Yi
Copy link
Author

Lv-Yi commented Mar 6, 2018

@HugoMario
I'm using latest swagger-editor. What's codegen version# in that one?

@HugoMario
Copy link
Contributor

@qcarduinoyun right now, editor is pointing to codegen 2.3.x as far i know.

@webron
Copy link
Contributor

webron commented Mar 12, 2018

It used to point to 2.2.3, as of today it's pointing to 2.3.1.

@Lv-Yi
Copy link
Author

Lv-Yi commented Mar 16, 2018

@HugoMario @webron
Thanks for heads up. Just corrected swagger codegen version.

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

Successfully merging a pull request may close this issue.

3 participants