swagger-api/swagger-codegen

Apex Petstore sample client errors

Open

#6,146 建立於 2017年7月22日

在 GitHub 查看
 (7 留言) (0 反應) (0 負責人)HTML (5,474 fork)batch import
Client: ApexIssue: Bughelp wanted

倉庫指標

Star
 (12,701 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Description

2 generated client classes (SwagPetApiTest, SwagStoreApiTest) are not compilable due to syntax errors.

Swagger-codegen version

2.2.3

Swagger declaration file content or url

http://petstore.swagger.io/v2/swagger.json

Command line used for generation

java -jar swagger-codegen-cli.jar generate -i http://petstore.swagger.io/v2/swagger.json -l apex

Steps to reproduce

Attempt to deploy SwagPetApiTest, SwagStoreApiTest to a Salesforce org. Deployment errors as follows (Eclipse Force.com IDE):

Description Resource Path Location Type Save error: Expression cannot be a statement. SwagPetApiTest.cls src/classes line 139 Force.com save problem Save error: Expression cannot be a statement. SwagStoreApiTest.cls src/classes line 46 Force.com save problem Save error: unexpected syntax: 'missing RPAREN at ';'' SwagPetApiTest.cls src/classes line 139 Force.com save problem Save error: unexpected syntax: 'missing RPAREN at ';'' SwagStoreApiTest.cls src/classes line 46 Force.com save problem

Related issues/PRs

None identified

Suggest a fix/enhancement

Erroring lines in the two classes are the same: ((Swagger.ApiKeyAuth) client.getAuthentication('api_key');

Fixed the client manually by changing the lines to: client.getAuthentication('api_key');

貢獻者指南