OpenAPITools / OpenAPITools/openapi-generator
[BUG] [PHP] Some models do not have a baseType
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
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
Some models do not have a baseType property, which causes broken links (e.g. ../Model/.md) and duplicated qualifiers (e.g. \OpenAPI\Client\Model\\OpenAPI\Client\Model\StringEnumRef) in the documentation of the PHP generator.
openapi-generator version
This issue occurs on master (7d8eacc197656fbf4360ccb6dc0ffb24bc0219d4)
OpenAPI declaration file content or url
The issue occurs with the echo_api spec included in the generator samples.
Generation Details
See the php-nextgen-echo-api.yaml config
Steps to reproduce
Related issues/PRs
This issue was previously mentioned in #19567
Suggest a fix
Finding the reason the baseType is not set and solving it should fix this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the echo_api spec and the php-nextgen-echo-api.yaml config, then reproduce the generated PHP documentation. Compare models without a baseType to the broken links and duplicated qualifiers described here, and review issue #19567 for context. Done means the affected generated documentation no longer contains those malformed references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, php
- Domain
- api, documentation, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100