forked from loafle/openapi-generator-original
Fix example code in README.md of Ruby petstore sample
This commit is contained in:
parent
87904e8b69
commit
b140f1f152
@ -42,7 +42,7 @@ ruby -Ilib script.rb
|
|||||||
```ruby
|
```ruby
|
||||||
require 'swagger-client'
|
require 'swagger-client'
|
||||||
|
|
||||||
Swagger.configure do |config|
|
SwaggerClient::Swagger.configure do |config|
|
||||||
config.api_key = 'special-key'
|
config.api_key = 'special-key'
|
||||||
config.host = 'petstore.swagger.io'
|
config.host = 'petstore.swagger.io'
|
||||||
config.base_path = '/v2'
|
config.base_path = '/v2'
|
||||||
@ -52,6 +52,6 @@ end
|
|||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
pet = PetApi.getPetById(5)
|
pet = SwaggerClient::PetApi.get_pet_by_id(5)
|
||||||
puts pet.to_body
|
puts pet.to_body
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user