Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #9574
Closed
Open
Issue created May 25, 2021 by Administrator@rootContributor

[REQ][php-slim4] Reduce log noise

Created by: ybelenko

Is your feature request related to a problem? Please describe.

There is a noise in CLI output and FILES because of AbstractAuthenticator.php supporting file generation.

CLI output:

[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/config/dev/example.inc.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/config/prod/example.inc.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Middleware/JsonBodyParserMiddleware.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/BaseModel.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - writing file samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php
[main] INFO  o.o.codegen.TemplateManager - Skipped samples/server/petstore/php-slim4/.openapi-generator-ignore (Skipped by supportingFiles options supplied by user.)

FILES:

lib/Api/AbstractStoreApi.php
lib/Api/AbstractUserApi.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/Auth/AbstractAuthenticator.php
lib/BaseModel.php
lib/Middleware/JsonBodyParserMiddleware.php
lib/Model/ApiResponse.php

Describe the solution you'd like

This part can be wiped off entirely: https://github.com/OpenAPITools/openapi-generator/blob/6c40192706cf95329f03e4c80ea628fb32a8ecab/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlim4ServerCodegen.java#L251-L258

with 3 lines replacement to postProcessSupportingFileData:

if (objs.containsKey("hasAuthMethods") && Boolean.TRUE.equals(objs.get("hasAuthMethods"))) {
    supportingFiles.add(new SupportingFile("abstract_authenticator.mustache", toSrcPath(authPackage, srcBasePath), toAbstractName("Authenticator") + ".php"));
}

Describe alternatives you've considered

Additional context

Assignee
Assign to
Time tracking