Commit Graph

1267 Commits

Author SHA1 Message Date
Masayoshi Takahashi 06975c8772
Add webrick to support Ruby 3.x (#853) 2022-03-13 13:24:56 +01:00
Masayoshi Takahashi 5e0af24f84
Fix example to work (#852) 2022-03-13 08:37:50 +01:00
Vachman db76f42cc8
Refactor oapi fetch task (#846)
* oapi rake task generate specs for different API versions

* Refactor oapi:fetch rake task generate specs per file

* Fixing specs

* CHANGELOG.md

* Rubocop auto gen config

* Update README.md

* Satisfy rubocop
2022-03-11 19:31:24 +01:00
Masayoshi Takahashi eb94a3181e
Fix value of enum to be Array (#850) 2022-03-06 15:41:11 +01:00
peter scholz 14adf931c3
Makes rubocop happy. (#848)
* Makes rubocop happy.

* Updates GH action matrix.

* Improves Actions.
2022-02-27 01:39:56 +01:00
peter scholz 4ea61c4c2c
Update CHANGELOG.md 2021-10-22 07:48:56 +02:00
peter scholz 8a5daa8605
Prepare release 1.4.2 (#842) 2021-10-22 07:48:13 +02:00
Paul Padier 1fea1f8d19
Fix documentation of `additionalProperties` field when used with array parameters (#840)
* Fix typo in CHANGELOG

* Allow usage of additional_properties, deprecate additionalProperties

All other options are snake-cased rather than camel-cased, so this keeps things consistent.

* Ignore .byebug_history

* Add test covering additional_properties

* Fix additionalProperties for arrays of objects

* Fix settings additional_properties to false

* Handle receiving types and entities in additional_properties

This includes a fix to MoveParams.document_as_property for an issue found while testing these changes.

* Refactor to use Enumerable#any?

* Document additional_properties

* Update CHANGELOG
2021-10-21 21:43:06 +02:00
Paul Padier 46e112c048
Fix type/format of array[object] fields (#841)
* Add reproduction spec

* Don't overwrite items field if it's already there

Also add even more levels of nesting in spec to ensure things still work as expected.

* Update CHANGELOG
2021-10-20 17:53:58 +02:00
Paul Padier 86b367bedf
Fix documentation of `false`/`nil` default parameter values (#839)
* Fix documentation of false/nil default values

* Update CHANGELOG
2021-10-16 07:36:46 +02:00
peter scholz 52ba15f5a6
Adds newest grape. (#837) 2021-10-05 14:56:31 +02:00
peter scholz d0009d31bf
Add head for ruby to workflow. (#836)
- removes checks for grape 1.3.3
2021-10-02 08:30:48 +02:00
dependabot[bot] 731c5a8930
Update ruby-grape-danger requirement from ~> 0.1.1 to ~> 0.2.0 (#824)
Updates the requirements on [ruby-grape-danger](https://github.com/ruby-grape/danger) to permit the latest version.
- [Release notes](https://github.com/ruby-grape/danger/releases)
- [Changelog](https://github.com/ruby-grape/danger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ruby-grape/danger/compare/v0.1.1...v0.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: peter scholz <pscholz.le@gmail.com>
2021-10-02 08:08:56 +02:00
Allen Calderwood beeaf0a3f4
Update swagger validate to use correct cli command (#835) 2021-10-02 08:06:02 +02:00
peter scholz 07381e07c1
Prepare release 1.4.1 (#834) 2021-09-15 11:03:13 +02:00
Steven Ou 118ecae41b
Examples in body params (#833)
* examples in body

* changelog entry
2021-09-15 10:56:18 +02:00
peter scholz 19cd0dd28d
Prepare release 1.4.0 (#826) 2021-03-20 00:48:58 +01:00
Doug Hammond 33366da965
Parameter examples (#821)
Co-authored-by: peter scholz <pscholz.le@gmail.com>
2021-03-16 11:40:00 +01:00
Hermann Mayer ed07bafd6c
Corrected the related parameter lookup on request params. (#822)
Signed-off-by: Hermann Mayer <hermann.mayer92@gmail.com>

Co-authored-by: peter scholz <pscholz.le@gmail.com>
2021-03-16 09:14:02 +01:00
peter scholz 82fca50f4f
Adds rubocop GH action. (#823)
- updates grape version to latest
2021-03-16 00:17:58 +01:00
peter scholz ac09d8c0c6
Adds upgrade notice. (#819) 2021-03-15 23:30:45 +01:00
peter scholz 9584451476
Adds ruby 3.0 support. (#818)
- drops ruby < 2.5 support
  required version now > 2.5
- removes travis
- adds GH actions
2021-02-16 20:11:04 +01:00
MaximeRDY 5c71861c85
Add required with multiple present (#815)
* Add required with multiple present

* Change Readme

* Fix rubocop to 1.6.1

* Fix Changelog

* Up rubocop
2021-01-07 12:42:25 +01:00
peter scholz 80b96c0135
Prepare release 1.3.1 (#814)
- updates rubocop to 1.1
2020-11-01 15:36:52 +01:00
AntoineGuestin 08ae87f543
handle multiple presents (#813)
* handle multiple presents

* update documentation and changelog
2020-11-01 00:39:25 +01:00
peter scholz 8d245e5137
Fixes #809: supports UTF8 route names. (#811)
- adds changelog entry
2020-10-09 22:28:14 +02:00
peter scholz 5d15589480
Updates travis ci config. (#810)
- makes rubocop happy, after update
2020-10-09 20:05:47 +02:00
peter scholz 08b8c2fe05
Prepare release 1.3.0 (#808)
- updates and satisfy rubocop 0.90
- fixes ruby warnings
- adds truffelruby-head to travis
2020-09-05 00:52:12 +02:00
Jean-Francis Bastien 565f8e9a29
Don't overwrite model description with the route destription. (#804) 2020-09-03 22:43:49 +02:00
peter scholz 588579d12a
Prepare release 1.2.1 (#803) 2020-07-15 18:29:21 +02:00
peter scholz e1261f8627
Fixes behaviour after grape upgrade to 1.4.0. (#801)
- adds CHANGELOG entry
2020-07-14 08:40:22 +02:00
peter scholz 6db96410d4
Prepare release 1.2.0 (#800) 2020-07-01 22:02:05 +02:00
Edward Rudd 3cb37fe9f3
Allow entity_name to be called on parent classes (#794)
This resolves issue #659.
2020-07-01 21:00:30 +02:00
Garrett Blehm 961e7ca927
Modify full entity name to be RFC3986 compliant #797 (#798)
* Modify full entity name to be RFC3986 compliant #797

Signed-off-by: Garrett Blehm <garrett.blehm@cerner.com>

* Update changelog and upgrading files

Signed-off-by: Garrett Blehm <garrett.blehm@cerner.com>

* Update Changelog

* Corrects next version

* Modified ineritance and discriminator spec

Signed-off-by: Garrett Blehm <garrett.blehm@cerner.com>

Co-authored-by: Garrett Blehm <garrett.blehm@cerner.com>
Co-authored-by: peter scholz <pscholz.le@gmail.com>
2020-06-30 16:20:34 +02:00
MaximeRDY e86c9ba62d
Features/inheritance and discriminator (#793)
* Add Discrimator

* Fix rubocop and add test

* Add Changelog

* Fix spec_helper and move test

* Add Readme

* Point grape-swagger-entity to rubygems again

* Force new test

* Fix rubocop

Co-authored-by: peter scholz <pscholz.le@gmail.com>
2020-06-30 10:21:59 +02:00
peter scholz ff5b610206
Points to grape-swagger-entity fix. (#799)
- allows grape head to fails ... for the moment
2020-06-30 10:12:52 +02:00
Daniel Hanke 71612befaa
Support Grape 1.4.0 (#796) 2020-06-12 19:38:33 +02:00
LeFnord 17fe8a6e4c Corrects README 2020-04-20 19:07:13 +02:00
peter scholz b69488b56e
Prepare release 1.1.0 (#787) 2020-04-20 19:00:11 +02:00
Valentine Kiselev 8f978dc8d2
Use full entity name as a default (fixes #779) (#786)
* Use full entity name as a default (fixes #779)

I just wanted to resolve this:

```
- model.to_s.split('::').last
+ model.to_s
```

But I met a problem that it receives Class type in here
8abddd5f2c/lib/grape-swagger/endpoint.rb (L354)
But String type in the another place, where the type is generated. So,
splitting and taking the last actually returns the same as `name`
method of the class. That is very strange I think.

Also, if we, for example, use such constructions, we end up with just
`V1` and `V2` fron the `A::B` module as they are parsed first:

```ruby
module A
  module B
    class V1 < Grape::Entity
     ...

    class V2 < Grape::Entity
     ...

module A
  module C
    class V1 < Grape::Entity
      ...

    class V2 < Grape::Entity
      ...
```

This PR fixes this issue.

* Update CHANGELOG

* Fix for old Ruby versions

* Skip Representable:: prefix just like Entity::

* Add upgrade entry and move changelog entry from fixes to features scope
2020-04-20 10:58:37 +02:00
MaximeRDY 077a27441f
Add Extensions for Params (#785)
* Add Extensions for Params

* Add Documentation for `x:` in params

* Remove require `pry`
2020-04-17 12:28:44 +02:00
peter scholz 498246ee20
Updates travis matrix to new ruby versions. (#783) 2020-04-05 18:14:18 +02:00
Mikhail Doronin 05939a068a
Allow passing class name as a string for rake task initializer (#782)
It may be possible that API classes are not yet loaded
when the oapi rake tasks are initialized in Rakefile.

Add a possibility to pass class name as a string to not mess with class loader configuration.

Co-authored-by: Mikhail Doronin <mikhail.doronin@capitainetrain.com>
2020-03-23 19:14:26 +01:00
peter scholz 2d471d0b77
Updates rubocop to 0.80. (#780)
- next try to fix danger warning
2020-03-02 01:12:49 +01:00
LeFnord fada2560b6 Add release date. 2020-02-10 00:11:34 +01:00
LeFnord 2c7fa08a5b Prepare release 1.0.0 2020-02-09 23:40:22 +01:00
peter scholz 1ce0b5f795 Make usage of grape >= 1.3 (#777)
* Replaces Virtus by dry-type.

* Makes usage of rack ~> 2.1

* Adds changelog entry.

- adapts travis config
2020-02-09 23:30:21 +01:00
Edward Rudd 8abddd5f2c allow token_owner to be passed to the hidden proc for parameters as well (#775) 2020-02-09 23:10:32 +01:00
LeFnord 11d29c40c5 Prepare release 0.34.2 2020-01-20 18:43:48 +01:00
peter scholz 56806e2e7e
Freeze Rack version to 2.0.8 (#773)
- corrects version matrix
2020-01-20 18:39:10 +01:00