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

Swagger path validation error #821

Closed
jeredmasters opened this issue Nov 11, 2020 · 0 comments · Fixed by #822
Closed

Swagger path validation error #821

jeredmasters opened this issue Nov 11, 2020 · 0 comments · Fixed by #822
Labels

Comments

@jeredmasters
Copy link
Contributor

Regex used to test for duplicate paths uses greedy matching causing valid RESTful hierarchy to be flagged as an error:

Error: Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical.
  Path 1: /api/v1/session/{session_id}
  Path 2: /api/v1/session/{session_id}/handoff/{correlation_id}

packages/core/src/openapi/create-open-api-document.ts:14

const convertedPath = path.replace(/{.*}/g, () => '#');
jeredmasters added a commit to jeredmasters/foal that referenced this issue Nov 11, 2020
Regex used to test for duplicate paths uses greedy matching causing valid RESTful hierarchy to be
flagged as an error:

fix FoalTS#821
@LoicPoullain LoicPoullain added this to Backlog in Issue tracking via automation Nov 11, 2020
@LoicPoullain LoicPoullain moved this from Backlog to Work In Progress in Issue tracking Nov 11, 2020
@LoicPoullain LoicPoullain mentioned this issue Nov 11, 2020
1 task
Issue tracking automation moved this from Work In Progress to Done / Closed This Release Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Issue tracking
  
Done / Closed This Release
Development

Successfully merging a pull request may close this issue.

2 participants