Skip to content

Commit a12961e

Browse files
committed
Update OpenAPI generator config and templates
Switched the generator to php-nextgen and adjusted paths. Enhanced README with additional API details and usage instructions. Updated composer.mustache with clearer package description.
1 parent a4a86c9 commit a12961e

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

config-openapi-generator.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# config-openapi-generator.yml
2-
generatorName: php
2+
generatorName: php-nextgen
33
outputDir: .
44
inputSpec: https://api.brevo.com/v3/swagger_definition_v3.yml
55
gitHost: github.com
@@ -12,7 +12,7 @@ templateDir: ./template/php-nextgen
1212
invokerPackage: Brevo\Client
1313
artifactVersion: 3.0.0
1414
packageName: Brevo\Client
15-
srcBasePath: src
15+
srcBasePath: lib
1616
variableNamingConvention: camelCase
1717

1818
# Server configuration

template/php-nextgen/README.mustache

+21-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# {{packageName}}
1+
# {{artifactDescription}}
22

33
{{#appDescriptionWithNewLines}}
44
{{{.}}}
@@ -8,6 +8,9 @@
88
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}).
99
{{/infoUrl}}
1010

11+
Brevo's API matches the [OpenAPI v2 definition](https://www.openapis.org/). The specification can be downloaded [here](https://api.brevo.com/v3/swagger_definition.yml).
12+
13+
1114
## Installation & Usage
1215

1316
### Requirements
@@ -20,14 +23,8 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow
2023

2124
```json
2225
{
23-
"repositories": [
24-
{
25-
"type": "vcs",
26-
"url": "https://{{gitHost}}/{{gitUserId}}/{{gitRepoId}}.git"
27-
}
28-
],
2926
"require": {
30-
"{{gitUserId}}/{{gitRepoId}}": "*@dev"
27+
"{{gitUserId}}/{{gitRepoId}}": "*"
3128
}
3229
}
3330
```
@@ -135,6 +132,21 @@ vendor/bin/phpunit
135132
{{/-last}}{{/apis}}{{/apiInfo}}
136133
## About this package
137134

135+
## partner-key
136+
137+
The partner key should be passed in the request headers as `partner-key` along with `api-key` pair for successful authentication of partner (Optional).
138+
139+
- **Type**: API key
140+
- **API key parameter name**: partner-key
141+
- **Location**: HTTP header
142+
143+
144+
If you find a bug, please post the issue on [Github](https://github.com/getbrevo/brevo-php/issues).
145+
146+
As always, if you need additional assistance, drop us a note [here](https://account.brevo.com/support).
147+
148+
You can generate the PHP code with the CLI command: openapi-generator generate --skip-validate-spec -c config-openapi-generator.yml
149+
138150
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
139151

140152
- API version: `{{appVersion}}`
@@ -146,3 +158,4 @@ This PHP package is automatically generated by the [OpenAPI Generator](https://o
146158
{{/hideGenerationTimestamp}}
147159
- Generator version: `{{generatorVersion}}`
148160
- Build package: `{{generatorClass}}`
161+

template/php-nextgen/composer.mustache

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
{{#composerPackageName}}
33
"name": "{{.}}",
44
{{/composerPackageName}}
5-
{{#artifactVersion}}
6-
"version": "{{.}}",
7-
{{/artifactVersion}}
8-
"description": "{{{appDescription}}}",
5+
"description": "Official Brevo provided RESTFul API V3 php library",
96
"keywords": [
107
"brevo",
118
"swagger",

0 commit comments

Comments
 (0)