Skip to content

Commit

Permalink
Trying OpenAPITools generator
Browse files Browse the repository at this point in the history
  • Loading branch information
neclimdul committed Jun 4, 2020
1 parent e1954cb commit 20c2a30
Show file tree
Hide file tree
Showing 797 changed files with 5,877 additions and 3,370 deletions.
12 changes: 6 additions & 6 deletions build_swagger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ MakeSwagger() {
sudo find .build/ -mindepth 1 -not -name .gitignore -delete

# Use docker to run the swagger codegen tool.
docker run --rm -v ${PWD}:/local/ swaggerapi/swagger-codegen-cli generate \
-i ${1} -l php -o /local/.build \
docker run --rm -v ${PWD}:/local/ openapitools/openapi-generator-cli:v3.3.4 generate \
-i ${1} -g php -o /local/.build \
-t /local/template/php/ \
-DinvokerPackage=NecLimDul\\MarketoRest\\${2}
-D invokerPackage=NecLimDul\\MarketoRest\\${2}

sudo chown ${USER}: .build/ -R

mkdir -p docs/${2}
rm -rf docs/${2}/Api docs/${2}/Model
mv .build/SwaggerClient-php/docs/* ./docs/${2}/
mv .build/docs/* ./docs/${2}/

mkdir -p src/${2}
rm -rf src/${2}/*
mv .build/SwaggerClient-php/lib/* ./src/${2}/
mv .build/lib/* ./src/${2}/

# These are autogenerated tests.
mkdir -p tests/${2}/*
rm -rf tests/${2}/Api tests/${2}/Model
mv .build/SwaggerClient-php/test/* ./tests/${2}/
mv .build/test/* ./tests/${2}/

find .build/ -mindepth 1 -not -name .gitignore -delete
}
Expand Down
6 changes: 3 additions & 3 deletions docs/Asset/Api/ChannelsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)
Expand All @@ -76,7 +76,7 @@ $apiInstance = new NecLimDul\MarketoRest\Asset\Api\ChannelsApi(
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$name = "name_example"; // string | Name of channel to retrieve
$name = 'name_example'; // string | Name of channel to retrieve

try {
$result = $apiInstance->getChannelByNameUsingGET($name);
Expand All @@ -103,7 +103,7 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)
Expand Down
72 changes: 42 additions & 30 deletions docs/Asset/Api/EmailTemplatesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)

# **cloneTemplateUsingPOST**
> \NecLimDul\MarketoRest\Asset\Model\ResponseOfEmailTemplateResponse cloneTemplateUsingPOST($id, $clone_email_template_request)
> \NecLimDul\MarketoRest\Asset\Model\ResponseOfEmailTemplateResponse cloneTemplateUsingPOST($id, $folder, $name, $description)
Clone Email Template

Expand All @@ -86,10 +86,12 @@ $apiInstance = new NecLimDul\MarketoRest\Asset\Api\EmailTemplatesApi(
new GuzzleHttp\Client()
);
$id = 56; // int | id
$clone_email_template_request = new \NecLimDul\MarketoRest\Asset\Model\CloneEmailTemplateRequest(); // \NecLimDul\MarketoRest\Asset\Model\CloneEmailTemplateRequest | cloneEmailTemplateRequest
$folder = new \NecLimDul\MarketoRest\Asset\Model\Folder(); // \NecLimDul\MarketoRest\Asset\Model\Folder |
$name = 'name_example'; // string | Name of the Email Template
$description = 'description_example'; // string | Description of the asset

try {
$result = $apiInstance->cloneTemplateUsingPOST($id, $clone_email_template_request);
$result = $apiInstance->cloneTemplateUsingPOST($id, $folder, $name, $description);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmailTemplatesApi->cloneTemplateUsingPOST: ', $e->getMessage(), PHP_EOL;
Expand All @@ -102,7 +104,9 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **int**| id |
**clone_email_template_request** | [**\NecLimDul\MarketoRest\Asset\Model\CloneEmailTemplateRequest**](../Model/CloneEmailTemplateRequest.md)| cloneEmailTemplateRequest |
**folder** | [**\NecLimDul\MarketoRest\Asset\Model\Folder**](../Model/Folder.md)| |
**name** | **string**| Name of the Email Template |
**description** | **string**| Description of the asset | [optional]

### Return type

Expand All @@ -120,7 +124,7 @@ No authorization required
[[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)

# **createEmailTemplateUsingPOST**
> \NecLimDul\MarketoRest\Asset\Model\ResponseOfEmailTemplateResponse createEmailTemplateUsingPOST($create_email_template_request)
> \NecLimDul\MarketoRest\Asset\Model\ResponseOfEmailTemplateResponse createEmailTemplateUsingPOST($name, $folder, $content, $description)
Create Email Template

Expand All @@ -136,10 +140,13 @@ $apiInstance = new NecLimDul\MarketoRest\Asset\Api\EmailTemplatesApi(
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$create_email_template_request = new \NecLimDul\MarketoRest\Asset\Model\CreateEmailTemplateRequest(); // \NecLimDul\MarketoRest\Asset\Model\CreateEmailTemplateRequest | createEmailTemplateRequest
$name = 'name_example'; // string | Name of the Email Template. Must be unique under the parent folder.
$folder = new \NecLimDul\MarketoRest\Asset\Model\Folder(); // \NecLimDul\MarketoRest\Asset\Model\Folder |
$content = 'content_example'; // string | HTML content for template. Multipart file.
$description = 'description_example'; // string | Description of the email template

try {
$result = $apiInstance->createEmailTemplateUsingPOST($create_email_template_request);
$result = $apiInstance->createEmailTemplateUsingPOST($name, $folder, $content, $description);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmailTemplatesApi->createEmailTemplateUsingPOST: ', $e->getMessage(), PHP_EOL;
Expand All @@ -151,7 +158,10 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**create_email_template_request** | [**\NecLimDul\MarketoRest\Asset\Model\CreateEmailTemplateRequest**](../Model/CreateEmailTemplateRequest.md)| createEmailTemplateRequest |
**name** | **string**| Name of the Email Template. Must be unique under the parent folder. |
**folder** | [**\NecLimDul\MarketoRest\Asset\Model\Folder**](../Model/Folder.md)| |
**content** | **string**| HTML content for template. Multipart file. |
**description** | **string**| Description of the email template | [optional]

### Return type

Expand Down Expand Up @@ -212,7 +222,7 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)
Expand Down Expand Up @@ -261,7 +271,7 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)
Expand Down Expand Up @@ -314,7 +324,7 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)
Expand All @@ -338,7 +348,7 @@ $apiInstance = new NecLimDul\MarketoRest\Asset\Api\EmailTemplatesApi(
);
$offset = 56; // int | Integer offset for paging
$max_return = 56; // int | Maximum number of channels to return. Max 200, default 20
$status = "status_example"; // string | Status filter for draft or approved versions
$status = 'status_example'; // string | Status filter for draft or approved versions

try {
$result = $apiInstance->getEmailTemplatesUsingGET($offset, $max_return, $status);
Expand Down Expand Up @@ -367,7 +377,7 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)
Expand All @@ -390,7 +400,7 @@ $apiInstance = new NecLimDul\MarketoRest\Asset\Api\EmailTemplatesApi(
new GuzzleHttp\Client()
);
$id = 56; // int | id
$status = "status_example"; // string | Status filter for draft or approved versions
$status = 'status_example'; // string | Status filter for draft or approved versions

try {
$result = $apiInstance->getTemplateByIdUsingGET($id, $status);
Expand Down Expand Up @@ -418,7 +428,7 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)
Expand All @@ -440,8 +450,8 @@ $apiInstance = new NecLimDul\MarketoRest\Asset\Api\EmailTemplatesApi(
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$name = "name_example"; // string | name
$status = "status_example"; // string | Status filter for draft or approved versions
$name = 'name_example'; // string | name
$status = 'status_example'; // string | Status filter for draft or approved versions

try {
$result = $apiInstance->getTemplateByNameUsingGET($name, $status);
Expand Down Expand Up @@ -469,7 +479,7 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)
Expand All @@ -492,7 +502,7 @@ $apiInstance = new NecLimDul\MarketoRest\Asset\Api\EmailTemplatesApi(
new GuzzleHttp\Client()
);
$id = 56; // int | id
$status = "status_example"; // string | Status filter for draft or approved versions
$status = 'status_example'; // string | Status filter for draft or approved versions

try {
$result = $apiInstance->getTemplateContentByIdUsingGET($id, $status);
Expand Down Expand Up @@ -520,7 +530,7 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)
Expand Down Expand Up @@ -569,13 +579,13 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/x-www-form-urlencoded
- **Content-Type**: Not defined
- **Accept**: application/json

[[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)

# **updateEmailTemplateContentUsingPOST**
> \NecLimDul\MarketoRest\Asset\Model\ResponseOfIdResponse updateEmailTemplateContentUsingPOST($id, $update_email_template_content_request)
> \NecLimDul\MarketoRest\Asset\Model\ResponseOfIdResponse updateEmailTemplateContentUsingPOST($id, $content)
Update Email Template Content

Expand All @@ -592,10 +602,10 @@ $apiInstance = new NecLimDul\MarketoRest\Asset\Api\EmailTemplatesApi(
new GuzzleHttp\Client()
);
$id = 56; // int | id
$update_email_template_content_request = new \NecLimDul\MarketoRest\Asset\Model\UpdateEmailTemplateContentRequest(); // \NecLimDul\MarketoRest\Asset\Model\UpdateEmailTemplateContentRequest | updateEmailTemplateContentRequest
$content = 'content_example'; // string | Content for the email template. Multipart file.

try {
$result = $apiInstance->updateEmailTemplateContentUsingPOST($id, $update_email_template_content_request);
$result = $apiInstance->updateEmailTemplateContentUsingPOST($id, $content);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmailTemplatesApi->updateEmailTemplateContentUsingPOST: ', $e->getMessage(), PHP_EOL;
Expand All @@ -608,7 +618,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **int**| id |
**update_email_template_content_request** | [**\NecLimDul\MarketoRest\Asset\Model\UpdateEmailTemplateContentRequest**](../Model/UpdateEmailTemplateContentRequest.md)| updateEmailTemplateContentRequest | [optional]
**content** | **string**| Content for the email template. Multipart file. | [optional]

### Return type

Expand All @@ -626,7 +636,7 @@ No authorization required
[[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)

# **updateEmailTemplateUsingPOST**
> \NecLimDul\MarketoRest\Asset\Model\ResponseOfEmailTemplateResponse updateEmailTemplateUsingPOST($id, $update_email_meta_data_request)
> \NecLimDul\MarketoRest\Asset\Model\ResponseOfEmailTemplateResponse updateEmailTemplateUsingPOST($id, $description, $name)
Update Email Template Metadata

Expand All @@ -643,10 +653,11 @@ $apiInstance = new NecLimDul\MarketoRest\Asset\Api\EmailTemplatesApi(
new GuzzleHttp\Client()
);
$id = 56; // int | id
$update_email_meta_data_request = new \NecLimDul\MarketoRest\Asset\Model\UpdateEmailTemplateMetaDataRequest(); // \NecLimDul\MarketoRest\Asset\Model\UpdateEmailTemplateMetaDataRequest | updateEmailMetaDataRequest
$description = 'description_example'; // string | Description of the asset
$name = 'name_example'; // string | Name of the Email Template

try {
$result = $apiInstance->updateEmailTemplateUsingPOST($id, $update_email_meta_data_request);
$result = $apiInstance->updateEmailTemplateUsingPOST($id, $description, $name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmailTemplatesApi->updateEmailTemplateUsingPOST: ', $e->getMessage(), PHP_EOL;
Expand All @@ -659,7 +670,8 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **int**| id |
**update_email_meta_data_request** | [**\NecLimDul\MarketoRest\Asset\Model\UpdateEmailTemplateMetaDataRequest**](../Model/UpdateEmailTemplateMetaDataRequest.md)| updateEmailMetaDataRequest |
**description** | **string**| Description of the asset | [optional]
**name** | **string**| Name of the Email Template | [optional]

### Return type

Expand Down
Loading

0 comments on commit 20c2a30

Please sign in to comment.