mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-06-01 00:00:30 -04:00
Merge pull request #520 from stripe/brandur-update-openapi-conventions
Update some OpenAPI repository conventions
This commit is contained in:
commit
cb841602fa
4
Rakefile
4
Rakefile
@ -18,9 +18,9 @@ desc "Update OpenAPI specification"
|
||||
task :update_openapi do
|
||||
require "faraday"
|
||||
|
||||
["fixtures.json", "fixtures.yaml", "spec.json", "spec.yaml"].map { |file|
|
||||
["fixtures.json", "fixtures.yaml", "spec2.json", "spec2.yaml"].map { |file|
|
||||
Thread.new do
|
||||
fetch_file "https://raw.githubusercontent.com/stripe/openapi/master/spec/#{file}",
|
||||
fetch_file "https://raw.githubusercontent.com/stripe/openapi/master/openapi/#{file}",
|
||||
File.expand_path("../openapi/#{file}", __FILE__)
|
||||
end
|
||||
}.map { |t| t.join }
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@
|
||||
class APIFixtures
|
||||
def initialize
|
||||
@fixtures = ::JSON.parse(File.read("#{PROJECT_ROOT}/openapi/fixtures.json"),
|
||||
symbolize_names: true)
|
||||
symbolize_names: true)[:resources]
|
||||
freeze_recursively(@fixtures)
|
||||
end
|
||||
|
||||
|
@ -98,7 +98,7 @@ module APIStubHelpers
|
||||
# Finds the latest OpenAPI specification in ROOT/openapi/ and parses it for
|
||||
# use with Committee.
|
||||
def self.initialize_spec
|
||||
spec_data = ::JSON.parse(File.read("#{PROJECT_ROOT}/openapi/spec.json"))
|
||||
spec_data = ::JSON.parse(File.read("#{PROJECT_ROOT}/openapi/spec2.json"))
|
||||
|
||||
driver = Committee::Drivers::OpenAPI2.new
|
||||
driver.parse(spec_data)
|
||||
|
Loading…
x
Reference in New Issue
Block a user