openapi-ruby 3.0.0 → 3.0.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6058ecc135b267a8e6ad7591b38df8c8e18c983fb961e0cad545e4169158ffb8
|
|
4
|
+
data.tar.gz: f3b392baaf7681017db2e477ede7a14f1d0442882d7c97caba1da17c6fc841e2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d28688dc74dc40701c1a1ad8a557b467c7c8b0f6537b6c2ae471123d056b5196128be20c13482f6d702db1685f32a76ac9e0b6bca569f5e664b036bfd3e683bf
|
|
7
|
+
data.tar.gz: c3ed7228acf6b39feec3c29946cdae5012d236429a877b42a066891a887461ee3bfd07dc6b5edd48409836e1acb573a271571d0db1d582f04d88a9d8ec9bd70a
|
|
@@ -63,7 +63,7 @@ module OpenapiRuby
|
|
|
63
63
|
expanded = File.expand_path(path)
|
|
64
64
|
next unless Dir.exist?(expanded)
|
|
65
65
|
|
|
66
|
-
Dir.glob(File.join(expanded, "**/")).each do |dir_path|
|
|
66
|
+
Dir.glob(File.join(expanded, "**/")).sort.each do |dir_path|
|
|
67
67
|
relative = dir_path.sub("#{expanded}/", "").chomp("/")
|
|
68
68
|
next if relative.empty?
|
|
69
69
|
|
|
@@ -111,6 +111,9 @@ module OpenapiRuby
|
|
|
111
111
|
end
|
|
112
112
|
result.delete(type_key) if result[type_key].empty?
|
|
113
113
|
end
|
|
114
|
+
# Sort component names alphabetically within each type for deterministic output
|
|
115
|
+
# regardless of file system ordering or load order.
|
|
116
|
+
result.each { |type_key, entries| result[type_key] = entries.sort_by { |k, _| k }.to_h }
|
|
114
117
|
result
|
|
115
118
|
end
|
|
116
119
|
end
|
data/lib/openapi_ruby/version.rb
CHANGED
data/lib/tasks/openapi_ruby.rake
CHANGED
|
@@ -44,7 +44,7 @@ def generate_with_rspec
|
|
|
44
44
|
# running any tests. Spec files pull in RSpec and the openapi_ruby
|
|
45
45
|
# adapter via their own require chains (e.g. require "openapi_helper").
|
|
46
46
|
pattern.split(",").each do |p|
|
|
47
|
-
Dir.glob(p.strip).each { |f| require File.expand_path(f) }
|
|
47
|
+
Dir.glob(p.strip).sort.each { |f| require File.expand_path(f) }
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
# Generate schemas from the registered contexts
|
|
@@ -61,7 +61,7 @@ def generate_with_minitest
|
|
|
61
61
|
# Load all test files to trigger api_path registrations.
|
|
62
62
|
# Minitest's api_path registers DSL contexts at class load time,
|
|
63
63
|
# so simply requiring the files is enough.
|
|
64
|
-
Dir.glob(pattern).each { |f| require File.expand_path(f) }
|
|
64
|
+
Dir.glob(pattern).sort.each { |f| require File.expand_path(f) }
|
|
65
65
|
|
|
66
66
|
# Generate schemas from the registered contexts
|
|
67
67
|
OpenapiRuby::Generator::SchemaWriter.generate_all!
|