Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Please add OpenAPI 3.1 supports. Fixes #1181
- Loading branch information
1 parent
5d4e485
commit afe3054
Showing
1,521 changed files
with
40,710 additions
and
28,874 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedOpenAPIMixin31.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* | ||
* * | ||
* * * | ||
* * * * Copyright 2019-2022 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 org.springdoc.api.mixins; | ||
|
||
import java.util.Map; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import io.swagger.v3.core.jackson.PathsSerializer; | ||
import io.swagger.v3.oas.models.Paths; | ||
|
||
/** | ||
* @author bnasslashen | ||
*/ | ||
@JsonPropertyOrder(value = {"openapi", "info", "externalDocs", "servers", "security", "tags", "paths", "components", "webhooks"}, alphabetic = true) | ||
public interface SortedOpenAPIMixin31 { | ||
|
||
@JsonAnyGetter | ||
@JsonInclude(value = Include.ALWAYS) | ||
@JsonPropertyOrder(alphabetic = true) | ||
Map<String, Object> getExtensions(); | ||
|
||
@JsonAnySetter | ||
void addExtension(String name, Object value); | ||
|
||
@JsonSerialize(using = PathsSerializer.class) | ||
Paths getPaths(); | ||
|
||
} |
82 changes: 82 additions & 0 deletions
82
springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedSchemaMixin31.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* | ||
* * | ||
* * * | ||
* * * * Copyright 2019-2022 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 org.springdoc.api.mixins; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
/** | ||
* @author bnasslashen | ||
*/ | ||
@JsonPropertyOrder(value = {"type", "format"}, alphabetic = true) | ||
public interface SortedSchemaMixin31 { | ||
|
||
@JsonAnyGetter | ||
@JsonPropertyOrder(alphabetic = true) | ||
Map<String, Object> getExtensions(); | ||
|
||
@JsonIgnore | ||
Map<String, Object> getJsonSchema(); | ||
|
||
@JsonIgnore | ||
Boolean getNullable(); | ||
|
||
@JsonIgnore | ||
Boolean getExclusiveMinimum(); | ||
|
||
@JsonIgnore | ||
Boolean getExclusiveMaximum(); | ||
|
||
@JsonProperty("exclusiveMinimum") | ||
BigDecimal getExclusiveMinimumValue(); | ||
|
||
@JsonProperty("exclusiveMaximum") | ||
BigDecimal getExclusiveMaximumValue(); | ||
|
||
@JsonIgnore | ||
String getType(); | ||
|
||
@JsonProperty("type") | ||
Set<String> getTypes(); | ||
|
||
@JsonAnySetter | ||
void addExtension(String name, Object value); | ||
|
||
@JsonIgnore | ||
boolean getExampleSetFlag(); | ||
|
||
@JsonInclude(JsonInclude.Include.CUSTOM) | ||
Object getExample(); | ||
|
||
@JsonIgnore | ||
Object getJsonSchemaImpl(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.