Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ protected void calculatePath(HandlerMethod handlerMethod, RouterOperation router
// allow for customisation
operation = customizeOperation(operation, components, handlerMethod);

if (Strings.CS.contains(operationPath, "*")) {
if (operationPath.contains("*")) {
Matcher matcher = PATH_PATTERN.matcher(operationPath);
while (matcher.find()) {
String pathParam = matcher.group(1);
Expand Down Expand Up @@ -1409,7 +1409,7 @@ private PathItem buildPathItem(RequestMethod requestMethod, Operation operation,
if (ParameterIn.PATH.toString().equals(parameter.getIn())) {
// check it's present in the path
String name = parameter.getName();
if (!Strings.CS.containsAny(operationPath, "{" + name + "}", "{*" + name + "}"))
if (!operationPath.contains("{" + name + "}") && !operationPath.contains("{*" + name + "}"))
paramIt.remove();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.databind.BeanDescription;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;
import tools.jackson.databind.BeanDescription;
import tools.jackson.databind.JavaType;
import tools.jackson.databind.ObjectMapper;
import tools.jackson.databind.introspect.BeanPropertyDefinition;
import io.swagger.v3.core.converter.AnnotatedType;
import io.swagger.v3.core.converter.ModelConverter;
import io.swagger.v3.core.converter.ModelConverterContext;
Expand Down Expand Up @@ -122,7 +122,7 @@ public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterato
private void renameClobberedProperties(Schema<?> schema, ObjectMapper mapper, JavaType javaType) {
BeanDescription beanDescription;
try {
beanDescription = mapper.getSerializationConfig().introspect(javaType);
beanDescription = mapper._serializationContext().introspectBeanDescription(javaType);
}
catch (Exception e) {
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package test.org.springdoc.api.v31.app269;

import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import tools.jackson.databind.PropertyNamingStrategies;
import tools.jackson.databind.annotation.JsonNaming;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"schema": {
"type": "integer",
"format": "int32",
"minimum": 0,
"exclusiveMinimum": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,7 @@
"content": {
"*/*": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Circle"
},
{
"$ref": "#/components/schemas/Square"
}
]
"$ref": "#/components/schemas/Shape"
}
}
}
Expand Down Expand Up @@ -75,7 +68,15 @@
},
"discriminator": {
"propertyName": "type"
}
},
"oneOf": [
{
"$ref": "#/components/schemas/Circle"
},
{
"$ref": "#/components/schemas/Square"
}
]
},
"Square": {
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,61 +1,30 @@
{
"openapi": "3.1.0",
"info": {
"title": "OpenAPI definition",
"version": "v0"
},
"servers": [
{
"url": "http://localhost",
"description": "Generated server url"
}
],
"paths": {
"/null-key": {
"get": {
"tags": [
"null-key-controller"
],
"operationId": "getNullKey",
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/OuterResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"OuterResponse": {
"type": "object",
"properties": {
"contractAddress": {
"type": "string"
},
"chainType": {
"type": "string",
"enum": [
"ETH"
]
},
"success": {
"type": "boolean"
}
},
"required": [
"chainType",
"contractAddress",
"success"
]
}
"openapi": "3.1.0",
"info": {
"title": "OpenAPI definition",
"version": "v0"
},
"servers": [
{
"url": "http://localhost",
"description": "Generated server url"
}
],
"paths": {
"/null-key": {
"get": {
"tags": [
"null-key-controller"
],
"operationId": "getNullKey",
"responses": {
"200": {
"description": "OK",
"content": {}
}
}
}
}
},
"components": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,7 @@
"content": {
"*/*": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/Circle"
},
{
"$ref": "#/components/schemas/Square"
}
]
"$ref": "#/components/schemas/Shape"
}
}
}
Expand Down Expand Up @@ -71,12 +64,17 @@
"discriminator": {
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/components/schemas/Circle"
},
{
"$ref": "#/components/schemas/Square"
}
],
"properties": {
"label": {
"type": [
"string",
"null"
]
"type": "string"
}
}
},
Expand Down
Loading