forked from loafle/openapi-generator-original
* [ruby] Improve ruby client examples * samples * quote fixes * Keep enum value * better string type handling * fix failing tests * add space after comment * update samples * use Time Co-authored-by: William Cheng <wing328hk@gmail.com>
1.2 KiB
1.2 KiB
Petstore::DefaultApi
All URIs are relative to http://petstore.swagger.io:80/v2
Method | HTTP request | Description |
---|---|---|
foo_get | GET /foo |
foo_get
foo_get
Examples
require 'time'
require 'petstore'
api_instance = Petstore::DefaultApi.new
begin
result = api_instance.foo_get
p result
rescue Petstore::ApiError => e
puts "Error when calling DefaultApi->foo_get: #{e}"
end
Using the foo_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> foo_get_with_http_info
begin
data, status_code, headers = api_instance.foo_get_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <InlineResponseDefault>
rescue Petstore::ApiError => e
puts "Error when calling DefaultApi->foo_get_with_http_info: #{e}"
end
Parameters
This endpoint does not need any parameter.
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json