Skip to content

[BUG][PHP] single quotes in path should be escaped #22305

@paetzeltaov

Description

@paetzeltaov
Description

After generation i end up with php errors because the single quotes in the path are not escaped.

$resourcePath = '/Accounts('{AccountID}')';

This is the path in the openapi.json
"/Accounts('{AccountID}')"

openapi-generator version

latest openapitools/openapi-generator-cli ( docker )

OpenAPI declaration file content or url

https://api.sap.com/odata/1.0/catalog.svc/APIContent.APIs('UT_ERP_ISU_UMC_0001')/$value?type=json

Swagger:
https://api.sap.com/api/UT_ERP_ISU_UMC_0001/resource/Accounts

Generation Details
Steps to reproduce

Grab the json and run

 docker run --rm     -v $PWD:/local openapitools/openapi-generator-cli generate     -i /local/openapi.json     -g php     -o /local/out/php
Related issues/PRs
Suggest a fix

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