praxis 2.0.pre.34 → 2.0.pre.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/praxis/blueprint.rb +2 -0
- data/lib/praxis/docs/open_api/schema_object.rb +4 -1
- 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: 44bb802f0b2f4372668de58fa4026c7b89ceaf6b24e59021efe0ac66add311c1
|
4
|
+
data.tar.gz: ce0ad5cdaa52001ec451467e865e8fc3c53102984a2aec3256393a51683b668d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ba98db39d88023a2cf4b2573e83a87a018fa8e3c5959d757ca798f1b7d268b817cf8f2166ba3c04c1a60fc08804c025d31fb231ef2abea074bdadeccb74b6d0
|
7
|
+
data.tar.gz: 496473875489e1276471c09e5307c75502318153ab5de9d4debe0f0261e78fe3036bde69681323fd44431b5b849cd57c95213b697eef4804defa6596e4022bf0
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
## next
|
4
4
|
|
5
|
+
## 2.0.pre.35
|
6
|
+
- Fix reported nullability property in OpenAPI generation. Looking at null: true | false isn't enough. The system needs to look at the default null behavior from Attributor, to properly ascertain if the exclusion of a 'null' option means nullable or not. This PR fixes this.
|
7
|
+
|
5
8
|
## 2.0.pre.34
|
6
9
|
- Allow filtering, ordering and pagination to freely use any attributes (potentially deep ones) when no block for the definition is provided. When continuing to define the allowed fields from within the block, those would still be enforced.
|
7
10
|
- Added the ability to easily control the hiding/displayability of MediaType attributes in responses.
|
data/lib/praxis/blueprint.rb
CHANGED
@@ -374,6 +374,8 @@ module Praxis
|
|
374
374
|
|
375
375
|
# Delegates the json-schema methods to the underlying attribute/member_type
|
376
376
|
def self.as_json_schema(**args)
|
377
|
+
# TODO: Aren't we loosing the attribute options if we just call the type?? (e.g. description, etc)
|
378
|
+
# Also, we might want to add a 'title' for MTs, to be the class name (without prefixing) ...
|
377
379
|
@attribute.type.as_json_schema(args)
|
378
380
|
end
|
379
381
|
|
@@ -37,7 +37,10 @@ module Praxis
|
|
37
37
|
end
|
38
38
|
# Tag on OpenAPI specific requirements that aren't already added in the underlying JSON schema model
|
39
39
|
# Nullable: (it seems we need to ensure there is a null option to the enum, if there is one)
|
40
|
-
|
40
|
+
if base_options.key?(:null)
|
41
|
+
base_options[:nullable] = Attributor::Attribute::nullable_attribute?(base_options)
|
42
|
+
base_options.delete(:null)
|
43
|
+
end
|
41
44
|
|
42
45
|
# We will dump schemas for mediatypes by simply creating a reference to the components' section
|
43
46
|
if type < Attributor::Container && !(type < Praxis::Types::MultipartArray)
|
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.35
|
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-06-
|
12
|
+
date: 2023-06-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|