5 files changed +1
-52
lines changed Original file line number Diff line number Diff line change 14
14
* [ #2538 ] ( https://github.com/ruby-grape/grape/pull/2538 ) : Fix validating nested json array params - [ @mohammednasser-32 ] ( https://github.com/mohammednasser-32 ) .
15
15
* [ #2543 ] ( https://github.com/ruby-grape/grape/pull/2543 ) : Fix array allocation on mount - [ @ericproulx ] ( https://github.com/ericproulx ) .
16
16
* [ #2546 ] ( https://github.com/ruby-grape/grape/pull/2546 ) : Fix middleware with keywords - [ @ericproulx ] ( https://github.com/ericproulx ) .
17
+ * [ #2547 ] ( https://github.com/ruby-grape/grape/pull/2547 ) : Remove jsonapi related code - [ @ericproulx ] ( https://github.com/ericproulx ) .
17
18
* Your contribution here.
18
19
19
20
### 2.3.0 (2025-02-08)
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -162,27 +162,6 @@ def call(_env)
162
162
end
163
163
end
164
164
165
- context do
166
- let ( :running_app ) { exception_app }
167
- let ( :options ) { { rescue_all : true , format : :jsonapi } }
168
-
169
- it 'is possible to return errors in jsonapi format' do
170
- get '/'
171
- expect ( last_response . body ) . to eq ( '{"error":"rain!"}' )
172
- end
173
- end
174
-
175
- context do
176
- let ( :running_app ) { error_hash_app }
177
- let ( :options ) { { rescue_all : true , format : :jsonapi } }
178
-
179
- it 'is possible to return hash errors in jsonapi format' do
180
- get '/'
181
- expect ( [ '{"error":"rain!","detail":"missing widget"}' ,
182
- '{"detail":"missing widget","error":"rain!"}' ] ) . to include ( last_response . body )
183
- end
184
- end
185
-
186
165
context do
187
166
let ( :running_app ) { exception_app }
188
167
let ( :options ) { { rescue_all : true , format : :xml } }
Original file line number Diff line number Diff line change @@ -36,23 +36,6 @@ def to_json(*_args)
36
36
end
37
37
end
38
38
39
- context 'jsonapi' do
40
- let ( :body ) { { 'foos' => [ { 'bar' => 'baz' } ] } }
41
- let ( :env ) do
42
- { Rack ::PATH_INFO => '/somewhere' , Grape ::Http ::Headers ::HTTP_ACCEPT => 'application/vnd.api+json' }
43
- end
44
-
45
- it 'calls #to_json if the content type is jsonapi' do
46
- body . instance_eval do
47
- def to_json ( *_args )
48
- '{"foos":[{"bar":"baz"}] }'
49
- end
50
- end
51
- r = Rack ::MockResponse [ *subject . call ( env ) ]
52
- expect ( r . body ) . to eq ( Grape ::Json . dump ( body ) )
53
- end
54
- end
55
-
56
39
context 'xml' do
57
40
let ( :body ) { +'string' }
58
41
let ( :env ) do
0 commit comments