JSON References allow you to reference any http url. This is not about 
additional documentation, this is about using $ref to reference those.

 

Keep in mind that if you’re using full JSON Schema, you won’t be able to reuse 
those in your Swagger definition as the specification does not support full 
JSON Schema.

 

 

 

From: <[email protected]> on behalf of Raghu Meda 
<[email protected]>
Reply-To: "[email protected]" 
<[email protected]>
Date: Thursday, September 28, 2017 at 06:27
To: Swagger <[email protected]>
Subject: Re: How to reference the JSON schemas of objects from external sources 
(eg.GIT) into openapi yaml?

 

Thanks Ron for the reply.  

My usecase is that we want to define JSON schemas of data models for entities 
we want to use in Swagger yaml spec. Those JSON schemas will be managed in GIT 
for version control as we change the models regularly. So, my problem is to 
refer those data model schemas from GIT and use the attributes of the entities 
in yaml spec so that I need not to define them in every spec multiple times and 
achieve consistency across the specs prepared by different members of the team. 
It's like <include> feature in WSDL. I'm not looking for just the reference of 
the links in additional documentation in yaml.

On Wednesday, September 27, 2017 at 7:50:40 PM UTC+1, Ron wrote: 

It looks like gitlab gives you raw html links to files, so you can use that.

 

 

 

From: <[email protected]> on behalf of Raghu Meda 
<[email protected]>
Reply-To: "[email protected]" <[email protected]>
Date: Tuesday, September 26, 2017 at 07:24
To: Swagger <[email protected]>
Subject: How to reference the JSON schemas of objects from external sources 
(eg.GIT) into openapi yaml?

 

Hi, 

Anyone have tried to include the references of JSON schemas of the objects from 
external sources (for eg. GIT lab)? I want to define the domain objects once in 
JSON schemas with version control in GIT lab and want to reference those object 
schemas in yaml so that we can maintain consistency across the yaml files for 
the same object definitions and its attributes. That also saves time for 
defining the specification and everyone in the team will use the same 
definitions across. 

-- 
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 [email protected].
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 [email protected].
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to