Files
openapi-generator/samples/client/petstore/ruby-faraday/bin/console
Dennis Kliban bcc3a9ecf7 Ruby client faraday (#3405)
* 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.
2019-08-01 11:08:34 +08:00

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