File tree 4 files changed +21
-1
lines changed
4 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
and this project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
6
6
7
7
8
+ ## [ 5.4.0] - 2021-04-22
9
+ ### Added
10
+ - Support for ` license ` info. Use it in the default composer.json tpl.
11
+
8
12
## [ 5.3.0] - 2021-04-13
9
13
### Added
10
14
- Support for ` mixed ` parameter type
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " openapi/pet-store-client" ,
3
3
"description" : " Client library for Swagger Petstore - OpenAPI 3.0" ,
4
+ "license" : " Apache 2.0" ,
4
5
"keywords" : [
5
6
" api-client"
6
7
],
Original file line number Diff line number Diff line change @@ -34,6 +34,18 @@ public function getTitle(): string
34
34
return $ this ->openApi ->info ->title ;
35
35
}
36
36
37
+ public function hasLicense (): bool
38
+ {
39
+ $ license = $ this ->openApi ->info ->license ;
40
+
41
+ return $ license && $ license ->name ;
42
+ }
43
+
44
+ public function getLicenseName (): string
45
+ {
46
+ return $ this ->openApi ->info ->license ->name ;
47
+ }
48
+
37
49
public function getServerUrls (): array
38
50
{
39
51
$ serverUrls = [];
Original file line number Diff line number Diff line change 1
1
{
2
2
"name": "{{ packageName }}",
3
3
"description": "Client library for {{ specification.getTitle () }}",
4
- "keywords": [
4
+ {% if specification .hasLicense %}
5
+ "license": "{{ specification .getLicenseName }}",
6
+ {% endif %}
7
+ "keywords": [
5
8
"api-client"
6
9
],
7
10
"config": {
You can’t perform that action at this time.
0 commit comments