Skip to content

[BUG][PHP] Parameters: style not fully implemented (relates to #4042) #4641

@thomasphansen

Description

@thomasphansen

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [] [Optional] Bounty to sponsor the fix (example)
Description

PR #4042 aims to expose style and explode parameter properties to mustache templates. However, this only fully works inside allParams loops - queryParams only receive the explode property, while style remains empty.

The reason for this is because CodegenParameter.java has not fully implemented the style property: it contains only its declaration as a property, but it doesn't deal with it inside its methods - explode, however, is fully implemented there.

I got into this because I'm dealing with PR #3984, which I need to generate a library. Unfortunately, that code is broken due to always getting an empty style, since it loops queryParams. This last one receives copies of allParams parameters, and since the style property is not being copied, it remains empty.

openapi-generator version

4.2.1

Related issues/PRs

Relates to PR #4042, #3984, and to Issue #2292

Suggest a fix

I created PR #4640 to fix this issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions