[GitHub] diuis closed pull request #2: fix for the empty ref attribute of RequestBody annotation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] diuis closed pull request #2: fix for the empty ref attribute of RequestBody annotation

GitBox
diuis closed pull request #2: fix for the empty ref attribute of RequestBody annotation
URL: https://github.com/apache/geronimo-openapi/pull/2
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/geronimo-openapi-impl/src/main/java/org/apache/geronimo/microprofile/openapi/impl/model/RequestBodyImpl.java b/geronimo-openapi-impl/src/main/java/org/apache/geronimo/microprofile/openapi/impl/model/RequestBodyImpl.java
index 0865a64..21895c6 100644
--- a/geronimo-openapi-impl/src/main/java/org/apache/geronimo/microprofile/openapi/impl/model/RequestBodyImpl.java
+++ b/geronimo-openapi-impl/src/main/java/org/apache/geronimo/microprofile/openapi/impl/model/RequestBodyImpl.java
@@ -94,7 +94,9 @@ public String getRef() {
     @Override
     @JsonbProperty("$ref")
     public void setRef(final String _ref) {
-        this._ref = _ref.startsWith("#") ? _ref : ("#/components/requestBodies/" + _ref);
+        if (!_ref.isEmpty()) {
+          this._ref = _ref.startsWith("#") ? _ref : ("#/components/requestBodies/" + _ref);
+        }
     }
 
     @Override


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services