As you said, it’s a string representing a JSON Reference and can point either 
to something ‘local’ or remote. Assuming this is a model, all local models will 
end up appearing under #/definitions according to the spec.

 

 

 

From: <swagger-swaggersocket@googlegroups.com> on behalf of Stephen 
<bealinesoluti...@gmail.com>
Reply-To: "swagger-swaggersocket@googlegroups.com" 
<swagger-swaggersocket@googlegroups.com>
Date: Tuesday, 20 September 2016 at 00:51
To: Swagger <swagger-swaggersocket@googlegroups.com>
Subject: @ApiResponse - reference element

 

I am trying to understand what the 'reference' parameter is used for. The java 
docs simply states: 

"Specifies a reference to the response type. The specified reference can be 
either local or remote and will be used as-is, and will override any specified 
response() class."

 

Which to a newbie does help very much. So looking at the example here:
https://github.com/swagger-api/swagger-core/blob/master/modules/swagger-jaxrs/src/test/java/io/swagger/resources/ResourceWithReferences.java

To looks like you can reference an element within a given JSON document. If 
this is the case, then that is exactly what I want to do. But can't seem to get 
it to work. I'd like to reference a local json resource, but unsure of the 
structure of the JSON and how to reference it. What ever I do get:

Objects defined by the response from the content provider

<span class="strong">xxxxxx is not defined!</span>

 

Can any one help here?

Cheers

Stephen

 

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to