praxis 2.0.pre.22 → 2.0.pre.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/praxis/docs/open_api/media_type_object.rb +13 -2
- data/lib/praxis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 222cfa107a8b45e1a7d397af277fc07448daa18849e13b5c115565d0e7db4996
|
4
|
+
data.tar.gz: 5fabb6000f848c062e813def28902ca002a33537ffe71a480daa7b84506a62b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0221bd47825ca1a92828c819cb2016bcbecdcff3c7546a8ee8160ac71fce38d7f17e442bec31c9ffeae3d4af74a794cad056ff348709c60cf226f56d31e76bb
|
7
|
+
data.tar.gz: e1635b5788fbed05bbd8daa8198a75bcb6aa40aedef9e1a89504f874ba7f306e70876e8fc0fed7a5ca90c5111a1c8846b1fd0f414bc85909835038cd6a46feef
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## next
|
4
4
|
|
5
|
+
## 2.0.pre.22
|
6
|
+
* Small fix in OpenAPI doc generation, which would detect and report more output types, even if they are only defined within the
|
7
|
+
children of anonymous types.
|
8
|
+
|
5
9
|
## 2.0.pre.22
|
6
10
|
* Introduced Resource callbacks (an includeable concern). Callbacks allow you to define methods or blocks to be executed `before`, `after` or `around` any existing method in the resource. Class-level callbacks are defined with `self.xxxxx`. These methods will be executed within the instance of the resource (i.e., in the same context of the original) and must be defined with the same parameter signature. For around methods, only blocks can be used, and to call the original (inner) one, one needs to yield.
|
7
11
|
* Introduced QueryMethods for resources (an includeable concern). QueryMethods expose handy querying methods (`.get`, `.get!`, `.all`, `.first` and `.last` ) which will reach into the underlying ORM (i.e., right now, only ActiveModelCompat is supported) to perform the desired loading of data (and subsequent wrapping of results in resource instances).
|
@@ -26,8 +26,19 @@ module Praxis
|
|
26
26
|
# NOTE2: we should just create a $ref here unless it's an anon mediatype...
|
27
27
|
return {} if type.is_a? SimpleMediaType # NOTE: skip if it's a SimpleMediaType?? ... is that correct?
|
28
28
|
|
29
|
-
the_schema = if type.anonymous? || !(type < Praxis::MediaType)
|
30
|
-
|
29
|
+
the_schema = if type.anonymous? || !(type < Praxis::MediaType)
|
30
|
+
# Avoid referencing custom/simple types (i.e. just MTs). As a corner case,
|
31
|
+
# dig into collections (which are anonymous) provided their member is not.
|
32
|
+
# This isn't germane to content attributes, but is necessary to ensure that we visit every
|
33
|
+
# non-anonymous type so that our emitted scheme covers the whole "surface area" of all
|
34
|
+
# actions.
|
35
|
+
underlying_type = type
|
36
|
+
underlying_type = underlying_type.member_type while underlying_type < Attributor::Collection
|
37
|
+
|
38
|
+
SchemaObject.new(info: type).dump_schema(
|
39
|
+
shallow: false,
|
40
|
+
allow_ref: type < Attributor::Collection && !underlying_type.anonymous?
|
41
|
+
)
|
31
42
|
else
|
32
43
|
SchemaObject.new(info: type).dump_schema(shallow: true, allow_ref: true)
|
33
44
|
end
|
data/lib/praxis/version.rb
CHANGED
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.23
|
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: 2022-
|
12
|
+
date: 2022-07-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|