Skip to content
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

update unevaluatedProperties type to Schema #4208

Merged
merged 2 commits into from
Jul 5, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ public void testComponentPathItemsSerialization() {
" body:\n" +
" content:\n" +
" application/json:\n" +
" schema: {}\n" +
" schema: \n" +
" type: object\n" +
" headers:\n" +
" test-head:\n" +
" description: test header description\n" +
Expand Down Expand Up @@ -605,7 +606,9 @@ public void testComponentPathItemsSerialization() {
" \"body\" : {\n" +
" \"content\" : {\n" +
" \"application/json\" : {\n" +
" \"schema\" : { }\n" +
" \"schema\" : {\n" +
" \"type\" : \"object\"\n" +
" }\n" +
" }\n" +
" }\n" +
" }\n" +
Expand Down Expand Up @@ -1110,7 +1113,8 @@ public void testRequestBodyRefSerialization() {
" body:\n" +
" content:\n" +
" application/json:\n" +
" schema: {}");
" schema: \n" +
" type: object");
SerializationMatchers.assertEqualsToJson31(openAPI, "{\n" +
" \"openapi\" : \"3.1.0\",\n" +
" \"paths\" : {\n" +
Expand All @@ -1130,7 +1134,9 @@ public void testRequestBodyRefSerialization() {
" \"body\" : {\n" +
" \"content\" : {\n" +
" \"application/json\" : {\n" +
" \"schema\" : { }\n" +
" \"schema\" : {\n" +
" \"type\" : \"object\"\n" +
" }\n" +
" }\n" +
" }\n" +
" }\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public Schema specVersion(SpecVersion specVersion) {
* @since 2.2.0 (OpenAPI 3.1.0)
*/
@OpenAPI31
private Object unevaluatedProperties;
private Schema unevaluatedProperties;

/**
* @since 2.2.0 (OpenAPI 3.1.0)
Expand Down Expand Up @@ -586,6 +586,7 @@ public Schema() {

protected Schema(String type, String format) {
this.type = type;
this.addType(type);
this.format = format;
}

Expand All @@ -595,6 +596,7 @@ public Schema(SpecVersion specVersion) {

protected Schema(String type, String format, SpecVersion specVersion) {
this.type = type;
this.addType(type);
this.format = format;
this.specVersion = specVersion;
}
Expand Down Expand Up @@ -1560,7 +1562,7 @@ public Schema propertyNames(Schema propertyNames) {
* @since 2.2.0 (OpenAPI 3.1.0)
*/
@OpenAPI31
public Object getUnevaluatedProperties() {
public Schema getUnevaluatedProperties() {
return unevaluatedProperties;
}

Expand All @@ -1569,7 +1571,7 @@ public Object getUnevaluatedProperties() {
* @since 2.2.0 (OpenAPI 3.1.0)
*/
@OpenAPI31
public void setUnevaluatedProperties(Object unevaluatedProperties) {
public void setUnevaluatedProperties(Schema unevaluatedProperties) {
this.unevaluatedProperties = unevaluatedProperties;
}

Expand All @@ -1578,7 +1580,7 @@ public void setUnevaluatedProperties(Object unevaluatedProperties) {
* @since 2.2.0 (OpenAPI 3.1.0)
*/
@OpenAPI31
public Schema unevaluatedProperties(Object unevaluatedProperties) {
public Schema unevaluatedProperties(Schema unevaluatedProperties) {
this.unevaluatedProperties = unevaluatedProperties;
return this;
}
Expand Down