forked from loafle/openapi-generator-original
Updating security samples for Perl. (#5292)
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
# NAME
|
||||
|
||||
WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore */ ' \"
|
||||
WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
# VERSION
|
||||
|
||||
Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
|
||||
- API version: 1.0.0 */ ' \"
|
||||
- API version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
- Package version: 1.0.0
|
||||
- Build date: 2016-06-28T16:32:36.006+08:00
|
||||
- Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||
- Build package: io.swagger.codegen.languages.PerlClientCodegen
|
||||
|
||||
## A note on Moose
|
||||
|
||||
@@ -248,38 +247,40 @@ use WWW::SwaggerClient::Object::ModelReturn;
|
||||
|
||||
# for displaying the API response data
|
||||
use Data::Dumper;
|
||||
use WWW::SwaggerClient::Configuration;
|
||||
use WWW::SwaggerClient::;
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::FakeApi->new();
|
||||
my $test code inject */ ' " =end = 'test code inject */ ' " =end_example'; # string | To test code injection */ ' \"
|
||||
my $test code inject */ ' " =end __ \r\n \n \r = 'test code inject */ ' " =end __ \r\n \n \r_example'; # string | To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
eval {
|
||||
$api_instance->test_code_inject____end(test code inject */ ' " =end => $test code inject */ ' " =end);
|
||||
$api_instance->test_code_inject____end__rn_n_r(test code inject */ ' " =end __ \r\n \n \r => $test code inject */ ' " =end __ \r\n \n \r);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling FakeApi->test_code_inject____end: $@\n";
|
||||
warn "Exception when calling FakeApi->test_code_inject____end__rn_n_r: $@\n";
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
# DOCUMENTATION FOR API ENDPOINTS
|
||||
|
||||
All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 */ ' " =end*
|
||||
All URIs are relative to *https://petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*FakeApi* | [**test_code_inject____end**](docs/FakeApi.md#test_code_inject____end) | **PUT** /fake | To test code injection */ ' \"
|
||||
*FakeApi* | [**test_code_inject____end__rn_n_r**](docs/FakeApi.md#test_code_inject____end__rn_n_r) | **PUT** /fake | To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
|
||||
# DOCUMENTATION FOR MODELS
|
||||
- [WWW::SwaggerClient::Object::ModelReturn](docs/ModelReturn.md)
|
||||
|
||||
|
||||
# DOCUMENTATION FOR AUTHORIATION
|
||||
# DOCUMENTATION FOR AUTHORIZATION
|
||||
|
||||
## api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key */ ' " =end
|
||||
- **API key parameter name**: api_key */ ' " =end -- \r\n \n \r
|
||||
- **Location**: HTTP header
|
||||
|
||||
## petstore_auth
|
||||
@@ -288,8 +289,6 @@ Class | Method | HTTP request | Description
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- **write:pets**: modify pets in your account */ ' " =end
|
||||
- **read:pets**: read your pets */ ' " =end
|
||||
|
||||
|
||||
- **write:pets**: modify pets in your account */ ' \" =_end -- \\r\\n \\n \\r
|
||||
- **read:pets**: read your pets */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
# NAME
|
||||
|
||||
Something::Deep::Role - a Moose role for the Swagger Petstore */ ' \"
|
||||
Something::Deep::Role - a Moose role for the Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
# VERSION
|
||||
|
||||
Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
|
||||
- API version: 1.0.0 */ ' \"
|
||||
- API version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
- Package version: 1.0.0
|
||||
- Build date: 2016-06-28T16:32:37.043+08:00
|
||||
- Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||
- Build package: io.swagger.codegen.languages.PerlClientCodegen
|
||||
|
||||
## A note on Moose
|
||||
|
||||
@@ -248,38 +247,40 @@ use Something::Deep::Object::ModelReturn;
|
||||
|
||||
# for displaying the API response data
|
||||
use Data::Dumper;
|
||||
use Something::Deep::Configuration;
|
||||
use Something::Deep::;
|
||||
|
||||
my $api_instance = Something::Deep::FakeApi->new();
|
||||
my $test code inject */ ' " =end = 'test code inject */ ' " =end_example'; # string | To test code injection */ ' \"
|
||||
my $test code inject */ ' " =end __ \r\n \n \r = 'test code inject */ ' " =end __ \r\n \n \r_example'; # string | To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
eval {
|
||||
$api_instance->test_code_inject____end(test code inject */ ' " =end => $test code inject */ ' " =end);
|
||||
$api_instance->test_code_inject____end__rn_n_r(test code inject */ ' " =end __ \r\n \n \r => $test code inject */ ' " =end __ \r\n \n \r);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling FakeApi->test_code_inject____end: $@\n";
|
||||
warn "Exception when calling FakeApi->test_code_inject____end__rn_n_r: $@\n";
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
# DOCUMENTATION FOR API ENDPOINTS
|
||||
|
||||
All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 */ ' " =end*
|
||||
All URIs are relative to *https://petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*FakeApi* | [**test_code_inject____end**](docs/FakeApi.md#test_code_inject____end) | **PUT** /fake | To test code injection */ ' \"
|
||||
*FakeApi* | [**test_code_inject____end__rn_n_r**](docs/FakeApi.md#test_code_inject____end__rn_n_r) | **PUT** /fake | To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
|
||||
# DOCUMENTATION FOR MODELS
|
||||
- [Something::Deep::Object::ModelReturn](docs/ModelReturn.md)
|
||||
|
||||
|
||||
# DOCUMENTATION FOR AUTHORIATION
|
||||
# DOCUMENTATION FOR AUTHORIZATION
|
||||
|
||||
## api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key */ ' " =end
|
||||
- **API key parameter name**: api_key */ ' " =end -- \r\n \n \r
|
||||
- **Location**: HTTP header
|
||||
|
||||
## petstore_auth
|
||||
@@ -288,8 +289,6 @@ Class | Method | HTTP request | Description
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- **write:pets**: modify pets in your account */ ' " =end
|
||||
- **read:pets**: read your pets */ ' " =end
|
||||
|
||||
|
||||
- **write:pets**: modify pets in your account */ ' \" =_end -- \\r\\n \\n \\r
|
||||
- **read:pets**: read your pets */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
|
||||
@@ -5,30 +5,32 @@
|
||||
use Something::Deep::Object::FakeApi;
|
||||
```
|
||||
|
||||
All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 */ ' " =end*
|
||||
All URIs are relative to *https://petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**test_code_inject____end**](FakeApi.md#test_code_inject____end) | **PUT** /fake | To test code injection */ ' \"
|
||||
[**test_code_inject____end__rn_n_r**](FakeApi.md#test_code_inject____end__rn_n_r) | **PUT** /fake | To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
|
||||
# **test_code_inject____end**
|
||||
> test_code_inject____end(test code inject */ ' " =end => $test code inject */ ' " =end)
|
||||
# **test_code_inject____end__rn_n_r**
|
||||
> test_code_inject____end__rn_n_r(test code inject */ ' " =end __ \r\n \n \r => $test code inject */ ' " =end __ \r\n \n \r)
|
||||
|
||||
To test code injection */ ' \"
|
||||
To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
### Example
|
||||
```perl
|
||||
use Data::Dumper;
|
||||
use Something::Deep::Configuration;
|
||||
use Something::Deep::FakeApi;
|
||||
|
||||
my $api_instance = Something::Deep::FakeApi->new();
|
||||
my $test code inject */ ' " =end = 'test code inject */ ' " =end_example'; # string | To test code injection */ ' \"
|
||||
my $test code inject */ ' " =end __ \r\n \n \r = 'test code inject */ ' " =end __ \r\n \n \r_example'; # string | To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
eval {
|
||||
$api_instance->test_code_inject____end(test code inject */ ' " =end => $test code inject */ ' " =end);
|
||||
$api_instance->test_code_inject____end__rn_n_r(test code inject */ ' " =end __ \r\n \n \r => $test code inject */ ' " =end __ \r\n \n \r);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling FakeApi->test_code_inject____end: $@\n";
|
||||
warn "Exception when calling FakeApi->test_code_inject____end__rn_n_r: $@\n";
|
||||
}
|
||||
```
|
||||
|
||||
@@ -36,7 +38,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**test code inject */ ' " =end** | **string**| To test code injection */ ' \" | [optional]
|
||||
**test code inject */ ' " =end __ \r\n \n \r** | **string**| To test code injection */ ' \" =_end -- \\r\\n \\n \\r | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -48,8 +50,8 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, */ " =end
|
||||
- **Accept**: application/json, */ " =end
|
||||
- **Content-Type**: application/json, */ \" =_end --
|
||||
- **Accept**: application/json, */ \" =_end --
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use Something::Deep::Object::ModelReturn;
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**return** | **int** | property description */ ' \" | [optional]
|
||||
**return** | **int** | property description */ ' \" =_end -- \\r\\n \\n \\r | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -58,7 +46,7 @@ sub _new_instance
|
||||
my $class = shift;
|
||||
my (%args) = (
|
||||
'ua' => LWP::UserAgent->new,
|
||||
'base_url' => 'https://petstore.swagger.io */ ' " =end/v2 */ ' " =end',
|
||||
'base_url' => 'https://petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
@_
|
||||
);
|
||||
|
||||
@@ -352,9 +340,9 @@ sub update_params_for_auth {
|
||||
}
|
||||
elsif ($auth eq 'api_key') {
|
||||
|
||||
my $api_key = $self->get_api_key_with_prefix('api_key */ ' " =end');
|
||||
my $api_key = $self->get_api_key_with_prefix('api_key */ ' " =end -- \r\n \n \r');
|
||||
if ($api_key) {
|
||||
$header_params->{'api_key */ ' " =end'} = $api_key;
|
||||
$header_params->{'api_key */ ' " =end -- \r\n \n \r'} = $api_key;
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'petstore_auth') {
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -42,7 +30,7 @@ use constant VERSION => '1.0.0';
|
||||
|
||||
# class/static variables
|
||||
our $http_timeout = 180;
|
||||
our $http_user_agent = 'Perl-Swagger';
|
||||
our $http_user_agent = 'Swagger-Codegen/1.0.0/perl';
|
||||
|
||||
# authentication setting
|
||||
our $api_key = {};
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -64,33 +52,32 @@ sub new {
|
||||
|
||||
|
||||
#
|
||||
# test_code_inject____end
|
||||
# test_code_inject____end__rn_n_r
|
||||
#
|
||||
# To test code injection */ ' \"
|
||||
# To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
#
|
||||
# @param string $test code inject */ ' " =end To test code injection */ ' \" (optional)
|
||||
# @param string $test code inject */ ' " =end __ \r\n \n \r To test code injection */ ' \" =_end -- \\r\\n \\n \\r (optional)
|
||||
{
|
||||
my $params = {
|
||||
'test code inject */ ' " =end' => {
|
||||
'test code inject */ ' " =end __ \r\n \n \r' => {
|
||||
data_type => 'string',
|
||||
description => 'To test code injection */ ' \" ',
|
||||
description => 'To test code injection */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
required => '0',
|
||||
},
|
||||
};
|
||||
__PACKAGE__->method_documentation->{ 'test_code_inject____end' } = {
|
||||
summary => 'To test code injection */ ' \" ',
|
||||
__PACKAGE__->method_documentation->{ 'test_code_inject____end__rn_n_r' } = {
|
||||
summary => 'To test code injection */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
params => $params,
|
||||
returns => undef,
|
||||
};
|
||||
}
|
||||
# @return void
|
||||
#
|
||||
sub test_code_inject____end {
|
||||
sub test_code_inject____end__rn_n_r {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# parse inputs
|
||||
my $_resource_path = '/fake';
|
||||
$_resource_path =~ s/{format}/json/; # default format to json
|
||||
|
||||
my $_method = 'PUT';
|
||||
my $query_params = {};
|
||||
@@ -98,15 +85,15 @@ sub test_code_inject____end {
|
||||
my $form_params = {};
|
||||
|
||||
# 'Accept' and 'Content-Type' header
|
||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', '*/ " =end');
|
||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', '*/ \" =_end -- ');
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', '*/ " =end');
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', '*/ \" =_end -- ');
|
||||
|
||||
# form params
|
||||
if ( exists $args{'test code inject */ ' " =end'} ) {
|
||||
$form_params->{'test code inject */ ' " =end'} = $self->{api_client}->to_form_value($args{'test code inject */ ' " =end'});
|
||||
if ( exists $args{'test code inject */ ' " =end __ \r\n \n \r'} ) {
|
||||
$form_params->{'test code inject */ ' " =end -- \r\n \n \r'} = $self->{api_client}->to_form_value($args{'test code inject */ ' " =end __ \r\n \n \r'});
|
||||
}
|
||||
|
||||
my $_body_data;
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -46,7 +34,7 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
|
||||
|
||||
#
|
||||
#Model for testing reserved words */ ' \"
|
||||
#Model for testing reserved words */ ' \" =_end -- \\r\\n \\n \\r
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
@@ -54,26 +42,14 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -160,7 +136,7 @@ sub _deserialize {
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => 'Model for testing reserved words */ ' \" ',
|
||||
__PACKAGE__->class_documentation({description => 'Model for testing reserved words */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
class => 'ModelReturn',
|
||||
required => [], # TODO
|
||||
} );
|
||||
@@ -169,7 +145,7 @@ __PACKAGE__->method_documentation({
|
||||
'return' => {
|
||||
datatype => 'int',
|
||||
base_name => 'return',
|
||||
description => 'property description */ ' \" ',
|
||||
description => 'property description */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -66,10 +54,9 @@ has _cfg => ( is => 'ro',
|
||||
has version_info => ( is => 'ro',
|
||||
isa => 'HashRef',
|
||||
default => sub { {
|
||||
app_name => 'Swagger Petstore */ ' \" ',
|
||||
app_version => '1.0.0 */ ' \" ',
|
||||
generated_date => '2016-06-28T16:32:37.043+08:00',
|
||||
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
|
||||
app_name => 'Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
app_version => '1.0.0 */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
generator_class => 'io.swagger.codegen.languages.PerlClientCodegen',
|
||||
} },
|
||||
documentation => 'Information about the application version and the codegen codebase version'
|
||||
);
|
||||
@@ -124,19 +111,16 @@ sub _build_af {
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Something::Deep::Role - a Moose role for the Swagger Petstore */ ' \"
|
||||
Something::Deep::Role - a Moose role for the Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
=head2 Swagger Petstore */ ' \" version: 1.0.0 */ ' \"
|
||||
=head2 Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
Automatically generated by the Perl Swagger Codegen project:
|
||||
|
||||
=over 4
|
||||
|
||||
=item Build date: 2016-06-28T16:32:37.043+08:00
|
||||
|
||||
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||
=item Build package: io.swagger.codegen.languages.PerlClientCodegen
|
||||
|
||||
=item Codegen version:
|
||||
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
@@ -5,30 +5,32 @@
|
||||
use WWW::SwaggerClient::Object::FakeApi;
|
||||
```
|
||||
|
||||
All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 */ ' " =end*
|
||||
All URIs are relative to *https://petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**test_code_inject____end**](FakeApi.md#test_code_inject____end) | **PUT** /fake | To test code injection */ ' \"
|
||||
[**test_code_inject____end__rn_n_r**](FakeApi.md#test_code_inject____end__rn_n_r) | **PUT** /fake | To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
|
||||
# **test_code_inject____end**
|
||||
> test_code_inject____end(test code inject */ ' " =end => $test code inject */ ' " =end)
|
||||
# **test_code_inject____end__rn_n_r**
|
||||
> test_code_inject____end__rn_n_r(test code inject */ ' " =end __ \r\n \n \r => $test code inject */ ' " =end __ \r\n \n \r)
|
||||
|
||||
To test code injection */ ' \"
|
||||
To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
### Example
|
||||
```perl
|
||||
use Data::Dumper;
|
||||
use WWW::SwaggerClient::Configuration;
|
||||
use WWW::SwaggerClient::FakeApi;
|
||||
|
||||
my $api_instance = WWW::SwaggerClient::FakeApi->new();
|
||||
my $test code inject */ ' " =end = 'test code inject */ ' " =end_example'; # string | To test code injection */ ' \"
|
||||
my $test code inject */ ' " =end __ \r\n \n \r = 'test code inject */ ' " =end __ \r\n \n \r_example'; # string | To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
eval {
|
||||
$api_instance->test_code_inject____end(test code inject */ ' " =end => $test code inject */ ' " =end);
|
||||
$api_instance->test_code_inject____end__rn_n_r(test code inject */ ' " =end __ \r\n \n \r => $test code inject */ ' " =end __ \r\n \n \r);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling FakeApi->test_code_inject____end: $@\n";
|
||||
warn "Exception when calling FakeApi->test_code_inject____end__rn_n_r: $@\n";
|
||||
}
|
||||
```
|
||||
|
||||
@@ -36,7 +38,7 @@ if ($@) {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**test code inject */ ' " =end** | **string**| To test code injection */ ' \" | [optional]
|
||||
**test code inject */ ' " =end __ \r\n \n \r** | **string**| To test code injection */ ' \" =_end -- \\r\\n \\n \\r | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -48,8 +50,8 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, */ " =end
|
||||
- **Accept**: application/json, */ " =end
|
||||
- **Content-Type**: application/json, */ \" =_end --
|
||||
- **Accept**: application/json, */ \" =_end --
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use WWW::SwaggerClient::Object::ModelReturn;
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**return** | **int** | property description */ ' \" | [optional]
|
||||
**return** | **int** | property description */ ' \" =_end -- \\r\\n \\n \\r | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -58,7 +46,7 @@ sub _new_instance
|
||||
my $class = shift;
|
||||
my (%args) = (
|
||||
'ua' => LWP::UserAgent->new,
|
||||
'base_url' => 'https://petstore.swagger.io */ ' " =end/v2 */ ' " =end',
|
||||
'base_url' => 'https://petstore.swagger.io */ ' \" =_end -- \\r\\n \\n \\r/v2 */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
@_
|
||||
);
|
||||
|
||||
@@ -352,9 +340,9 @@ sub update_params_for_auth {
|
||||
}
|
||||
elsif ($auth eq 'api_key') {
|
||||
|
||||
my $api_key = $self->get_api_key_with_prefix('api_key */ ' " =end');
|
||||
my $api_key = $self->get_api_key_with_prefix('api_key */ ' " =end -- \r\n \n \r');
|
||||
if ($api_key) {
|
||||
$header_params->{'api_key */ ' " =end'} = $api_key;
|
||||
$header_params->{'api_key */ ' " =end -- \r\n \n \r'} = $api_key;
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'petstore_auth') {
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -42,7 +30,7 @@ use constant VERSION => '1.0.0';
|
||||
|
||||
# class/static variables
|
||||
our $http_timeout = 180;
|
||||
our $http_user_agent = 'Perl-Swagger';
|
||||
our $http_user_agent = 'Swagger-Codegen/1.0.0/perl';
|
||||
|
||||
# authentication setting
|
||||
our $api_key = {};
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -64,33 +52,32 @@ sub new {
|
||||
|
||||
|
||||
#
|
||||
# test_code_inject____end
|
||||
# test_code_inject____end__rn_n_r
|
||||
#
|
||||
# To test code injection */ ' \"
|
||||
# To test code injection */ ' \" =_end -- \\r\\n \\n \\r
|
||||
#
|
||||
# @param string $test code inject */ ' " =end To test code injection */ ' \" (optional)
|
||||
# @param string $test code inject */ ' " =end __ \r\n \n \r To test code injection */ ' \" =_end -- \\r\\n \\n \\r (optional)
|
||||
{
|
||||
my $params = {
|
||||
'test code inject */ ' " =end' => {
|
||||
'test code inject */ ' " =end __ \r\n \n \r' => {
|
||||
data_type => 'string',
|
||||
description => 'To test code injection */ ' \" ',
|
||||
description => 'To test code injection */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
required => '0',
|
||||
},
|
||||
};
|
||||
__PACKAGE__->method_documentation->{ 'test_code_inject____end' } = {
|
||||
summary => 'To test code injection */ ' \" ',
|
||||
__PACKAGE__->method_documentation->{ 'test_code_inject____end__rn_n_r' } = {
|
||||
summary => 'To test code injection */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
params => $params,
|
||||
returns => undef,
|
||||
};
|
||||
}
|
||||
# @return void
|
||||
#
|
||||
sub test_code_inject____end {
|
||||
sub test_code_inject____end__rn_n_r {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
# parse inputs
|
||||
my $_resource_path = '/fake';
|
||||
$_resource_path =~ s/{format}/json/; # default format to json
|
||||
|
||||
my $_method = 'PUT';
|
||||
my $query_params = {};
|
||||
@@ -98,15 +85,15 @@ sub test_code_inject____end {
|
||||
my $form_params = {};
|
||||
|
||||
# 'Accept' and 'Content-Type' header
|
||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', '*/ " =end');
|
||||
my $_header_accept = $self->{api_client}->select_header_accept('application/json', '*/ \" =_end -- ');
|
||||
if ($_header_accept) {
|
||||
$header_params->{'Accept'} = $_header_accept;
|
||||
}
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', '*/ " =end');
|
||||
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json', '*/ \" =_end -- ');
|
||||
|
||||
# form params
|
||||
if ( exists $args{'test code inject */ ' " =end'} ) {
|
||||
$form_params->{'test code inject */ ' " =end'} = $self->{api_client}->to_form_value($args{'test code inject */ ' " =end'});
|
||||
if ( exists $args{'test code inject */ ' " =end __ \r\n \n \r'} ) {
|
||||
$form_params->{'test code inject */ ' " =end -- \r\n \n \r'} = $self->{api_client}->to_form_value($args{'test code inject */ ' " =end __ \r\n \n \r'});
|
||||
}
|
||||
|
||||
my $_body_data;
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -46,7 +34,7 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
|
||||
|
||||
#
|
||||
#Model for testing reserved words */ ' \"
|
||||
#Model for testing reserved words */ ' \" =_end -- \\r\\n \\n \\r
|
||||
#
|
||||
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
# REF: https://github.com/swagger-api/swagger-codegen
|
||||
@@ -54,26 +42,14 @@ use base ("Class::Accessor", "Class::Data::Inheritable");
|
||||
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -160,7 +136,7 @@ sub _deserialize {
|
||||
|
||||
|
||||
|
||||
__PACKAGE__->class_documentation({description => 'Model for testing reserved words */ ' \" ',
|
||||
__PACKAGE__->class_documentation({description => 'Model for testing reserved words */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
class => 'ModelReturn',
|
||||
required => [], # TODO
|
||||
} );
|
||||
@@ -169,7 +145,7 @@ __PACKAGE__->method_documentation({
|
||||
'return' => {
|
||||
datatype => 'int',
|
||||
base_name => 'return',
|
||||
description => 'property description */ ' \" ',
|
||||
description => 'property description */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
format => '',
|
||||
read_only => '',
|
||||
},
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
@@ -66,10 +54,9 @@ has _cfg => ( is => 'ro',
|
||||
has version_info => ( is => 'ro',
|
||||
isa => 'HashRef',
|
||||
default => sub { {
|
||||
app_name => 'Swagger Petstore */ ' \" ',
|
||||
app_version => '1.0.0 */ ' \" ',
|
||||
generated_date => '2016-06-28T16:32:36.006+08:00',
|
||||
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
|
||||
app_name => 'Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
app_version => '1.0.0 */ ' \" =_end -- \\r\\n \\n \\r',
|
||||
generator_class => 'io.swagger.codegen.languages.PerlClientCodegen',
|
||||
} },
|
||||
documentation => 'Information about the application version and the codegen codebase version'
|
||||
);
|
||||
@@ -124,19 +111,16 @@ sub _build_af {
|
||||
|
||||
=head1 NAME
|
||||
|
||||
WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore */ ' \"
|
||||
WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
=head2 Swagger Petstore */ ' \" version: 1.0.0 */ ' \"
|
||||
=head2 Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
Automatically generated by the Perl Swagger Codegen project:
|
||||
|
||||
=over 4
|
||||
|
||||
=item Build date: 2016-06-28T16:32:36.006+08:00
|
||||
|
||||
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||
=item Build package: io.swagger.codegen.languages.PerlClientCodegen
|
||||
|
||||
=item Codegen version:
|
||||
|
||||
|
||||
@@ -1,25 +1,13 @@
|
||||
=begin comment
|
||||
|
||||
Swagger Petstore */ ' \"
|
||||
Swagger Petstore */ ' \" =_end -- \\r\\n \\n \\r
|
||||
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \"
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ */ ' \" =_end --
|
||||
|
||||
OpenAPI spec version: 1.0.0 */ ' \"
|
||||
Contact: apiteam@swagger.io */ ' \"
|
||||
OpenAPI spec version: 1.0.0 */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Contact: apiteam@swagger.io */ ' \" =_end -- \\r\\n \\n \\r
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
=end comment
|
||||
|
||||
=cut
|
||||
|
||||
Reference in New Issue
Block a user