OpenAPITools / OpenAPITools/openapi-generator
[BUG] attribute components.schemas.Schema name doesn't adhere to regular expression ^[a-zA-Z0-9.-_]+$
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)?
- 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
Hello, I use API Platform as API server and I use OpenAPI Generator to generate client for it from OpenAPI 3 Specs. API-Platform uses : as logical divider in Schema names and OpenAPI Generator does not like it.
-attribute components.schemas.Schema name CategoryProductTypeResource:jsonld doesn't adhere to regular expression ^[a-zA-Z0-9.-_]+$
openapi-generator version
3.1.0
OpenAPI declaration file content or url
Command line used for generation
openapi-generator generate -i openapi.json -g javascript -o client --additional-properties usePromises=true,useES6=true
Steps to reproduce
- Use provided OpenAPI declaration file content and command line for generation.
Related issues/PRs
Didn't found anything related
Suggest a fix
I'm not sure whether the problem is in Api-Platform, or the requirements of OpenAPITools are too strict.
Maybe add option to provide some kind of rename mapping:
{
"Category:jsonld-category_logo": "CategoryCategoryLogo"
}
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
Reproduce the report with the linked OpenAPI declaration and the shown JavaScript generation command, then trace where schema names are validated. Determine whether the generator or the input specification should change, and document the expected handling of names containing colons, including any rename mapping behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript, openapi
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100