Skip to content

--make-paths-enum renames the paths URL #2101

Closed
@semanser

Description

@semanser

openapi-typescript version

7.5.2

Node.js version

20.12.1

OS + version

macOS 15.1.1

Description

This is basically exactly the same issue as described here #950. It seems like the bug was added back here #2052 when implementing this feature again for the v7.

In short, the ApiPaths urls are getting renamed like so /persons/{id} -> /persons/:id, which shouldn't happen.

The line that needs to be fixed is this:

// Replace {parameters} with :parameters
const adaptedUrl = url.replace(/{(\w+)}/g, ":$1");

See this PR #951 on how it was fixed before.

Let me know if you want me to open the PR. Thanks!

Reproduction

See this PR #950

Expected result

Ths URLs in both paths and ApiPaths should be identical.

Required

  • My OpenAPI schema is valid and passes the Redocly validator (npx @redocly/cli@latest lint)

Extra

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopenapi-tsRelevant to the openapi-typescript library

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions