forked from loafle/openapi-generator-original
* WIP: add faraday support to Ruby client * update samples * bin/console * https only * ruby-faraday: Add a gemspec template for faraday * Add a test for ruby-faraday client options * Remove Gemfile.lock from ruby-client-faraday * Implement faraday client * Problem: can't use Faraday library for ruby clients Solution: add support for Faraday library This patch builds on the work started by @meganemura * Problem: Faraday is set as default library Solution: Make Typhoeus default This patch also updates the api_client template for Faraday to include query params with requests.
18 lines
406 B
Ruby
Executable File
18 lines
406 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
|
|
require "bundler/setup"
|
|
require "petstore"
|
|
|
|
# You can add fixtures and/or initialization code here to make experimenting
|
|
# with your gem easier. You can also use a different console, if you like.
|
|
api = Petstore::PetApi.new
|
|
api.api_client.config.debugging = true
|
|
pet = api.get_pet_by_id(545646631)
|
|
new_pet = pet.dup
|
|
new_pet.id = nil
|
|
|
|
res = api.add_pet(new_pet)
|
|
|
|
require "pry"
|
|
Pry.start
|