Commit Graph

1156 Commits

Author SHA1 Message Date
Tim Galeckas 3de44a3a6f GrapeSwagger::DocMethods::Extensions breaks the contract of Kernel#method (#760)
* GrapeSwagger::DocMethods::Extensions breaks the contract of

Kernel#method

This causes code inspection tools and development workflows to break
and may cause developers to choose not to use the gem.

* add test for method introspection on GrapeSwagger::DocMethods::Extensions

* fix ci lint failure
2019-10-03 10:47:16 +02:00
Nick Bienko d7bf077802 Fix array_use_braces for body params (#757)
Previously this is what was generated:
`"attr":{"type":"array","items":{"type":"object","properties":{"":{"type":"string"}}}}`
instead of
`"attr":{"type":"array","items":{"type":"string"}}`
in case this attribute was nested in a Hash attribute with "body" in `param_type`
2019-09-06 12:04:56 +02:00
Nick Bienko 204ced46ee Fix reference creation when two types are provided (#756)
Previously the type from param definition would be used to documentation
even if we try to override it in the `documentation` hash.
It caused Swagger UI to render, for example, "Unknown Type: Color"
instead of using the provided entity.

It terms of code, before this change we would return something like this:
{ color: { type: 'Color' }
instead of:
{ color: { '$ref' => 'ColorEntity' }
if Color is not inherited from Grape::Entity

Having different types can be useful when two different classes
are used for parsing and presenting an attribute.
E.g. the input format for Base64 File can be represented as a Hash (content,
content_type and filename), whereas the type after parsing can be
ActionDispatch::Http::UploadedFile.

In the current situation the solution to this problem is to put coercion
methods to the same entity and specify `type` only for the param without
using `documentation`.
2019-09-05 15:14:42 +02:00
Gwénaël Rault 445d2d471d Deeply nested objects (#752)
* Depply nested objects

* Simple hash syntax edit

* Nested objects are not necessary arrays

* fix points test

* Fix test services

* Doesn't require to delete hash or array properties

* Edit nested logic

* Add vehicle test

* Change parameter level is endpoint job

* Array body shouldn't lost array type

* no more parser role

* array of array to array of string

* move format data

* fix formdata return

* Moved params_parser role spec

* Move endpoint spec

* Revert "Add vehicle test"

This reverts commit e5ba63ba26.

* remove redundant interpolation
2019-08-06 14:22:14 +02:00
peter scholz 7237ef3525
prepare release 0.33.0 (#749)
- aligns ruby versions for travis, rubocop and the gem itself
2019-06-21 22:53:20 +02:00
charanpanchagnula 4573a82777 Allow multiple success responses (#747)
* Allow multiple success responses - Issue# 674

* Adding documentation in README for multiple values in success for response

* Making a slight change in the documentation
2019-06-19 19:39:40 +02:00
Olle Jonsson 2263eceadb CI: Use 2.6.3 (#745) 2019-06-06 19:19:14 +02:00
Robert Schulze c1b81a2d11 Fix path with optional format (#746)
* Fix path with optional format

* rename to new cop name

* auto-fix rubocop offenses

* Update CHANGELOG.md
2019-06-06 16:58:16 +02:00
Olle Jonsson 542511d9ef CI: Use 2.4.6, 2.5.5 (#743)
* CI: Use 2.4.6, 2.5.5

  - Also: Removes an old setting from Travis. See https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

* Update CHANGELOG.md
2019-04-01 19:10:13 +02:00
LeFnord c854864e8b Updates travis matrix. 2019-03-14 23:49:35 +01:00
peter scholz d20b91041d
Cleans up travis (#740)
- updates Gemfile
2019-02-10 00:25:08 +01:00
peter scholz 7996d5f98d
Merge pull request #739 from LeFnord/master
corrects authoring
2019-02-10 00:01:02 +01:00
peter scholz 52bdea1024
Merge branch 'master' into master 2019-02-09 22:46:56 +01:00
Daniel Doubrovkine (dB.) @dblockdotorg b35b14fdbc
Merge pull request #737 from urkle/fix-swagger-endpoint-guard
add the swagger_endpoint_guard to both documentation endpoints
2019-01-08 09:00:07 -05:00
Daniel Doubrovkine (dB.) @dblockdotorg 445191bbbf Merge pull request #737 from urkle/fix-swagger-endpoint-guard
add the swagger_endpoint_guard to both documentation endpoints
2019-01-08 09:00:07 -05:00
Edward Rudd 69fd941c99 add the swagger_endpoint_guard to both documentation endpoints 2019-01-03 17:50:54 -05:00
Edward Rudd 03687e7400 add the swagger_endpoint_guard to both documentation endpoints 2019-01-03 17:50:54 -05:00
peter scholz c7c93b6e34
Updates Travis to use ruby 2.6.0 (#736) 2018-12-27 01:57:42 +01:00
peter scholz b4295b1015 Updates Travis to use ruby 2.6.0 (#736) 2018-12-27 01:57:42 +01:00
LeFnord 02ede028a3 Rreplaces coveralls through coveralls_reborn. 2018-12-10 21:32:11 +01:00
LeFnord 4fedaf5185 Rreplaces coveralls through coveralls_reborn. 2018-12-10 21:32:11 +01:00
peter scholz 6e851ace83
prepare 0.32.1 release (#732)
- updates dependencies
- removes coveralls dependency, have to investigate it ...
2018-12-07 22:07:00 +01:00
peter scholz 2f80a55912 prepare 0.32.1 release (#732)
- updates dependencies
- removes coveralls dependency, have to investigate it ...
2018-12-07 22:07:00 +01:00
Fotos Georgiadis 5e2329e339 Skip empty parameters and tags arrays (#731)
* Skip empty parameters arrays

* Skip empty tags arrays

* Update CHANGELOG
2018-12-07 20:29:22 +01:00
Fotos Georgiadis 548d8af682 Skip empty parameters and tags arrays (#731)
* Skip empty parameters arrays

* Skip empty tags arrays

* Update CHANGELOG
2018-12-07 20:29:22 +01:00
Fotos Georgiadis 4777b87ad0 Allow empty security array for endpoints (#729) 2018-12-07 10:52:01 -05:00
Fotos Georgiadis 69269d7c54 Allow empty security array for endpoints (#729) 2018-12-07 10:52:01 -05:00
peter scholz 83a6e8d04d
prepare 0.32.0 release (#728)
- reverts usage of ruby 2.6.0-preview3, cause travis didn't have atm
2018-11-26 18:06:43 +01:00
peter scholz 7c337ebb19 prepare 0.32.0 release (#728)
- reverts usage of ruby 2.6.0-preview3, cause travis didn't have atm
2018-11-26 18:06:43 +01:00
Nicolas Klein c08c6f46ca upgrades head version of grape (#726) 2018-11-26 17:21:18 +01:00
Nicolas Klein b63833ed42 upgrades head version of grape (#726) 2018-11-26 17:21:18 +01:00
Lidiane Taquehara 7ef0cebea8 Refactor params parser specs (#723)
Use named subjects for methods, avoiding calling for parser in
each expectation.
2018-11-05 11:07:25 +01:00
Lidiane Taquehara 2ba0d24fff Refactor params parser specs (#723)
Use named subjects for methods, avoiding calling for parser in
each expectation.
2018-11-05 11:07:25 +01:00
Daniel Doubrovkine (dB.) @dblockdotorg e983cbf408
Merge pull request #724 from LeFnord/master
Maintainance Tasks
2018-11-03 20:46:28 -04:00
Daniel Doubrovkine (dB.) @dblockdotorg d470e4e38f Merge pull request #724 from LeFnord/master
Maintainance Tasks
2018-11-03 20:46:28 -04:00
LeFnord 620ce18453 Maintainance Tasks
- updates dependencies
- looses rubocop dependency to minor
- adds 2.6.0-preview2 to travis
- adds grape 1.1.0 to travis
- skips testing of grape < 0.19.2
  -> only have last three minors and HEAD
2018-11-04 01:14:22 +01:00
LeFnord 52694ea69d Maintainance Tasks
- updates dependencies
- looses rubocop dependency to minor
- adds 2.6.0-preview2 to travis
- adds grape 1.1.0 to travis
- skips testing of grape < 0.19.2
  -> only have last three minors and HEAD
2018-11-04 01:14:22 +01:00
Daniel Doubrovkine (dB.) @dblockdotorg 85d8e41096
Merge pull request #722 from lidimayra/refactor-data-type-specs
Refactor data type specs
2018-11-01 10:53:21 -04:00
Daniel Doubrovkine (dB.) @dblockdotorg 8132ab4b51 Merge pull request #722 from lidimayra/refactor-data-type-specs
Refactor data type specs
2018-11-01 10:53:21 -04:00
Lidiane Taquehara a5f5fee058 Refactor data type specs 2018-10-31 17:49:03 -03:00
Lidiane Taquehara c2029f2a2e Refactor data type specs 2018-10-31 17:49:03 -03:00
Daniel Doubrovkine (dB.) @dblockdotorg b9beec2c9f Fix: corrected termsOfService field name in additional info. (#720) 2018-10-29 20:24:51 +01:00
Daniel Doubrovkine (dB.) @dblockdotorg 6daeb18c5d Fix: corrected termsOfService field name in additional info. (#720) 2018-10-29 20:24:51 +01:00
Nicolas Klein 2457215336 Adds support for grape >= 1.2 (#717)
* Adds support for grape >= 1.2


Makes swagger backwards-compatible again


Adds a test that covers re-mounting with configuration


Describes changes on this PR


Removes custom branch from build process

* Upgrades Rubocop and autofixes indentation

* Locks rubocop version to 0.60

* Rollbacks version bump

* Removes HEAD from allowed failure
2018-10-29 17:03:59 +01:00
Nicolas Klein a49bb8711d Adds support for grape >= 1.2 (#717)
* Adds support for grape >= 1.2


Makes swagger backwards-compatible again


Adds a test that covers re-mounting with configuration


Describes changes on this PR


Removes custom branch from build process

* Upgrades Rubocop and autofixes indentation

* Locks rubocop version to 0.60

* Rollbacks version bump

* Removes HEAD from allowed failure
2018-10-29 17:03:59 +01:00
Daniel Doubrovkine (dB.) @dblockdotorg 224c5f2694 Upgraded and locked Rubocop at 0.60.0. (#719) 2018-10-29 16:32:45 +01:00
Daniel Doubrovkine (dB.) @dblockdotorg 6af0f65df2 Upgraded and locked Rubocop at 0.60.0. (#719) 2018-10-29 16:32:45 +01:00
dblock 95d5e35a59 Preparing for next developer iteration, 0.31.2. 2018-10-23 06:46:29 -04:00
dblock ff5f71c18a Preparing for next developer iteration, 0.31.2. 2018-10-23 06:46:29 -04:00
dblock 84d7b5d845 Preparing for release, 0.31.1. 2018-10-23 06:31:44 -04:00