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.-_]+$
3.1.0
openapi-generator generate -i openapi.json -g javascript -o client --additional-properties usePromises=true,useES6=true
Didn't found anything related
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"
}
馃憤 Thanks for opening this issue!
馃彿 I have applied any labels matching special text in your issue.
The team will review the labels and make any necessary changes.
馃憢 Any news about that problem?
As a follow up, jsonld generates property names like @id and @context which are then changed to just id and context as the model property name.
This can cause duplicates in typescript models if there is another property without the @. E.g. id or context.
Is there a way to generate the model property names and keep them @id? I tried the allowUnicodeIdentifiers option.
Same issue here. Have you found any workaround?
Same problem.
For reference, it sounds like the OpenAPI files generated by API Platform don't comply with the Schema name restrictions specified in OpenAPI 3. See OAI/OpenAPI-Specification#634 and OAI/OpenAPI-Specification#1387 for spec discussion, api-platform/api-platform#1493 for API Platform discussion.