apia 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/apia/dsls/route_group.rb +4 -0
- data/lib/apia/route_group.rb +3 -4
- data/lib/apia/schema/controller_schema_type.rb +4 -2
- data/lib/apia/schema/route_set_schema_type.rb +7 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 149ff24b39258aecaa9aaf738ff5d65c0d4ef24ccbc74844ae4ae12df5fe3e07
|
4
|
+
data.tar.gz: 5c6a4ea4c17f482e6b2614a44aab4e3bf7e9eccae7caacb1acdabe000f7f6838
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b85dd5fea1f2f566e687686883180d73c53f0623598a3552a8f2566ebe6ff0f8987c3446334b2947b83e355466886ffd092b25e132275a1b783c1b2488f0e1e
|
7
|
+
data.tar.gz: 7ee2812dc10ac8928bcb9674a18fee6ab6fae117becc9f43a864dc4d35ad7db6bbc95c3ea61d80bcb029e8feb3c463260c012c036d255df8b36205c1ee628831
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.2
|
data/lib/apia/route_group.rb
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Apia
|
4
|
-
class RouteGroup
|
4
|
+
class RouteGroup < Definition
|
5
5
|
|
6
|
-
attr_reader :id
|
7
6
|
attr_reader :parent
|
8
|
-
attr_accessor :name
|
9
|
-
attr_accessor :description
|
10
7
|
attr_accessor :default_controller
|
11
8
|
attr_reader :groups
|
12
9
|
|
10
|
+
# rubocop:disable Lint/MissingSuper
|
13
11
|
def initialize(id, parent)
|
14
12
|
@id = id
|
15
13
|
@parent = parent
|
16
14
|
@groups = []
|
17
15
|
end
|
16
|
+
# rubocop:enable Lint/MissingSuper
|
18
17
|
|
19
18
|
end
|
20
19
|
end
|
@@ -18,8 +18,10 @@ module Apia
|
|
18
18
|
end
|
19
19
|
field :endpoints, type: [ControllerEndpointSchemaType] do
|
20
20
|
backend do |c|
|
21
|
-
c.endpoints.
|
22
|
-
|
21
|
+
c.endpoints.each_with_object([]) do |(key, endpoint), array|
|
22
|
+
next unless endpoint.definition.schema?
|
23
|
+
|
24
|
+
array << {
|
23
25
|
name: key.to_s,
|
24
26
|
endpoint: endpoint.definition.id
|
25
27
|
}
|
@@ -10,10 +10,15 @@ module Apia
|
|
10
10
|
|
11
11
|
field :routes, [RouteSchemaType] do
|
12
12
|
backend do |o|
|
13
|
-
o.routes.select { |r| r.endpoint&.definition&.schema? }
|
13
|
+
o.routes.select { |r| r.group&.schema? && r.endpoint&.definition&.schema? }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
field :groups, [RouteGroupSchemaType] do
|
18
|
+
backend do |o|
|
19
|
+
o.groups.select { |g| g.schema? }
|
14
20
|
end
|
15
21
|
end
|
16
|
-
field :groups, [RouteGroupSchemaType]
|
17
22
|
|
18
23
|
end
|
19
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Cooke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -164,7 +164,8 @@ files:
|
|
164
164
|
- lib/apia/schema/scope_type.rb
|
165
165
|
- lib/apia/version.rb
|
166
166
|
homepage: https://github.com/krystal/apia
|
167
|
-
licenses:
|
167
|
+
licenses:
|
168
|
+
- MIT
|
168
169
|
metadata: {}
|
169
170
|
post_install_message:
|
170
171
|
rdoc_options: []
|