Swagger-codegen: [PHP] Imcomplete CamelCase class name

Created on 11 Sep 2017  路  8Comments  路  Source: swagger-api/swagger-codegen

Description

Models are OK, but Api classes are not. I tried generate java they are OK, but not PHP.

# PHP generation
/gen/./dist/dist-php/foo/bar/src/Service/AccountcontrollerApi.php

# Java generation
/gen/./dist/dist-java/src/main/java/io/swagger/client/api/AccountControllerApi.java
Swagger-codegen version

2.3.0-SNAPSHOP

Swagger declaration file content or url
"paths": {
  "/v1/point/accounts/open": {
    "post": {
      "tags": [
        "account-controller"
      ],
      "summary": "openAccount",
      "operationId": "openAccountUsingPOST",
      "consumes": [
        "application/json"
      ],
      "produces": [
        "*/*"
      ],
      "parameters": [
        {
          "in": "body",
          "name": "request",
          "description": "request",
          "required": true,
          "schema": {
            "$ref": "#/definitions/OpenAccountRequest"
          }
        }
      ],
      "responses": {
        "200": {
          "description": "OK",
          "schema": {
            "$ref": "#/definitions/AccountResponse"
          }
        },
        "500": {
          "description": "server error"
        }
      }
    }
  },
  {"...": "..."}
}
Command line used for generation
./run-in-docker.sh generate \
    --lang php \
    --config ./path/to/config.json \
    --input-spec ./path/to/spec.json \
    --output ./dist/dist-php
PHP Bug

All 8 comments

@appkr thanks for reporting the issue. Let me check.

@appkr I've filed #6466 to fix the issue. I added a new test case to cover this issue moving forward and ran some tests locally.

@wing328 Really thank for swift swift response & super quick reaction.
I am not familiar with how the business is going in this project, can I expect the PR will also be available 2.3.0? (EDIT. by PR, I meant the merged commit)

@appkr yup, that will be merged into master (2.3.0) once the CI tests pass no later than tomorrow (Tuesday)

@wing328 FYI, I did a quick check by merging fix_6464 into my local branch, but turned it out to be not fixed.

2017-09-12 10 16 33

@appkr Thanks for testing the fix. My new test looks good: https://github.com/swagger-api/swagger-codegen/pull/6466/files#diff-ae5b88dd9eb17ed4ce794ea69bece8b7R49

Did you do a mvn clean package to rebuild the JAR after merging the branch?

@wing328 Sorry that was my bad, you're right. Your fix is perfect. Thanks a lot.

2017-09-12 12 01 09

@appkr the fix has been merged into master. Thanks again for reporting the issue and performing tests on the fix.

Was this page helpful?
0 / 5 - 0 ratings