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
  • #9998
Closed
Open
Issue created Jul 21, 2021 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG][php] Composer 2 package name error

Created by: ybelenko

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

There is an error during Composer installation:

composer install
[Composer\Json\JsonValidationException]                                                                     
  "./composer.json" does not match the expected JSON schema:                                                  
   - name : Does not match the regex pattern ^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9](([_.]?|-{0,2})[a-z0-9]+)*$

I think it happens since Composer 2 version(mine is Composer version 2.0.12 2021-04-01 10:14:59)

openapi-generator version

Latest master

OpenAPI declaration file content or url

Not important, can be checked with current PHP client samples.

Generation Details
Steps to reproduce

Navigate to samples/client/petstore/php/OpenAPIClient-php and run composer install.

Related issues/PRs
Suggest a fix

We should hide name property in composer.json when Git vendor and user id not specified.

Assignee
Assign to
Time tracking