I do not recommend that you do this in the way you are considering.

Let's imagine that you define three different APIs that use these common
objects. Those three APIs are developed by different people, and accept
changes at different speeds.

Someone makes a change to the common objects. This change adds a new field,
and indicates (for example) that this field will always be present in all
responses. However, maybe two of your three APIs aren't ready to return
that new field yet. Maybe they weren't aware it was being added. Their API
definition is now inaccurate.

There are strategies to provide common objects, but if you care about your
API definitions being accurate and backwards-compatible, you must consider
issues such as this.


On Tue, Sep 26, 2017 at 10:24 AM, Raghu Meda <[email protected]> wrote:

> 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.

Reply via email to