Skip to content

[cpp-restsdk] Dots and dashes are allowed in C++ identifiers.  #621

Description

@Jauler
Description

When generating cpprest dots and dashes are allowed for C++ identifier names which causes uncompilable code like:

class  Io.k8s.kubernetes.pkg.api.v1.Service
    : public ModelBase
{
...
openapi-generator version

3.1.2-SNAPSHOT

openapi declaration file content or url

https://raw.githubusercontent.com/kubernetes/kubernetes/v1.10.4/api/openapi-spec/swagger.json

Command line used for generation
java -jar ./modules/openapi-generator-cli/target/openapi-generator-cli.jar generate --generator-name cpp-restsdk --output output -i https://raw.githubusercontent.com/kubernetes/kubernetes/v1.10.4/api/openapi-spec/swagger.json
Steps to reproduce

Just running above command reproduces the issue.

Suggest a fix/enhancement

Maybe map dots to "_", but care must be taken to avoid name clashes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions