Skip to content

Fix PathVariable pattern with * #3142

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

Closed
wants to merge 11 commits into from

Conversation

lucarota
Copy link

@lucarota lucarota commented Sep 13, 2023

Adds a split, in OAS3 path builder, for Spring's PathVariable {*path} Pattern

Description

Adds split on {*path} without escaping special characters to allow slash as in url endpoints

Motivation and Context

With Spring you can define a path pattern "/other/path/{*extra}" to match multiple segments at the end of a path.
So {*extra} might contains "other/path/segments" see https://spring.io/blog/2020/06/30/url-matching-with-pathpattern-in-spring-mvc for more info.

How Has This Been Tested?

Tested using this https://github.com/lucarota/file-server spring application as backend

Screenshots (if appropriate):

Types of changes

  • No code changes (changes to documentation, CI, metadata, etc)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@char0n
Copy link
Member

char0n commented Oct 3, 2023

Hi @lucarota,

Unfortunately I cannot merge this PR. The Path template syntax is not and cannot be supported with current OpenAPI 3.0.3 and OpenAPI 3.1.0 specifications.

Please have a look at OAI/OpenAPI-Specification#1459 specifically at this comment.

Sorry about that.

@char0n char0n closed this Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants