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
  • #1996
Closed
Open
Issue created Jan 27, 2019 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG] Symfony4 StrictJsonDeserializationVisitor::visitString declaration incompatible

Created by: BenjaminHae

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

When generating the code for php-symfony it does not work as intended with symfony 4.2.2. Running

php bin/console server:start 0.0.0.0:8000

and visiting an registered endpoint leads to the following fatal error:

(1/1) FatalErrorException
Compile Error: Declaration of OpenAPI\Server\Service\StrictJsonDeserializationVisitor::visitString($data, array $type, JMS\Serializer\Context $context) must be compatible with JMS\Serializer\JsonDeserializationVisitor::visitString($data, array $type): string
--
in StrictJsonDeserializationVisitor.php line 23
openapi-generator version

master, v4.0.0-beta, latest

Command line used for generation
docker run --rm -v ${PWD}:/local test/openapi-generator-cli generate -i /local/swagger.yaml     -g php-symfony -o /local/4Symfony
Steps to reproduce

Implement a symfony4 application by doing step 1 through 5 of the README. Then apply the fix for private controllers: https://github.com/OpenAPITools/openapi-generator/pull/1003 Start the server

php bin/console server:start 0.0.0.0:8000

and visit an endpoint.

Assignee
Assign to
Time tracking