praxis 2.0.pre.30 → 2.0.pre.31
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b0d313f269a5d2eee55bec87524dc37d0b424ed747969fa35f3f8454e658028
|
4
|
+
data.tar.gz: 894589492bcd9d0cd1c8af237215892e163c9229f6f81a6aa90a709b43623a25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1744d64f7e8521185d687cc124c8b553b297f79734c74b0bffb83bab7a5f8bdbacf1e71899ffce8044fddbf1d92902270fae4892425808aaedc6eff7a2490f61
|
7
|
+
data.tar.gz: c5602b15ddf593f4b387f39c398fd411158e2b936e5763a21cf01edb86c3ea4c87f3a09f95c5fa2bff29317075ebae6bbec52eba5190b9594359e335e14ef23f
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
## next
|
4
4
|
|
5
|
+
## 2.0.pre.31
|
6
|
+
* Switch the locally generated index.html file to browse the generated OpenAPI docs to use `elements` instead of `reDoc`
|
7
|
+
* Spruce up the initial Gemfile for the generated example app
|
8
|
+
* Fix Praxis::Mapper ordering code, to not prefix top level columns with the table name, as this completely confuses ActiveRecord which switches to full-on eager loading all of the associations in the top query. i.e., passing an invalid table/column name in a `references` method will trigger that (seemingly a current bug)
|
9
|
+
|
5
10
|
## 2.0.pre.30
|
6
11
|
* A few cleanup and robustness additions:
|
7
12
|
* OpenAPI: Disable overriding a description when the schema is a ref (there are known issues with UI browsers)
|
@@ -171,30 +171,25 @@ module Praxis
|
|
171
171
|
File.open("#{filename}.yml", 'w') { |f| f.write(YAML.dump(converted_full_data)) }
|
172
172
|
|
173
173
|
html = <<-HTML
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
<body>
|
194
|
-
<redoc spec-url='http://localhost:9090/#{version_file}/openapi.json'></redoc>
|
195
|
-
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
|
196
|
-
</body>
|
197
|
-
</html>
|
174
|
+
<!doctype html>
|
175
|
+
<html lang="en">
|
176
|
+
<head>
|
177
|
+
<meta charset="utf-8">
|
178
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
179
|
+
<title>Elements in HTML</title>
|
180
|
+
|
181
|
+
<script src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script>
|
182
|
+
<link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css">
|
183
|
+
</head>
|
184
|
+
<body>
|
185
|
+
|
186
|
+
<elements-api
|
187
|
+
apiDescriptionUrl="http://localhost:9090/#{version_file}/openapi.json"
|
188
|
+
router="hash"
|
189
|
+
/>
|
190
|
+
|
191
|
+
</body>
|
192
|
+
</html>
|
198
193
|
HTML
|
199
194
|
html_file = File.join(doc_root_dir, version_file, 'index.html')
|
200
195
|
File.write(html_file, html)
|
@@ -36,7 +36,7 @@ module Praxis
|
|
36
36
|
column_prefix = dotted.empty? ? root_resource.model.table_name : ([''] + dotted).join(AttributeFiltering::ActiveRecordFilterQueryBuilder::REFERENCES_STRING_SEPARATOR)
|
37
37
|
|
38
38
|
# If the sorting refers to a deeper association, make sure to add the join and the special reference
|
39
|
-
if column_prefix
|
39
|
+
if column_prefix && column_prefix != root_resource.model.table_name
|
40
40
|
refval = AttributeFiltering::ActiveRecordFilterQueryBuilder.build_reference_value(column_prefix, query: query)
|
41
41
|
# Outter join hash needs to be a string based hash format!! (if it's in symbols, it won't match it and we'll cause extra joins)
|
42
42
|
query = query.left_outer_joins(info[:includes]).references(refval)
|
data/lib/praxis/version.rb
CHANGED
@@ -1,18 +1,22 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
gem 'activerecord', '~> 6'
|
6
|
+
gem 'link_header' # For pagination extensions
|
7
|
+
gem 'oj' # For fast JSON de/serialization handlers
|
8
|
+
gem 'parslet' # For field selection extension
|
3
9
|
gem 'praxis'
|
10
|
+
gem 'puma' # A much better web server than the default webrick
|
4
11
|
gem 'rack'
|
5
12
|
gem 'sqlite3'
|
6
|
-
gem 'activerecord'
|
7
|
-
gem 'puma' # A much better web server than the default webrick
|
8
|
-
gem 'parslet' # For field selection extension
|
9
|
-
gem 'link_header' # For pagination extensions
|
10
13
|
|
11
14
|
group :development, :test do
|
12
|
-
gem 'rake'
|
13
|
-
gem 'rack-test'
|
14
|
-
gem "rspec" # needed for rake task
|
15
15
|
gem 'database_cleaner' # For transactional DB tests
|
16
|
+
gem 'rack-test'
|
17
|
+
gem 'rake'
|
18
|
+
gem 'rspec' # needed for rake task
|
19
|
+
gem 'webrick' # For serving the API documentation browser preview
|
16
20
|
|
17
21
|
gem 'pry'
|
18
22
|
gem 'pry-byebug'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: praxis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.pre.
|
4
|
+
version: 2.0.pre.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep M. Blanquer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-03-
|
12
|
+
date: 2023-03-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -693,7 +693,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
693
693
|
- !ruby/object:Gem::Version
|
694
694
|
version: 1.3.1
|
695
695
|
requirements: []
|
696
|
-
rubygems_version: 3.
|
696
|
+
rubygems_version: 3.3.7
|
697
697
|
signing_key:
|
698
698
|
specification_version: 4
|
699
699
|
summary: Building APIs the way you want it.
|