Monday, 23 December 2019

DarkaOnline Swagger-php generates incorrect interface

I'm currently using a Swagger php library by: https://github.com/DarkaOnLine/L5-Swagger

And in my sample model class is as such:

/** @OA\Schema(
 *    title="ProductPromotion",
 *  @OA\Property(property="id", type="integer"),
 * @OA\Property(property="uid", type="string"),
 * @OA\Property(property="store_id", type="integer"),
 * )
 */
class ProductPromotion extends Model
{
..
}

Notice that I wrote "store_id" in the 3rd property there. But when I used this jar file: openapi-generator-cli-4.1.3, I get the interface as such:

export interface ProductPromotion { 
    id?: number;
    uid?: string;
    storeId?: number;
}

The name changes from "store_id" to "storeId". I don't want this, anyone knows how to solve this?



from DarkaOnline Swagger-php generates incorrect interface

No comments:

Post a Comment