praxis 2.0.pre.4 → 2.0.pre.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +5 -5
  2. data/.rspec +0 -1
  3. data/.ruby-version +1 -0
  4. data/CHANGELOG.md +31 -0
  5. data/Gemfile +1 -1
  6. data/Guardfile +2 -1
  7. data/Rakefile +1 -7
  8. data/TODO.md +28 -0
  9. data/lib/api_browser/package-lock.json +7110 -0
  10. data/lib/praxis.rb +7 -4
  11. data/lib/praxis/action_definition.rb +9 -16
  12. data/lib/praxis/api_general_info.rb +21 -0
  13. data/lib/praxis/application.rb +1 -2
  14. data/lib/praxis/bootloader_stages/routing.rb +2 -4
  15. data/lib/praxis/docs/generator.rb +11 -6
  16. data/lib/praxis/docs/open_api_generator.rb +255 -0
  17. data/lib/praxis/docs/openapi/info_object.rb +39 -0
  18. data/lib/praxis/docs/openapi/media_type_object.rb +59 -0
  19. data/lib/praxis/docs/openapi/operation_object.rb +40 -0
  20. data/lib/praxis/docs/openapi/parameter_object.rb +69 -0
  21. data/lib/praxis/docs/openapi/paths_object.rb +55 -0
  22. data/lib/praxis/docs/openapi/request_body_object.rb +51 -0
  23. data/lib/praxis/docs/openapi/response_object.rb +63 -0
  24. data/lib/praxis/docs/openapi/responses_object.rb +44 -0
  25. data/lib/praxis/docs/openapi/schema_object.rb +87 -0
  26. data/lib/praxis/docs/openapi/server_object.rb +24 -0
  27. data/lib/praxis/docs/openapi/tag_object.rb +21 -0
  28. data/lib/praxis/extensions/attribute_filtering.rb +2 -0
  29. data/lib/praxis/extensions/attribute_filtering/active_record_filter_query_builder.rb +148 -157
  30. data/lib/praxis/extensions/attribute_filtering/active_record_patches.rb +15 -0
  31. data/lib/praxis/extensions/attribute_filtering/active_record_patches/5x.rb +90 -0
  32. data/lib/praxis/extensions/attribute_filtering/active_record_patches/6_0.rb +68 -0
  33. data/lib/praxis/extensions/attribute_filtering/active_record_patches/6_1_plus.rb +58 -0
  34. data/lib/praxis/extensions/attribute_filtering/filter_tree_node.rb +35 -0
  35. data/lib/praxis/extensions/attribute_filtering/filtering_params.rb +12 -24
  36. data/lib/praxis/extensions/attribute_filtering/sequel_filter_query_builder.rb +3 -2
  37. data/lib/praxis/extensions/field_selection/active_record_query_selector.rb +7 -9
  38. data/lib/praxis/extensions/field_selection/field_selector.rb +4 -0
  39. data/lib/praxis/extensions/field_selection/sequel_query_selector.rb +6 -9
  40. data/lib/praxis/extensions/pagination.rb +130 -0
  41. data/lib/praxis/extensions/pagination/active_record_pagination_handler.rb +42 -0
  42. data/lib/praxis/extensions/pagination/header_generator.rb +70 -0
  43. data/lib/praxis/extensions/pagination/ordering_params.rb +238 -0
  44. data/lib/praxis/extensions/pagination/pagination_handler.rb +68 -0
  45. data/lib/praxis/extensions/pagination/pagination_params.rb +378 -0
  46. data/lib/praxis/extensions/pagination/sequel_pagination_handler.rb +45 -0
  47. data/lib/praxis/handlers/json.rb +2 -0
  48. data/lib/praxis/handlers/www_form.rb +5 -0
  49. data/lib/praxis/handlers/{xml.rb → xml-sample.rb} +6 -0
  50. data/lib/praxis/links.rb +4 -0
  51. data/lib/praxis/mapper/active_model_compat.rb +23 -5
  52. data/lib/praxis/mapper/resource.rb +16 -9
  53. data/lib/praxis/mapper/selector_generator.rb +0 -4
  54. data/lib/praxis/mapper/sequel_compat.rb +1 -0
  55. data/lib/praxis/media_type.rb +1 -56
  56. data/lib/praxis/multipart/part.rb +5 -2
  57. data/lib/praxis/plugins/mapper_plugin.rb +1 -1
  58. data/lib/praxis/plugins/pagination_plugin.rb +71 -0
  59. data/lib/praxis/resource_definition.rb +4 -12
  60. data/lib/praxis/response_definition.rb +1 -1
  61. data/lib/praxis/route.rb +2 -4
  62. data/lib/praxis/routing_config.rb +4 -8
  63. data/lib/praxis/tasks/api_docs.rb +23 -0
  64. data/lib/praxis/tasks/routes.rb +10 -15
  65. data/lib/praxis/types/media_type_common.rb +10 -0
  66. data/lib/praxis/types/multipart_array.rb +62 -0
  67. data/lib/praxis/validation_handler.rb +1 -2
  68. data/lib/praxis/version.rb +1 -1
  69. data/praxis.gemspec +4 -5
  70. data/spec/functional_spec.rb +9 -6
  71. data/spec/praxis/action_definition_spec.rb +4 -16
  72. data/spec/praxis/api_general_info_spec.rb +6 -6
  73. data/spec/praxis/extensions/attribute_filtering/active_record_filter_query_builder_spec.rb +304 -0
  74. data/spec/praxis/extensions/attribute_filtering/filter_tree_node_spec.rb +39 -0
  75. data/spec/praxis/extensions/attribute_filtering/filtering_params_spec.rb +140 -0
  76. data/spec/praxis/extensions/field_expansion_spec.rb +6 -24
  77. data/spec/praxis/extensions/field_selection/active_record_query_selector_spec.rb +15 -11
  78. data/spec/praxis/extensions/field_selection/sequel_query_selector_spec.rb +4 -3
  79. data/spec/praxis/extensions/pagination/active_record_pagination_handler_spec.rb +130 -0
  80. data/spec/praxis/extensions/{field_selection/support → support}/spec_resources_active_model.rb +45 -2
  81. data/spec/praxis/extensions/{field_selection/support → support}/spec_resources_sequel.rb +0 -0
  82. data/spec/praxis/media_type_spec.rb +5 -129
  83. data/spec/praxis/request_spec.rb +3 -22
  84. data/spec/praxis/resource_definition_spec.rb +1 -1
  85. data/spec/praxis/response_definition_spec.rb +8 -9
  86. data/spec/praxis/route_spec.rb +2 -9
  87. data/spec/praxis/routing_config_spec.rb +4 -13
  88. data/spec/praxis/types/multipart_array_spec.rb +4 -21
  89. data/spec/spec_app/config/environment.rb +0 -2
  90. data/spec/spec_app/design/api.rb +7 -1
  91. data/spec/spec_app/design/media_types/instance.rb +0 -8
  92. data/spec/spec_app/design/media_types/volume.rb +0 -12
  93. data/spec/spec_app/design/resources/instances.rb +1 -2
  94. data/spec/spec_helper.rb +6 -0
  95. data/spec/support/spec_media_types.rb +0 -73
  96. metadata +51 -49
  97. data/spec/praxis/handlers/xml_spec.rb +0 -177
  98. data/spec/praxis/links_spec.rb +0 -68
@@ -41,14 +41,6 @@ describe Praxis::Types::MultipartArray do
41
41
  entity = MIME::Application.new('file2')
42
42
  form_data.add entity,'files', 'file2'
43
43
 
44
- entity = MIME::Application.new('
45
- <?xml version="1.0" encoding="UTF-8"?>
46
- <hash>
47
- <first_name>James</first_name>
48
- </hash>
49
- ', 'xml')
50
- form_data.add entity,'stuff1'
51
-
52
44
  entity = MIME::Application.new('{"first_name": "Frank"}', 'json')
53
45
  form_data.add entity,'stuff2'
54
46
 
@@ -81,9 +73,6 @@ describe Praxis::Types::MultipartArray do
81
73
  files = payload.part('files')
82
74
  expect(files).to have(2).items
83
75
 
84
- stuff1 = payload.part('stuff1')
85
- expect(stuff1.payload['first_name']).to eq 'James'
86
-
87
76
  stuff2 = payload.part('stuff2')
88
77
  expect(stuff2.payload['first_name']).to eq 'Frank'
89
78
 
@@ -274,7 +263,7 @@ describe Praxis::Types::MultipartArray do
274
263
 
275
264
  let(:example) { type.example }
276
265
 
277
- let(:default_format) { 'xml' }
266
+ let(:default_format) { 'json' }
278
267
 
279
268
  let(:output) { example.dump(default_format: default_format) }
280
269
 
@@ -282,29 +271,23 @@ describe Praxis::Types::MultipartArray do
282
271
 
283
272
  it 'dumps the parts with the proper handler' do
284
273
  json_handler = Praxis::Application.instance.handlers['json']
285
- xml_handler = Praxis::Application.instance.handlers['xml']
286
274
 
287
275
  # title is simple string, so should keep text/plain
288
276
  title = parts.find { |part| part.name == 'title' }
289
277
  expect(title.content_type.to_s).to eq 'text/plain'
290
278
  expect(title.payload).to eq example.part('title').payload
291
279
 
292
- # things are structs with no content-type header defined
293
- thing = parts.find { |part| part.name == 'thing' }
294
- expect(thing.content_type.to_s).to eq 'application/xml'
295
- expect(thing.payload).to eq xml_handler.generate(example.part('thing').payload.dump)
296
-
297
280
  # stuff has hardcoded 'application/json' content-type, and should remain such
298
281
  stuff = parts.find { |part| part.name == 'stuff' }
299
282
  expect(stuff.content_type.to_s).to eq 'application/json'
300
283
  expect(stuff.payload).to eq json_handler.generate(example.part('stuff').payload.dump)
301
284
 
302
285
  # instances just specify 'application/vnd.acme.instance', and should
303
- # have xml suffix appended
286
+ # have json suffix appended
304
287
  instances = parts.select { |part| part.name == 'instances' }
305
288
  instances.each_with_index do |instance, i|
306
- expect(instance.content_type.to_s).to eq 'application/vnd.acme.instance+xml'
307
- expect(instance.payload).to eq xml_handler.generate(example.part('instances')[i].payload.dump)
289
+ expect(instance.content_type.to_s).to eq 'application/vnd.acme.instance+json'
290
+ expect(instance.payload).to eq json_handler.generate(example.part('instances')[i].payload.dump)
308
291
  end
309
292
  end
310
293
 
@@ -14,8 +14,6 @@ end
14
14
 
15
15
  Praxis::Application.configure do |application|
16
16
 
17
- application.handler 'xml', Praxis::Handlers::XML
18
-
19
17
  application.middleware SetHeader, 'Spec-Middleware', 'used'
20
18
 
21
19
  application.bootloader.use SimpleAuthenticationPlugin, config_file: 'config/authentication.yml'
@@ -24,9 +24,15 @@ Praxis::ApiDefinition.define do
24
24
  description "This example API should really be replaced by a set of more full-fledged example apps in the future"
25
25
 
26
26
  base_path "/api"
27
- produces 'json','xml'
27
+ produces 'json'
28
28
  #version_with :path
29
29
  #base_path "/v:api_version"
30
+
31
+ # Custom attributes (for OpenApi, for example)
32
+ termsOfService "http://example.com/tos"
33
+ contact name: 'Joe', email: 'joe@email.com'
34
+ license name: "Apache 2.0",
35
+ url: "https://www.apache.org/licenses/LICENSE-2.0.html"
30
36
  end
31
37
 
32
38
  info '1.0' do # Applies to 1.0 version (and inherits everything else form the global one)
@@ -14,16 +14,11 @@ class Instance < Praxis::MediaType
14
14
 
15
15
  attribute :volumes, Volume::Collection
16
16
 
17
- links do
18
- link :root_volume
19
- link :other_volume, Volume, using: :data_volume
20
- end
21
17
  end
22
18
 
23
19
  view :default do
24
20
  attribute :id
25
21
  attribute :root_volume
26
- attribute :links
27
22
  end
28
23
 
29
24
  view :link do
@@ -40,9 +35,6 @@ class Instance < Praxis::MediaType
40
35
  attribute :id
41
36
  attribute :name
42
37
  attribute :root_volume
43
- attribute :links do
44
- attribute :root_volume
45
- end
46
38
  end
47
39
 
48
40
 
@@ -9,12 +9,6 @@ class Volume < Praxis::MediaType
9
9
 
10
10
  attribute :snapshots, Praxis::Collection.of(VolumeSnapshot)
11
11
  attribute :snapshots_summary, VolumeSnapshot::CollectionSummary
12
-
13
- links do
14
- link :source
15
- link :snapshots, VolumeSnapshot::CollectionSummary, using: :snapshots_summary
16
- end
17
-
18
12
  end
19
13
 
20
14
  view :default do
@@ -22,12 +16,6 @@ class Volume < Praxis::MediaType
22
16
  attribute :name
23
17
  attribute :source
24
18
  attribute :snapshots
25
-
26
- attribute :links
27
- end
28
-
29
- view :link do
30
- attribute :id
31
19
  end
32
20
 
33
21
  class Collection < Praxis::Collection
@@ -44,7 +44,6 @@ module ApiResources
44
44
  action :show do
45
45
  routing do
46
46
  get '/:id'
47
- get '/something/:id', name: :alternate
48
47
  end
49
48
 
50
49
  response :ok, media_type: 'application/json'
@@ -144,7 +143,7 @@ module ApiResources
144
143
  attribute :id
145
144
  end
146
145
 
147
- payload do
146
+ payload required: false do
148
147
  attribute :when, DateTime
149
148
  end
150
149
 
@@ -7,6 +7,12 @@ $:.unshift File.expand_path('support',__dir__)
7
7
 
8
8
  require 'bundler'
9
9
  Bundler.setup :default, :test
10
+
11
+ RSpec.configure do |config|
12
+ config.filter_run focus: true
13
+ config.run_all_when_everything_filtered = true
14
+ end
15
+
10
16
  require 'simplecov'
11
17
  SimpleCov.start 'praxis'
12
18
 
@@ -6,22 +6,13 @@ class Person < Praxis::MediaType
6
6
  attribute :id, Integer
7
7
  attribute :name, String, example: /[:name:]/
8
8
  attribute :href, String, example: proc { |person| "/people/#{person.id}" }
9
- attribute :links, Attributor::Collection.of(String),
10
- description: 'Here to ensure an explicit links attribute works'
11
-
12
9
  end
13
10
 
14
11
  view :default do
15
12
  attribute :id
16
13
  attribute :name
17
- attribute :links
18
14
  end
19
15
 
20
- view :link do
21
- attribute :id
22
- attribute :name
23
- attribute :href
24
- end
25
16
 
26
17
  class CollectionSummary < Praxis::MediaType
27
18
  attributes do
@@ -29,11 +20,6 @@ class Person < Praxis::MediaType
29
20
  attribute :size, Integer
30
21
  end
31
22
 
32
- view :link do
33
- attribute :href
34
- attribute :size
35
- end
36
-
37
23
  view :default do
38
24
  attribute :href
39
25
  end
@@ -59,14 +45,6 @@ class Address < Praxis::MediaType
59
45
  attribute :residents_summary, Person::CollectionSummary
60
46
 
61
47
  attribute :fields, Praxis::Types::FieldSelector.for(Person)
62
-
63
- links do
64
- link :owner
65
- link :super, Person, using: :manager
66
- link :caretaker, using: :custodian
67
- link :residents, using: :residents_summary
68
- end
69
-
70
48
  end
71
49
 
72
50
  view :default do
@@ -74,15 +52,7 @@ class Address < Praxis::MediaType
74
52
  attribute :name
75
53
  attribute :owner
76
54
  attribute :fields
77
-
78
- attribute :links
79
- end
80
-
81
- view :link do
82
- attribute :id
83
- attribute :name
84
55
  end
85
-
86
56
  end
87
57
 
88
58
 
@@ -123,10 +93,6 @@ class Blog < Praxis::MediaType
123
93
  example: proc { |blog,ctx| Post::CollectionSummary.example(ctx, href: "#{blog.href}/posts") },
124
94
  description: "Summary of information from related Post resources"
125
95
 
126
- links do
127
- link :posts, using: :posts_summary
128
- link :owner
129
- end
130
96
  end
131
97
 
132
98
  view :default do
@@ -138,7 +104,6 @@ class Blog < Praxis::MediaType
138
104
  attribute :timestamps
139
105
 
140
106
  attribute :owner
141
- attribute :links
142
107
  end
143
108
 
144
109
  view :overview do
@@ -146,11 +111,6 @@ class Blog < Praxis::MediaType
146
111
  attribute :name
147
112
  attribute :description
148
113
  end
149
-
150
- view :link do
151
- attribute :href
152
- end
153
-
154
114
  end
155
115
 
156
116
 
@@ -185,11 +145,6 @@ class Post < Praxis::MediaType
185
145
  attribute :created_at, DateTime
186
146
  attribute :updated_at, DateTime
187
147
  end
188
-
189
- links do
190
- link :author
191
- link :blog
192
- end
193
148
  end
194
149
 
195
150
  view :default do
@@ -202,23 +157,13 @@ class Post < Praxis::MediaType
202
157
  attribute :author
203
158
 
204
159
  attribute :timestamps
205
- attribute :links
206
- end
207
-
208
- view :link do
209
- attribute :href
210
160
  end
211
161
 
212
-
213
162
  class CollectionSummary < Praxis::MediaType
214
163
  attributes do
215
164
  attribute :href, String
216
165
  attribute :count, Integer
217
166
  end
218
-
219
- view :link do
220
- attribute :href
221
- end
222
167
  end
223
168
  end
224
169
 
@@ -251,12 +196,6 @@ class User < Praxis::MediaType
251
196
 
252
197
  attribute :posts_summary, Post::CollectionSummary,
253
198
  example: proc { |user,ctx| Post::CollectionSummary.example(ctx, href: "#{user.href}/posts") }
254
-
255
- links do
256
- link :posts, using: :posts_summary
257
- link :primary_blog
258
- end
259
-
260
199
  end
261
200
 
262
201
  view :default do
@@ -265,8 +204,6 @@ class User < Praxis::MediaType
265
204
 
266
205
  attribute :first
267
206
  attribute :last
268
-
269
- attribute :links
270
207
  end
271
208
 
272
209
  view :extended do
@@ -276,20 +213,10 @@ class User < Praxis::MediaType
276
213
  attribute :first
277
214
  attribute :last
278
215
  attribute :primary_blog, view: :overview
279
-
280
- attribute :links
281
216
  end
282
217
 
283
218
  view :with_post_links do
284
219
  attribute :id
285
220
  attribute :posts, view: :link
286
221
  end
287
-
288
- view :link do
289
- attribute :href
290
- end
291
-
292
- view :summary do
293
- attribute :links
294
- end
295
222
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: praxis
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.pre.4
4
+ version: 2.0.pre.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep M. Blanquer
8
8
  - Dane Jensen
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-08-05 00:00:00.000000000 Z
12
+ date: 2020-11-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
@@ -79,28 +79,28 @@ dependencies:
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '3.4'
82
+ version: '3.5'
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '3.4'
89
+ version: '3.5'
90
90
  - !ruby/object:Gem::Dependency
91
91
  name: attributor
92
92
  requirement: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '5.4'
96
+ version: '5.5'
97
97
  type: :runtime
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '5.4'
103
+ version: '5.5'
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: thor
106
106
  requirement: !ruby/object:Gem::Requirement
@@ -147,30 +147,16 @@ dependencies:
147
147
  name: rake
148
148
  requirement: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '0.9'
153
- type: :development
154
- prerelease: false
155
- version_requirements: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '0.9'
160
- - !ruby/object:Gem::Dependency
161
- name: rake-notes
162
- requirement: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
150
+ - - ">="
165
151
  - !ruby/object:Gem::Version
166
- version: '0'
152
+ version: 12.3.3
167
153
  type: :development
168
154
  prerelease: false
169
155
  version_requirements: !ruby/object:Gem::Requirement
170
156
  requirements:
171
- - - "~>"
157
+ - - ">="
172
158
  - !ruby/object:Gem::Version
173
- version: '0'
159
+ version: 12.3.3
174
160
  - !ruby/object:Gem::Dependency
175
161
  name: pry
176
162
  requirement: !ruby/object:Gem::Requirement
@@ -353,20 +339,6 @@ dependencies:
353
339
  - - "~>"
354
340
  - !ruby/object:Gem::Version
355
341
  version: '2'
356
- - !ruby/object:Gem::Dependency
357
- name: yard
358
- requirement: !ruby/object:Gem::Requirement
359
- requirements:
360
- - - ">="
361
- - !ruby/object:Gem::Version
362
- version: 0.9.20
363
- type: :development
364
- prerelease: false
365
- version_requirements: !ruby/object:Gem::Requirement
366
- requirements:
367
- - - ">="
368
- - !ruby/object:Gem::Version
369
- version: 0.9.20
370
342
  - !ruby/object:Gem::Dependency
371
343
  name: coveralls
372
344
  requirement: !ruby/object:Gem::Requirement
@@ -409,7 +381,7 @@ dependencies:
409
381
  - - ">"
410
382
  - !ruby/object:Gem::Version
411
383
  version: '4'
412
- description:
384
+ description:
413
385
  email:
414
386
  - blanquer@gmail.com
415
387
  - dane.jensen@gmail.com
@@ -420,6 +392,7 @@ extra_rdoc_files: []
420
392
  files:
421
393
  - ".gitignore"
422
394
  - ".rspec"
395
+ - ".ruby-version"
423
396
  - ".simplecov"
424
397
  - ".travis.yml"
425
398
  - CHANGELOG.md
@@ -431,6 +404,7 @@ files:
431
404
  - MAINTAINERS.md
432
405
  - README.md
433
406
  - Rakefile
407
+ - TODO.md
434
408
  - bin/praxis
435
409
  - lib/api_browser/.bowerrc
436
410
  - lib/api_browser/.editorconfig
@@ -516,6 +490,7 @@ files:
516
490
  - lib/api_browser/app/views/types/standalone/default.html
517
491
  - lib/api_browser/app/views/types/standalone/struct.html
518
492
  - lib/api_browser/bower_template.json
493
+ - lib/api_browser/package-lock.json
519
494
  - lib/api_browser/package.json
520
495
  - lib/praxis.rb
521
496
  - lib/praxis/action_definition.rb
@@ -540,6 +515,18 @@ files:
540
515
  - lib/praxis/dispatcher.rb
541
516
  - lib/praxis/docs/generator.rb
542
517
  - lib/praxis/docs/link_builder.rb
518
+ - lib/praxis/docs/open_api_generator.rb
519
+ - lib/praxis/docs/openapi/info_object.rb
520
+ - lib/praxis/docs/openapi/media_type_object.rb
521
+ - lib/praxis/docs/openapi/operation_object.rb
522
+ - lib/praxis/docs/openapi/parameter_object.rb
523
+ - lib/praxis/docs/openapi/paths_object.rb
524
+ - lib/praxis/docs/openapi/request_body_object.rb
525
+ - lib/praxis/docs/openapi/response_object.rb
526
+ - lib/praxis/docs/openapi/responses_object.rb
527
+ - lib/praxis/docs/openapi/schema_object.rb
528
+ - lib/praxis/docs/openapi/server_object.rb
529
+ - lib/praxis/docs/openapi/tag_object.rb
543
530
  - lib/praxis/error_handler.rb
544
531
  - lib/praxis/exception.rb
545
532
  - lib/praxis/exceptions/config.rb
@@ -550,7 +537,13 @@ files:
550
537
  - lib/praxis/exceptions/invalid_trait.rb
551
538
  - lib/praxis/exceptions/stage_not_found.rb
552
539
  - lib/praxis/exceptions/validation.rb
540
+ - lib/praxis/extensions/attribute_filtering.rb
553
541
  - lib/praxis/extensions/attribute_filtering/active_record_filter_query_builder.rb
542
+ - lib/praxis/extensions/attribute_filtering/active_record_patches.rb
543
+ - lib/praxis/extensions/attribute_filtering/active_record_patches/5x.rb
544
+ - lib/praxis/extensions/attribute_filtering/active_record_patches/6_0.rb
545
+ - lib/praxis/extensions/attribute_filtering/active_record_patches/6_1_plus.rb
546
+ - lib/praxis/extensions/attribute_filtering/filter_tree_node.rb
554
547
  - lib/praxis/extensions/attribute_filtering/filtering_params.rb
555
548
  - lib/praxis/extensions/attribute_filtering/sequel_filter_query_builder.rb
556
549
  - lib/praxis/extensions/field_expansion.rb
@@ -558,6 +551,13 @@ files:
558
551
  - lib/praxis/extensions/field_selection/active_record_query_selector.rb
559
552
  - lib/praxis/extensions/field_selection/field_selector.rb
560
553
  - lib/praxis/extensions/field_selection/sequel_query_selector.rb
554
+ - lib/praxis/extensions/pagination.rb
555
+ - lib/praxis/extensions/pagination/active_record_pagination_handler.rb
556
+ - lib/praxis/extensions/pagination/header_generator.rb
557
+ - lib/praxis/extensions/pagination/ordering_params.rb
558
+ - lib/praxis/extensions/pagination/pagination_handler.rb
559
+ - lib/praxis/extensions/pagination/pagination_params.rb
560
+ - lib/praxis/extensions/pagination/sequel_pagination_handler.rb
561
561
  - lib/praxis/extensions/rails_compat.rb
562
562
  - lib/praxis/extensions/rails_compat/request_methods.rb
563
563
  - lib/praxis/extensions/rendering.rb
@@ -565,7 +565,7 @@ files:
565
565
  - lib/praxis/handlers/json.rb
566
566
  - lib/praxis/handlers/plain.rb
567
567
  - lib/praxis/handlers/www_form.rb
568
- - lib/praxis/handlers/xml.rb
568
+ - lib/praxis/handlers/xml-sample.rb
569
569
  - lib/praxis/links.rb
570
570
  - lib/praxis/mapper/active_model_compat.rb
571
571
  - lib/praxis/mapper/resource.rb
@@ -580,6 +580,7 @@ files:
580
580
  - lib/praxis/plugin.rb
581
581
  - lib/praxis/plugin_concern.rb
582
582
  - lib/praxis/plugins/mapper_plugin.rb
583
+ - lib/praxis/plugins/pagination_plugin.rb
583
584
  - lib/praxis/plugins/rails_plugin.rb
584
585
  - lib/praxis/request.rb
585
586
  - lib/praxis/request_stages/action.rb
@@ -637,17 +638,19 @@ files:
637
638
  - spec/praxis/config_spec.rb
638
639
  - spec/praxis/controller_spec.rb
639
640
  - spec/praxis/dispatcher_spec.rb
641
+ - spec/praxis/extensions/attribute_filtering/active_record_filter_query_builder_spec.rb
642
+ - spec/praxis/extensions/attribute_filtering/filter_tree_node_spec.rb
643
+ - spec/praxis/extensions/attribute_filtering/filtering_params_spec.rb
640
644
  - spec/praxis/extensions/field_expansion_spec.rb
641
645
  - spec/praxis/extensions/field_selection/active_record_query_selector_spec.rb
642
646
  - spec/praxis/extensions/field_selection/field_selector_spec.rb
643
647
  - spec/praxis/extensions/field_selection/sequel_query_selector_spec.rb
644
- - spec/praxis/extensions/field_selection/support/spec_resources_active_model.rb
645
- - spec/praxis/extensions/field_selection/support/spec_resources_sequel.rb
648
+ - spec/praxis/extensions/pagination/active_record_pagination_handler_spec.rb
646
649
  - spec/praxis/extensions/rendering_spec.rb
650
+ - spec/praxis/extensions/support/spec_resources_active_model.rb
651
+ - spec/praxis/extensions/support/spec_resources_sequel.rb
647
652
  - spec/praxis/file_group_spec.rb
648
653
  - spec/praxis/handlers/json_spec.rb
649
- - spec/praxis/handlers/xml_spec.rb
650
- - spec/praxis/links_spec.rb
651
654
  - spec/praxis/mapper/resource_spec.rb
652
655
  - spec/praxis/mapper/selector_generator_spec.rb
653
656
  - spec/praxis/media_type_identifier_spec.rb
@@ -740,7 +743,7 @@ homepage: https://github.com/praxis/praxis
740
743
  licenses:
741
744
  - MIT
742
745
  metadata: {}
743
- post_install_message:
746
+ post_install_message:
744
747
  rdoc_options: []
745
748
  require_paths:
746
749
  - lib
@@ -755,9 +758,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
755
758
  - !ruby/object:Gem::Version
756
759
  version: 1.3.1
757
760
  requirements: []
758
- rubyforge_project:
759
- rubygems_version: 2.6.14
760
- signing_key:
761
+ rubygems_version: 3.1.2
762
+ signing_key:
761
763
  specification_version: 4
762
764
  summary: Building APIs the way you want it.
763
765
  test_files: []