Skip to content

Commit

Permalink
update unevaluatedProperties type to Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Jul 5, 2022
1 parent 875b2ca commit 259355a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
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

0 comments on commit 259355a

Please sign in to comment.