-
-
Notifications
You must be signed in to change notification settings - Fork 804
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
model swagger error after publish template to resource #413
Comments
#334 same issue |
What's the swagger URL, to have API documentation? |
@dukenst2006 Install Add Run vendor publish. After that, you can browse But, it still doesn't support Laravel v5.4+. To use under Laravel v5.4+, you need to manually delete two lines in the L51-52 or check the laravel version first as mentioned here. |
@LarryZhang |
@mitulgolakiya |
@skys215 we have new year holidays here. I will check it this weekend and will see if I can resolve it quickly. |
Currently I'm changing the helpers.php in the vendors file until the author fixes this problem. function get_template_file_path($templateName, $templateType = 'infyom-generator-templates')
{
$templateName = str_replace('.', '/', $templateName);
$templatesPath = base_path('resources/infyom/'.$templateType.'/');
$path = $templatesPath.$templateName.'.stub';
if (file_exists($path)) {
return $path;
}
return base_path('vendor/infyomlabs/'.$templateType.'/templates/'.$templateName.'.stub');
} Updated: So I changed like this: function get_template_file_path($templateName, $templateType = 'infyom-generator-templates')
{
$templateName = str_replace('.', '/', $templateName);
if($templateType == 'laravel-generator'){
$templateType = 'infyom-generator-templates';
}
$templatesPath = base_path('resources/infyom/'.$templateType.'/');
$path = $templatesPath.$templateName.'.stub';
if (file_exists($path)) {
return $path;
}
if($templateType == 'infyom-generator-templates'){
$templateType = 'laravel-generator';
}
return base_path('vendor/infyomlabs/'.$templateType.'/templates/'.$templateName.'.stub');
} Checked the Updated: function get_template_file_path($templateName, $templateType = 'infyom-generator-templates')
{
$templateName = str_replace('.', '/', $templateName);
if ($templateType == 'laravel-generator' || $templateType == 'adminlte-templates') {
$old_templateType = $templateType;
$templateType = 'infyom-generator-templates';
}
$templatesPath = base_path('resources/infyom/' . $templateType . '/');
$path = $templatesPath . $templateName . '.stub';
if (file_exists($path)) {
return $path;
}
dump($path . ' not exists' . "\n");
if ($templateType == 'infyom-generator-templates') {
$templateType = $old_templateType;
}
return base_path('vendor/infyomlabs/' . $templateType . '/templates/' . $templateName . '.stub');
} Actually, |
@mitulgolakiya |
@skys215 I have just fixed template error. It seems like |
Ok, I'll have a check of new commits. |
@mitulgolakiya are you sure you have fixed the problem? I have configured slampenny/Swaggervel and did publish but seems in /vendor/swaggervel folder which is in the /public folder js and css files are missing
|
@gelinger777 I would say you give a try to use this new package |
@mitulgolakiya yes, you are right. In the docs you left the old name of the package. It messed me up a bit things. http://labs.infyom.com/laravelgenerator/docs/5.7/generator-options here you can find jlapp/swaggervel and wrong link |
@gelinger777 good finding. I updated it but in installation step only. Updated the docs everywhere now. |
I am trying to generate model swagger docs, and I found that final model file has error . then I figure out that $template = get_template('model.model', 'swagger-generator');
will get the model.model from the /resources/infyom/infyom-generator-templates/model/model.stub
and I think this is big error
The text was updated successfully, but these errors were encountered: