[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.