swagger-core
swagger-core copied to clipboard
Bug in AccessMode.WRITE_ONLY?
After having trouble using WRITE_ONLY I looked in the code and saw the following in class AnnotationsUtils:
// process after readOnly and writeOnly
if (schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY)) {
schemaObject.setReadOnly(true);
schemaObject.setWriteOnly(null);
} else if (schema.accessMode().equals(io.swagger.v3.oas.annotations.media.Schema.AccessMode.WRITE_ONLY)) {
schemaObject.setReadOnly(false);
schemaObject.setWriteOnly(null);
To me the WRITE_ONLY handling looks obviously wrong, as it calls schemaObject.setWriteOnly(null). Is this the correct and intended behaviour?