You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "M. Bergin (Jira)" <ji...@apache.org> on 2022/03/08 17:17:00 UTC
[jira] [Created] (CAMEL-17765) camel-quarkus-openapi-java not marking required boolean properties if variable prefixed with is
M. Bergin created CAMEL-17765:
---------------------------------
Summary: camel-quarkus-openapi-java not marking required boolean properties if variable prefixed with is
Key: CAMEL-17765
URL: https://issues.apache.org/jira/browse/CAMEL-17765
Project: Camel
Issue Type: Bug
Components: camel-openapi-java
Affects Versions: 3.14.1
Environment: Oracle JDK 17, macOS 12.2.1, Quarkus 2.7.3, camel-quarkus-openapi-java 2.7.0, camel-openapi-java 3.14.1.
Reporter: M. Bergin
Attachments: camel-openapi-boolean-bug.zip
Boolean properties are not marked as required in the openapi document if the respective member variable name is prefixed with is. The Fruit class in the attached project contains two boolean properties described below which are treated differently if the member variable name is prefixed.
The property definition below _doesn't_ appear as required in the openapi document although it's marked as required. The expectation is that it would appear in the list of required properties.
@NotBlank
private boolean isNotWorking;
public boolean isNotWorking() {
return isNotWorking;
}
public void setNotWorking(boolean isNotWorking) {
this.isNotWorking = isNotWorking;
}
The property definition below _does_ appear as required in the openapi document as expected.
@NotBlank
private boolean working;
public boolean isWorking() {
return working;
}
public void setWorking(boolean working) {
this.working = working;
}
Additionally, the text below is printed when viewing the openapi document.
2022-03-08 11:38:20,704 WARN [org.apa.cam.ope.RestModelConverters] (vert.x-worker-thread-0) Encountered unexpected type boolean in processing schema.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)