mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
Merge pull request #3274 from wing328/fix_lumne
Remove security test from petstore-with-fake-endpoints-models-for-testing
This commit is contained in:
commit
3c9b172996
@ -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
|
||||
|
@ -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 ?');
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user