Skip to content
Open
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<central-publishing-maven-plugin.version>0.7.0
</central-publishing-maven-plugin.version>
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
<swagger-api.version>2.2.47</swagger-api.version>
<swagger-api.version>2.2.48</swagger-api.version>
<swagger-ui.version>5.32.2</swagger-ui.version>
<gmavenplus-plugin.version>1.13.1</gmavenplus-plugin.version>
<jjwt.version>0.9.1</jjwt.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public Boolean hasRequiredMarker(AnnotatedMember annotatedMember) {
if (schemaAnnotation.required() || requiredMode == Schema.RequiredMode.REQUIRED) {
return true;
}
else if (requiredMode == Schema.RequiredMode.NOT_REQUIRED || (StringUtils.isNotEmpty(schemaAnnotation.defaultValue()) && !Schema.DEFAULT_SENTINEL.equals(schemaAnnotation.defaultValue()))) {
else if (requiredMode == Schema.RequiredMode.NOT_REQUIRED || StringUtils.isNotEmpty(schemaAnnotation.defaultValue())) {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ public String[] allowableValues() {

@Override
public String defaultValue() {
String defaultValue = getDefaultValue(parameterName, pageableDefault, parameterSchema.defaultValue());
return defaultValue != null ? defaultValue : io.swagger.v3.oas.annotations.media.Schema.DEFAULT_SENTINEL;
return getDefaultValue(parameterName, pageableDefault, parameterSchema.defaultValue());
}

@Override
Expand Down Expand Up @@ -758,8 +757,7 @@ public String[] allowableValues() {

@Override
public String defaultValue() {
String defaultValue = getArrayDefaultValue(parameterName, pageableDefault, sortDefault, schema.defaultValue());
return defaultValue != null ? defaultValue : io.swagger.v3.oas.annotations.media.Schema.DEFAULT_SENTINEL;
return getArrayDefaultValue(parameterName, pageableDefault, sortDefault, schema.defaultValue());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public class Builder {
/**
* Provides a default value.
*/
private String defaultValue = Schema.DEFAULT_SENTINEL;
private String defaultValue = "";

/**
* Provides a discriminator property value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ public static Object castDefaultValue(Schema schema, Object defaultValue) {
*/
public static Object resolveDefaultValue(String defaultValueStr, ObjectMapper objectMapper) {
Object defaultValue = null;
if (StringUtils.isNotEmpty(defaultValueStr) && !io.swagger.v3.oas.annotations.media.Schema.DEFAULT_SENTINEL.equals(defaultValueStr)) {
if (StringUtils.isNotEmpty(defaultValueStr)) {
try {
defaultValue = objectMapper.readTree(defaultValueStr);
}
Expand Down
2 changes: 1 addition & 1 deletion springdoc-openapi-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>springdoc-openapi</artifactId>
<groupId>org.springdoc</groupId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>springdoc-openapi-tests</artifactId>
<groupId>org.springdoc</groupId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>springdoc-openapi-tests</artifactId>
<groupId>org.springdoc</groupId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>springdoc-openapi-tests</artifactId>
<groupId>org.springdoc</groupId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>springdoc-openapi-data-rest-tests</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>springdoc-openapi-tests</artifactId>
<groupId>org.springdoc</groupId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>springdoc-openapi-tests</artifactId>
<groupId>org.springdoc</groupId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-tests</artifactId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<artifactId>springdoc-openapi-groovy-tests</artifactId>
<name>${project.artifactId}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>springdoc-openapi-tests</artifactId>
<groupId>org.springdoc</groupId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>springdoc-openapi-hateoas-tests</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-tests</artifactId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>springdoc-openapi-tests</artifactId>
<groupId>org.springdoc</groupId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>springdoc-openapi-kotlin-webflux-tests</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<artifactId>springdoc-openapi-tests</artifactId>
<groupId>org.springdoc</groupId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>springdoc-openapi-kotlin-webmvc-tests</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-tests</artifactId>
<version>2.8.17-SNAPSHOT</version>
<version>2.8.18-SNAPSHOT</version>
</parent>
<artifactId>springdoc-openapi-security-tests</artifactId>
<name>${project.artifactId}</name>
Expand Down
Loading