forked from loafle/openapi-generator-original
* [CLI] Initial implementation for batch generation Allows for generating multiple outputs via config. Just specify multiple config files on command line. Intent for this is to reduce CI times to generate outputs as well as to reduce time for users to run ensure-up-to-date to meet PR standards. Example command: openapi-generator batch --includes-base-dir `pwd` --fail-fast -- bin/ci/* --- As part of this implementation, the batch command support a customized JSON key, `!include`. If this key's value refers to an existing file, that file's contents are "unwrapped" into the config during deserialization. This allows us to easily point to the same configs used by our sample scripts without modifying the CLI generate task's switches or assumptions. * Allow for path-relative outputs * Add batch JSON objects * Include INFO log about threads used and includes/root * Ensure GlobalSettings.reset() * Improved thread-safety of ModelUtils
43 lines
1.2 KiB
Ruby
43 lines
1.2 KiB
Ruby
=begin
|
|
#OpenAPI Petstore
|
|
|
|
#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
|
|
|
The version of the OpenAPI document: 1.0.0
|
|
|
|
Generated by: https://openapi-generator.tech
|
|
OpenAPI Generator version: 4.1.3-SNAPSHOT
|
|
|
|
=end
|
|
|
|
require 'spec_helper'
|
|
|
|
describe Petstore::Configuration do
|
|
let(:config) { Petstore::Configuration.default }
|
|
|
|
before(:each) do
|
|
# uncomment below to setup host and base_path
|
|
# require 'URI'
|
|
# uri = URI.parse("http://petstore.swagger.io:80/v2")
|
|
# Petstore.configure do |c|
|
|
# c.host = uri.host
|
|
# c.base_path = uri.path
|
|
# end
|
|
end
|
|
|
|
describe '#base_url' do
|
|
it 'should have the default value' do
|
|
# uncomment below to test default value of the base path
|
|
# expect(config.base_url).to eq("http://petstore.swagger.io:80/v2")
|
|
end
|
|
|
|
it 'should remove trailing slashes' do
|
|
[nil, '', '/', '//'].each do |base_path|
|
|
config.base_path = base_path
|
|
# uncomment below to test trailing slashes
|
|
# expect(config.base_url).to eq("http://petstore.swagger.io:80/v2")
|
|
end
|
|
end
|
|
end
|
|
end
|