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

[Bug] trailing slashes not preserved in OpenAPI Parser #3417

Closed
franklinharvey opened this issue Apr 21, 2024 · 0 comments · Fixed by #3418
Closed

[Bug] trailing slashes not preserved in OpenAPI Parser #3417

franklinharvey opened this issue Apr 21, 2024 · 0 comments · Fixed by #3418
Assignees

Comments

@franklinharvey
Copy link
Contributor

Describe the bug

Endpoints like api/ or even / are written to IR (and Fern definitions) without trailing slashes

To reproduce

Steps to reproduce the behavior:

  1. Have an OpenAPI spec with at least 1 endpoint with a trailing slash
  2. Run the command fern generate --docs (or any fern generate command that relies on an OpenAPI spec)
  3. Inspect output (in my case resulting docs site)

Example OpenAPI Spec

openapi: 3.0.0
info:
  title: Sample Path Parsing API
  version: 1.0.0
paths:
  /example-without-trailing-slash:
    get:
      summary: Get Example
  /example-with-trailing-slash/:
    get:
      summary: Get Example with trailing

In this example both IR and the Fern def, and therefore client SDKs and docs will have /example-without-trailing-slash and /example-with-trailing-slash

Expected behavior

Trailing slashes should be preserved if they are in the OpenAPI spec

Screenshots

If applicable, add screenshots to help explain your problem.

CLI Version

0.22.0

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

Successfully merging a pull request may close this issue.

2 participants