Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP] enum values generated without comma #12411

Open
that-guy-iain opened this issue Jun 12, 2024 · 0 comments
Open

[PHP] enum values generated without comma #12411

that-guy-iain opened this issue Jun 12, 2024 · 0 comments

Comments

@that-guy-iain
Copy link

Description

Enums returns invalid code

public function getFailureReasonAllowableValues()
    {
        return [
            self::FAILURE_REASON_EXPIRED_CARD
            self::FAILURE_REASON_INVALID_DETAILS
            self::FAILURE_REASON_FRAUD
            self::FAILURE_REASON_AUTHENTICATION_REQUIRED
            self::FAILURE_REASON_INVALID_CARD
            self::FAILURE_REASON_GENERAL_DECLINE
            self::FAILURE_REASON_CONTACT_PROVIDER
            self::FAILURE_REASON_LACK_OF_FUNDS
        ];
    }
Swagger-codegen version

Swagger-codegen-v3 docker:latest

Swagger declaration file content or url
description: Payment response
content:
  application/json:
    schema:
      type: object
      properties:
        paid:
          type: boolean
        failure_reason:
          type: string
          nullable: true
          enum: [expired_card, invalid_details, fraud, authentication_required, invalid_card, general_decline, contact_provider, lack_of_funds]
Command line used for generation
docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli-v3:latest generate     -i /local/openapi.yaml     -l php     -o /local/out/php --invoker-package=BillaBear --git-user-id=billabear --git-repo-id=php-sdk
Related issues/PRs

This appears to be related #12404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant