spec/support/model_parsers/representable_parser.rb in grape-swagger-0.28.0 vs spec/support/model_parsers/representable_parser.rb in grape-swagger-0.29.0

- old
+ new

@@ -209,11 +209,11 @@ let(:swagger_definitions_models) do { 'ApiError' => { 'type' => 'object', 'properties' => { 'code' => { 'description' => 'status code', 'type' => 'integer', 'format' => 'int32' }, 'message' => { 'description' => 'error message', 'type' => 'string' } } }, 'ResponseItem' => { 'type' => 'object', 'properties' => { 'id' => { 'description' => '', 'type' => 'integer', 'format' => 'int32' }, 'name' => { 'description' => '', 'type' => 'string' } } }, - 'UseResponse' => { 'type' => 'object', 'properties' => { 'description' => { 'description' => '', 'type' => 'string' }, 'items' => { 'type' => 'array', 'items' => { '$ref' => '#/definitions/ResponseItem' }, 'description' => '' } } }, + 'UseResponse' => { 'type' => 'object', 'properties' => { 'description' => { 'description' => '', 'type' => 'string' }, '$responses' => { 'type' => 'array', 'items' => { '$ref' => '#/definitions/ResponseItem' }, 'description' => '' } } }, 'RecursiveModel' => { 'type' => 'object', 'properties' => { 'name' => { 'type' => 'string', 'description' => 'The name.' }, 'children' => { 'type' => 'array', 'items' => { '$ref' => '#/definitions/RecursiveModel' }, 'description' => 'The child nodes.' } } } } end let(:swagger_nested_type) do @@ -225,11 +225,11 @@ let(:swagger_entity_as_response_object) do { 'ApiError' => { 'type' => 'object', 'properties' => { 'code' => { 'description' => 'status code', 'type' => 'integer', 'format' => 'int32' }, 'message' => { 'description' => 'error message', 'type' => 'string' } }, 'description' => 'This returns something' }, 'ResponseItem' => { 'type' => 'object', 'properties' => { 'id' => { 'description' => '', 'type' => 'integer', 'format' => 'int32' }, 'name' => { 'description' => '', 'type' => 'string' } } }, - 'UseResponse' => { 'type' => 'object', 'properties' => { 'description' => { 'description' => '', 'type' => 'string' }, 'items' => { 'type' => 'array', 'items' => { '$ref' => '#/definitions/ResponseItem' }, 'description' => '' } }, 'description' => 'This returns something' } + 'UseResponse' => { 'type' => 'object', 'properties' => { 'description' => { 'description' => '', 'type' => 'string' }, '$responses' => { 'type' => 'array', 'items' => { '$ref' => '#/definitions/ResponseItem' }, 'description' => '' } }, 'description' => 'This returns something' } } end let(:swagger_params_as_response_object) do { @@ -277,11 +277,10 @@ { 'name' => 'dummy', 'description' => 'Operations about dummies' } ], 'paths' => { '/v3/other_thing/{elements}' => { 'get' => { - 'summary' => 'nested route inside namespace', 'description' => 'nested route inside namespace', 'produces' => ['application/json'], 'parameters' => [{ 'in' => 'body', 'name' => 'elements', 'description' => 'Set of configuration', 'type' => 'array', 'items' => { 'type' => 'string' }, 'required' => true }], 'responses' => { '200' => { 'description' => 'nested route inside namespace', 'schema' => { '$ref' => '#/definitions/QueryInput' } } }, 'tags' => ['other_thing'], @@ -290,11 +289,10 @@ 'x-amazon-apigateway-integration' => { 'type' => 'aws', 'uri' => 'foo_bar_uri', 'httpMethod' => 'get' } } }, '/thing' => { 'get' => { - 'summary' => 'This gets Things.', 'description' => 'This gets Things.', 'produces' => ['application/json'], 'parameters' => [ { 'in' => 'query', 'name' => 'id', 'description' => 'Identity of Something', 'type' => 'integer', 'format' => 'int32', 'required' => false }, { 'in' => 'query', 'name' => 'text', 'description' => 'Content of something.', 'type' => 'string', 'required' => false }, @@ -304,11 +302,10 @@ 'responses' => { '200' => { 'description' => 'This gets Things.' }, '401' => { 'description' => 'Unauthorized', 'schema' => { '$ref' => '#/definitions/ApiError' } } }, 'tags' => ['thing'], 'operationId' => 'getThing' }, 'post' => { - 'summary' => 'This creates Thing.', 'description' => 'This creates Thing.', 'produces' => ['application/json'], 'consumes' => ['application/json'], 'parameters' => [ { 'in' => 'formData', 'name' => 'text', 'description' => 'Content of something.', 'type' => 'string', 'required' => true }, @@ -319,20 +316,18 @@ 'operationId' => 'postThing' } }, '/thing/{id}' => { 'get' => { - 'summary' => 'This gets Thing.', 'description' => 'This gets Thing.', 'produces' => ['application/json'], 'parameters' => [{ 'in' => 'path', 'name' => 'id', 'type' => 'integer', 'format' => 'int32', 'required' => true }], 'responses' => { '200' => { 'description' => 'getting a single thing' }, '401' => { 'description' => 'Unauthorized' } }, 'tags' => ['thing'], 'operationId' => 'getThingId' }, 'put' => { - 'summary' => 'This updates Thing.', 'description' => 'This updates Thing.', 'produces' => ['application/json'], 'consumes' => ['application/json'], 'parameters' => [ { 'in' => 'path', 'name' => 'id', 'type' => 'integer', 'format' => 'int32', 'required' => true }, @@ -342,31 +337,28 @@ 'responses' => { '200' => { 'description' => 'This updates Thing.', 'schema' => { '$ref' => '#/definitions/Something' } } }, 'tags' => ['thing'], 'operationId' => 'putThingId' }, 'delete' => { - 'summary' => 'This deletes Thing.', 'description' => 'This deletes Thing.', 'produces' => ['application/json'], 'parameters' => [{ 'in' => 'path', 'name' => 'id', 'type' => 'integer', 'format' => 'int32', 'required' => true }], 'responses' => { '200' => { 'description' => 'This deletes Thing.', 'schema' => { '$ref' => '#/definitions/Something' } } }, 'tags' => ['thing'], 'operationId' => 'deleteThingId' } }, '/thing2' => { 'get' => { - 'summary' => 'This gets Things.', 'description' => 'This gets Things.', 'produces' => ['application/json'], 'responses' => { '200' => { 'description' => 'get Horses', 'schema' => { '$ref' => '#/definitions/Something' } }, '401' => { 'description' => 'HorsesOutError', 'schema' => { '$ref' => '#/definitions/ApiError' } } }, 'tags' => ['thing2'], 'operationId' => 'getThing2' } }, '/dummy/{id}' => { 'delete' => { - 'summary' => 'dummy route.', 'description' => 'dummy route.', 'produces' => ['application/json'], 'parameters' => [{ 'in' => 'path', 'name' => 'id', 'type' => 'integer', 'format' => 'int32', 'required' => true }], 'responses' => { '204' => { 'description' => 'dummy route.' }, '401' => { 'description' => 'Unauthorized' } }, 'tags' => ['dummy'],