juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Bognar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JUNEAU-78) Is org.apache.juneau.dto.swagger.SchemaInfo missing a $ref field?
Date Thu, 11 Jan 2018 00:04:00 GMT

    [ https://issues.apache.org/jira/browse/JUNEAU-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16321402#comment-16321402

James Bognar commented on JUNEAU-78:

'$ref' isn't part of the Swagger spec but rather the JSON Schema spec.  In theory, you can
insert a '$ref' tag anywhere in a Swagger JSON doc.  

I can add it as a property on each of the beans though.  The $ isn't a problem....just use
a named property...
	public String getRef() {

Another option would be to add an 'extra' property for capturing any additional stuff not
part of the Swagger spec:
	public Map<String,Object> getExtraProperties() {


> Is org.apache.juneau.dto.swagger.SchemaInfo missing a $ref field?
> -----------------------------------------------------------------
>                 Key: JUNEAU-78
>                 URL: https://issues.apache.org/jira/browse/JUNEAU-78
>             Project: Juneau
>          Issue Type: Bug
>            Reporter: Steve Blackmon
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> According to
> https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#schema-object
> we should be able to set $ref to another jsonschema.
> Here's one example
> https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v2.0/json/petstore.json#L55
> Do we need to add a String ref variable with appropriate serialization rules to preserve
the $?
> I just noticed that using Swagger dto to hold my swagger when i access it I get back
"schema": {}

This message was sent by Atlassian JIRA

View raw message