cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
397 stars 132 forks source link

Support properties with invalid characters on identifiers #93

Closed FrankiePo closed 4 years ago

FrankiePo commented 4 years ago

My API is written in kebab-case The library generates following model:

/* tslint:disable */
export interface MultiFormAttachmentDto {
  /**
   * The description of the attachment.
   */
  attachment-description?: string;

  /**
   * The name of the attachment.
   */
  attachment-name?: string;
  // ....
}

How can I convert all my models to camelCase?

luisfpg commented 4 years ago

We cannot change the property names, because that's exactly what is going to be serialized / deserialized to / form JSON. However, in case the property contains invalid identifier characters, we should declare them as string. So, I'm adding the bug label and changing the title.