Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bin/objc-petstore-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# default setting
./bin/objc-petstore.sh

# coredata support
./bin/objc-petstore-coredata.sh

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $app = new Slim\App();
* Notes: {{notes}}
{{#hasProduces}} * Output-Formats: [{{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}]{{/hasProduces}}
*/
$app->{{httpMethod}}('{{path}}', function($request, $response, $args) {
$app->{{httpMethod}}('{{basePathWithoutHost}}{{path}}', function($request, $response, $args) {
{{#hasHeaderParams}}$headers = $request->getHeaders();{{/hasHeaderParams}}
{{#hasQueryParams}}$queryParams = $request->getQueryParams();
{{#queryParams}}${{paramName}} = $queryParams['{{paramName}}'];{{newline}} {{/queryParams}}{{/hasQueryParams}}
Expand Down
40 changes: 20 additions & 20 deletions samples/server/petstore/slim/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Notes:
* Output-Formats: [application/xml, application/json]
*/
$app->POST('/pet', function($request, $response, $args) {
$app->POST('/v2/pet', function($request, $response, $args) {



Expand All @@ -31,7 +31,7 @@
* Notes:
* Output-Formats: [application/xml, application/json]
*/
$app->DELETE('/pet/{petId}', function($request, $response, $args) {
$app->DELETE('/v2/pet/{petId}', function($request, $response, $args) {
$headers = $request->getHeaders();


Expand All @@ -47,7 +47,7 @@
* Notes: Multiple status values can be provided with comma separated strings
* Output-Formats: [application/xml, application/json]
*/
$app->GET('/pet/findByStatus', function($request, $response, $args) {
$app->GET('/v2/pet/findByStatus', function($request, $response, $args) {

$queryParams = $request->getQueryParams();
$status = $queryParams['status'];
Expand All @@ -64,7 +64,7 @@
* Notes: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* Output-Formats: [application/xml, application/json]
*/
$app->GET('/pet/findByTags', function($request, $response, $args) {
$app->GET('/v2/pet/findByTags', function($request, $response, $args) {

$queryParams = $request->getQueryParams();
$tags = $queryParams['tags'];
Expand All @@ -81,7 +81,7 @@
* Notes: Returns a single pet
* Output-Formats: [application/xml, application/json]
*/
$app->GET('/pet/{petId}', function($request, $response, $args) {
$app->GET('/v2/pet/{petId}', function($request, $response, $args) {



Expand All @@ -97,7 +97,7 @@
* Notes:
* Output-Formats: [application/xml, application/json]
*/
$app->PUT('/pet', function($request, $response, $args) {
$app->PUT('/v2/pet', function($request, $response, $args) {



Expand All @@ -113,7 +113,7 @@
* Notes:
* Output-Formats: [application/xml, application/json]
*/
$app->POST('/pet/{petId}', function($request, $response, $args) {
$app->POST('/v2/pet/{petId}', function($request, $response, $args) {


$name = $args['name']; $status = $args['status'];
Expand All @@ -129,7 +129,7 @@
* Notes:
* Output-Formats: [application/json]
*/
$app->POST('/pet/{petId}/uploadImage', function($request, $response, $args) {
$app->POST('/v2/pet/{petId}/uploadImage', function($request, $response, $args) {


$additionalMetadata = $args['additionalMetadata']; $file = $args['file'];
Expand All @@ -145,7 +145,7 @@
* Notes: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
* Output-Formats: [application/xml, application/json]
*/
$app->DELETE('/store/order/{orderId}', function($request, $response, $args) {
$app->DELETE('/v2/store/order/{orderId}', function($request, $response, $args) {



Expand All @@ -161,7 +161,7 @@
* Notes: Returns a map of status codes to quantities
* Output-Formats: [application/json]
*/
$app->GET('/store/inventory', function($request, $response, $args) {
$app->GET('/v2/store/inventory', function($request, $response, $args) {



Expand All @@ -177,7 +177,7 @@
* Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* Output-Formats: [application/xml, application/json]
*/
$app->GET('/store/order/{orderId}', function($request, $response, $args) {
$app->GET('/v2/store/order/{orderId}', function($request, $response, $args) {



Expand All @@ -193,7 +193,7 @@
* Notes:
* Output-Formats: [application/xml, application/json]
*/
$app->POST('/store/order', function($request, $response, $args) {
$app->POST('/v2/store/order', function($request, $response, $args) {



Expand All @@ -209,7 +209,7 @@
* Notes: This can only be done by the logged in user.
* Output-Formats: [application/xml, application/json]
*/
$app->POST('/user', function($request, $response, $args) {
$app->POST('/v2/user', function($request, $response, $args) {



Expand All @@ -225,7 +225,7 @@
* Notes:
* Output-Formats: [application/xml, application/json]
*/
$app->POST('/user/createWithArray', function($request, $response, $args) {
$app->POST('/v2/user/createWithArray', function($request, $response, $args) {



Expand All @@ -241,7 +241,7 @@
* Notes:
* Output-Formats: [application/xml, application/json]
*/
$app->POST('/user/createWithList', function($request, $response, $args) {
$app->POST('/v2/user/createWithList', function($request, $response, $args) {



Expand All @@ -257,7 +257,7 @@
* Notes: This can only be done by the logged in user.
* Output-Formats: [application/xml, application/json]
*/
$app->DELETE('/user/{username}', function($request, $response, $args) {
$app->DELETE('/v2/user/{username}', function($request, $response, $args) {



Expand All @@ -273,7 +273,7 @@
* Notes:
* Output-Formats: [application/xml, application/json]
*/
$app->GET('/user/{username}', function($request, $response, $args) {
$app->GET('/v2/user/{username}', function($request, $response, $args) {



Expand All @@ -289,7 +289,7 @@
* Notes:
* Output-Formats: [application/xml, application/json]
*/
$app->GET('/user/login', function($request, $response, $args) {
$app->GET('/v2/user/login', function($request, $response, $args) {

$queryParams = $request->getQueryParams();
$username = $queryParams['username']; $password = $queryParams['password'];
Expand All @@ -306,7 +306,7 @@
* Notes:
* Output-Formats: [application/xml, application/json]
*/
$app->GET('/user/logout', function($request, $response, $args) {
$app->GET('/v2/user/logout', function($request, $response, $args) {



Expand All @@ -322,7 +322,7 @@
* Notes: This can only be done by the logged in user.
* Output-Formats: [application/xml, application/json]
*/
$app->PUT('/user/{username}', function($request, $response, $args) {
$app->PUT('/v2/user/{username}', function($request, $response, $args) {



Expand Down