Skip to content

Commit

Permalink
Restentpoints with same name get mix up. Fixes #2876
Browse files Browse the repository at this point in the history
  • Loading branch information
bnasslahsen committed Feb 15, 2025
1 parent ee5ab03 commit cdfaf63
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
*
* *
* * *
* * * *
* * * * *
* * * * * * Copyright 2019-2025 the original author or authors.
* * * * * *
* * * * * * Licensed under the Apache License, Version 2.0 (the "License");
* * * * * * you may not use this file except in compliance with the License.
* * * * * * You may obtain a copy of the License at
* * * * * *
* * * * * * https://www.apache.org/licenses/LICENSE-2.0
* * * * * *
* * * * * * Unless required by applicable law or agreed to in writing, software
* * * * * * distributed under the License is distributed on an "AS IS" BASIS,
* * * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * * * * * See the License for the specific language governing permissions and
* * * * * * limitations under the License.
* * * * *
* * * *
* * *
* *
*
*/

package test.org.springdoc.api.v31.app240;

import test.org.springdoc.api.v31.AbstractSpringDocTest;

import org.springframework.boot.autoconfigure.SpringBootApplication;

public class SpringDocApp240Test extends AbstractSpringDocTest {

@SpringBootApplication
static class SpringDocTestApp {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
*
* *
* * *
* * * *
* * * * *
* * * * * * Copyright 2019-2025 the original author or authors.
* * * * * *
* * * * * * Licensed under the Apache License, Version 2.0 (the "License");
* * * * * * you may not use this file except in compliance with the License.
* * * * * * You may obtain a copy of the License at
* * * * * *
* * * * * * https://www.apache.org/licenses/LICENSE-2.0
* * * * * *
* * * * * * Unless required by applicable law or agreed to in writing, software
* * * * * * distributed under the License is distributed on an "AS IS" BASIS,
* * * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * * * * * See the License for the specific language governing permissions and
* * * * * * limitations under the License.
* * * * *
* * * *
* * *
* *
*
*/

package test.org.springdoc.api.v31.app240;

import io.swagger.v3.oas.annotations.Operation;
import jakarta.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WildcardController {
@PostMapping("/**")
@Operation(summary = "My Wildcard Operation")
public String getItem(HttpServletRequest request) {
return request.getPathInfo();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"openapi": "3.1.0",
"info": {
"title": "OpenAPI definition",
"version": "v0"
},
"servers": [
{
"url": "http://localhost",
"description": "Generated server url"
}
],
"paths": {
"/**": {
"post": {
"tags": [
"wildcard-controller"
],
"summary": "My Wildcard Operation",
"operationId": "getItem",
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
},
"components": {}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
<<<<<<< HEAD
"openapi": "3.1.0",
"info": {
"title": "OpenAPI definition",
Expand Down Expand Up @@ -150,41 +149,3 @@
},
"components": {}
}
=======
"openapi": "3.1.0",
"info": {
"title": "OpenAPI definition",
"version": "v0"
},
"servers": [
{
"url": "http://localhost",
"description": "Generated server url"
}
],
"paths": {
"/**": {
"post": {
"tags": [
"wildcard-controller"
],
"summary": "My Wildcard Operation",
"operationId": "getItem",
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
},
"components": {}
}
>>>>>>> origin/main

0 comments on commit cdfaf63

Please # to comment.