Commit Graph

6 Commits

Author SHA1 Message Date
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
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
peter scholz 1ede5c4f7f prepare 0.27.0 (#598)
- updates dependencies
- makes rubocop 0.48 happy
2017-03-28 11:15:33 +02:00
peter scholz 2df7dbeaf1 issue #590: fixes rubocop offences (#595) 2017-03-08 09:32:31 +01:00
peter scholz 17db1b8fab align array params for post, put request (#553)
- adds changelog entry
2016-12-16 01:35:13 +01:00
peter scholz 57947d308e accepts string as entity (#527)
- adds changelog entry
- requires min version of rubocop
2016-10-31 12:14:08 +01:00