added json-schema based compositin examples

There are two samples now.  04-models-with-subtypes.json which shows the json-schema conventions for modeling composition with the `allOf` keyword.  The file 05-models-with-subtypes.json shows a more compact representation which is still valid with json schema.  There are fewer `$ref`s, and definitions are more in-line.

The spec will support json schema for representing the models so there will be different techniques to represent payloads.  Instead of being overly perscriptive in the spec, we will support json-schema and provide examples of different ways to model payloads, including with composition, alternate input/output models, etc.
# is simply an anchor (a denotation of the document root)
It's the convention for referencing schema locations in json-schema
It's not always required but there are some quirks regarding the "id"
keyword that can move the document root that one needs to be aware of.
Have a read through the json-schema spec docs and it should become clear.
http://json-schema.org/example2.html

:-)
Paul


On Tue, Jun 24, 2014 at 9:32 AM, Marsh Gardiner <notifications@github.com>
wrote:

> In samples/v2.0/json/04-models-with-subtypes.json:
>
> > @@ -1,53 +1,70 @@
> >  {
> >    "models": {
> > -    "Cat": {
> > -      "description": "A representation of a cat",
> > -      "required": [
> > -        "huntingSkill"
> > -      ],
> > +    "Cat": {"$ref": "#/definitions/cat"},
>
> Why is there a hash character in the ref path?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/reverb/swagger-spec/pull/18/files#r14139245>.
>