diff --git a/samples/client/petstore/ruby/docs/DefaultApi.md b/samples/client/petstore/ruby/docs/DefaultApi.md deleted file mode 100644 index 0790d1278a1..00000000000 --- a/samples/client/petstore/ruby/docs/DefaultApi.md +++ /dev/null @@ -1,93 +0,0 @@ -# Petstore::DefaultApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_xml_features**](DefaultApi.md#get_xml_features) | **GET** /fake/xmlFeatures | Get some XML -[**post_xml_features**](DefaultApi.md#post_xml_features) | **POST** /fake/xmlFeatures | Post some xml - - -# **get_xml_features** -> XmlObject get_xml_features - -Get some XML - -### Example -```ruby -# load the gem -require 'petstore' - -api_instance = Petstore::DefaultApi.new - -begin - #Get some XML - result = api_instance.get_xml_features - p result -rescue Petstore::ApiError => e - puts "Exception when calling DefaultApi->get_xml_features: #{e}" -end -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**XmlObject**](XmlObject.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/xml - - **Accept**: application/xml - - - -# **post_xml_features** -> post_xml_features(xml_object) - -Post some xml - -### Example -```ruby -# load the gem -require 'petstore' - -api_instance = Petstore::DefaultApi.new - -xml_object = Petstore::XmlObject.new # XmlObject | - - -begin - #Post some xml - api_instance.post_xml_features(xml_object) -rescue Petstore::ApiError => e - puts "Exception when calling DefaultApi->post_xml_features: #{e}" -end -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xml_object** | [**XmlObject**](XmlObject.md)| | - -### Return type - -nil (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/xml - - **Accept**: application/xml - - - diff --git a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb deleted file mode 100644 index 1d542fe7548..00000000000 --- a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb +++ /dev/null @@ -1,126 +0,0 @@ -=begin -#Swagger 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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.3.0-SNAPSHOT - -=end - -require "uri" - -module Petstore - class DefaultApi - attr_accessor :api_client - - def initialize(api_client = ApiClient.default) - @api_client = api_client - end - - # Get some XML - # - # @param [Hash] opts the optional parameters - # @return [XmlObject] - def get_xml_features(opts = {}) - data, _status_code, _headers = get_xml_features_with_http_info(opts) - return data - end - - # Get some XML - # - # @param [Hash] opts the optional parameters - # @return [Array<(XmlObject, Fixnum, Hash)>] XmlObject data, response status code and response headers - def get_xml_features_with_http_info(opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: DefaultApi.get_xml_features ..." - end - # resource path - local_var_path = "/fake/xmlFeatures" - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/xml']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/xml']) - - # form parameters - form_params = {} - - # http body (model) - post_body = nil - auth_names = [] - data, status_code, headers = @api_client.call_api(:GET, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => 'XmlObject') - if @api_client.config.debugging - @api_client.config.logger.debug "API called: DefaultApi#get_xml_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Post some xml - # - # @param xml_object - # @param [Hash] opts the optional parameters - # @return [nil] - def post_xml_features(xml_object, opts = {}) - post_xml_features_with_http_info(xml_object, opts) - return nil - end - - # Post some xml - # - # @param xml_object - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def post_xml_features_with_http_info(xml_object, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: DefaultApi.post_xml_features ..." - end - # verify the required parameter 'xml_object' is set - if @api_client.config.client_side_validation && xml_object.nil? - fail ArgumentError, "Missing the required parameter 'xml_object' when calling DefaultApi.post_xml_features" - end - # resource path - local_var_path = "/fake/xmlFeatures" - - # query parameters - query_params = {} - - # header parameters - header_params = {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/xml']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/xml']) - - # form parameters - form_params = {} - - # http body (model) - post_body = @api_client.object_to_http_body(xml_object) - auth_names = [] - data, status_code, headers = @api_client.call_api(:POST, local_var_path, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: DefaultApi#post_xml_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/samples/client/petstore/ruby/spec/api/default_api_spec.rb b/samples/client/petstore/ruby/spec/api/default_api_spec.rb deleted file mode 100644 index 714609b9900..00000000000 --- a/samples/client/petstore/ruby/spec/api/default_api_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -=begin -#Swagger 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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git -Swagger Codegen version: 2.3.0-SNAPSHOT - -=end - -require 'spec_helper' -require 'json' - -# Unit tests for Petstore::DefaultApi -# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) -# Please update as you see appropriate -describe 'DefaultApi' do - before do - # run before each test - @instance = Petstore::DefaultApi.new - end - - after do - # run after each test - end - - describe 'test an instance of DefaultApi' do - it 'should create an instance of DefaultApi' do - expect(@instance).to be_instance_of(Petstore::DefaultApi) - end - end - - # unit tests for get_xml_features - # Get some XML - # - # @param [Hash] opts the optional parameters - # @return [XmlObject] - describe 'get_xml_features test' do - it "should work" do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for post_xml_features - # Post some xml - # - # @param xml_object - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'post_xml_features test' do - it "should work" do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end