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

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

Open
2 tasks done
semanser opened this issue Jan 13, 2025 · 0 comments
Open
2 tasks done

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

semanser opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working openapi-ts Relevant to the openapi-typescript library

Comments

@semanser
Copy link

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

@semanser semanser added bug Something isn't working openapi-ts Relevant to the openapi-typescript library labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working openapi-ts Relevant to the openapi-typescript library
Projects
None yet
Development

No branches or pull requests

1 participant