Skip to content

Base path and Endpoint path accumulates double slash ('/') #890

@altarrok

Description

@altarrok

We are using: Spring REST backend, generating using springfox-swagger, on the frontend, we are using React and this library to generate api client services.

Conditions to reproduce:

  • Generated client config should have: BASE: 'http://localhost:8080/',
  • Generated client controller service should have a method with path starting with '/': /foo/${boo}/hoo

500 error in backend:
The request was rejected because the URL contained a potentially malicious String "//"
Frontend request link:
http://localhost:8080//foo/57a32e87-7638-4ad0-b566-fcb7b6210348/hoo/

The Swagger docs (OpenAPI spec) doesn't have double slashes, so I believe this library should handle this double slash case.

Please let me know if additional information is needed, or any debugging work needed, thank you!!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions