Merge pull request #3274 from wing328/fix_lumne

Remove security test from petstore-with-fake-endpoints-models-for-testing
This commit is contained in:
wing328 2016-07-02 11:48:45 +08:00 committed by GitHub
commit 3c9b172996
6 changed files with 37 additions and 25 deletions

View File

@ -561,26 +561,6 @@ paths:
description: User not found
/fake:
put:
tags:
- fake
summary: To test code injection */ =end
descriptions: To test code injection */ =end
operationId: testCodeInject */ =end
consumes:
- application/json
- "*/ =end'));(phpinfo('"
produces:
- application/json
- '*/ end'
parameters:
- name: test code inject */ =end
type: string
in: formData
description: To test code injection */ =end
responses:
'400':
description: To test code injection */ =end
get:
tags:
- fake

View File

@ -2,7 +2,7 @@
/**
* 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: \" \\
* 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
@ -129,4 +129,29 @@ class FakeApi extends Controller
return response('How about implementing testEndpointParameters as a POST method ?');
}
/**
* Operation testEnumQueryParameters
*
* To test enum query parameters.
*
*
* @return Http response
*/
public function testEnumQueryParameters()
{
$input = Request::all();
//path params validation
//not path params validation
$enumQueryString = $input['enumQueryString'];
$enumQueryInteger = $input['enumQueryInteger'];
$enumQueryDouble = $input['enumQueryDouble'];
return response('How about implementing testEnumQueryParameters as a GET method ?');
}
}

View File

@ -2,7 +2,7 @@
/**
* 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: \" \\
* 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

View File

@ -2,7 +2,7 @@
/**
* 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: \" \\
* 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

View File

@ -2,7 +2,7 @@
/**
* 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: \" \\
* 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

View File

@ -2,7 +2,7 @@
/**
* 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: \" \\
* 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
@ -40,6 +40,13 @@ $app->get('/', function () use ($app) {
* Output-Formats: [application/xml; charset=utf-8, application/json; charset=utf-8]
*/
$app->POST('/fake', 'FakeApi@testEndpointParameters');
/**
* GET testEnumQueryParameters
* Summary: To test enum query parameters
* Notes:
* Output-Formats: [application/json]
*/
$app->GET('/fake', 'FakeApi@testEnumQueryParameters');
/**
* POST addPet
* Summary: Add a new pet to the store