forked from loafle/openapi-generator-original
[Slim] Update README template
I'm not sure about `middlewareSrcPath` variable. I'll fix it in following PRs if path is broken. Hope that notice in README catches attention and most of users will read it.
This commit is contained in:
@@ -118,6 +118,9 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen {
|
||||
|
||||
additionalProperties.put("middlewarePackage", middlewarePackage);
|
||||
|
||||
// make middleware src path available in mustache template
|
||||
additionalProperties.put("middlewareSrcPath", "." + File.separator + toSrcPath(middlewarePackage, srcBasePath));
|
||||
|
||||
supportingFiles.add(new SupportingFile("README.mustache", getPackagePath(), "README.md"));
|
||||
supportingFiles.add(new SupportingFile("composer.mustache", getPackagePath(), "composer.json"));
|
||||
supportingFiles.add(new SupportingFile("index.mustache", getPackagePath(), "index.php"));
|
||||
|
||||
@@ -7,4 +7,15 @@ is an example of building a PHP Slim server.
|
||||
|
||||
This example uses the [Slim Framework](http://www.slimframework.com/). To see how to make this your own, please take a look at the template here:
|
||||
|
||||
[TEMPLATES](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/slim/)
|
||||
[TEMPLATES](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/php-slim-server/)
|
||||
|
||||
{{#authMethods}}
|
||||
{{^hasMore}}
|
||||
## Authentication
|
||||
{{/hasMore}}
|
||||
{{/authMethods}}
|
||||
{{#authMethods}}
|
||||
{{#isBasic}}
|
||||
> Important! To make Basic Authentication work you need to implement `verifyCredentials` method in [AuthBasic]({{middlewareSrcPath}}\AuthBasic.php) class.
|
||||
{{/isBasic}}
|
||||
{{/authMethods}}
|
||||
|
||||
Reference in New Issue
Block a user